FreeRTOS™ is a popular real-time operating system for embedded devices from Real Time Engineers Ltd. FreeRTOS supports many different architectures (ARM7, ARM Cortex-M3, various PICs, Silicon Labs 8051, x86, etc.) and compiler toolchains (CodeWarrior, GCC, IAR, etc.), and is designed to be "small, simple, and easy to use". FreeRTOS ships with all the hardware-independent as well as hardware-dependent code to get a system up and running. It is distributed under the GPL with an optional exception. The exception permits users' proprietary code to remain closed source while maintaining the kernel itself as open source, thereby facilitating the use of FreeRTOS in proprietary applications.
The original mission of the FreeRTOS project was to provide a free RTOS solution that was easy to use. That is, easy to build and deploy, on a Windows (or Linux) host computer, without having to figure out which source files are required, which include paths are required, or how to configure the real time debugging environment. This has been achieved through the provision of pre-configured, build-able, example projects for each officially support port.
FreeRTOS is designed to be small and simple. The kernel itself consists of only three or four C files. To make the code readable, easy to port, and maintainable, it is written mostly in C, but there are a few assembly functions included where needed (mostly in architecture specific scheduler routines). FreeRTOS's code breaks down into three main areas: tasks, communication, and hardware interfacing.
FreeRTOS provides methods for multiple threads or tasks, and semaphores. Thread priorities are supported. In addition there are three schemes of memory allocation provided, allocate only, allocate and free with a very simple, fast, algorithm, and a more complex allocate and free algorithm. There are none of the more advanced features typical found in operating systems like Linux or Microsoft Windows, such as device drivers, advanced memory management, user accounts, and networking. The emphasis is on compactness and speed of execution. FreeRTOS can be thought of as a 'thread library' rather than an 'operating system', although command line interface and POSIX like IO abstraction add-ons are available. FreeRTOS implements multiple threads by having the host program call a thread tick method at regular short intervals. The thread tick method switches tasks depending on priority and a round-robin scheduling scheme. The usual interval is 1/1000 of a second to 1/100 of a second, via. an interrupt from a hardware timer, but this interval is often changed to suit a particular applicatio.
FreeRTOS is commercial grade, stable and reliable. There are even safety critical versions based on it, with improvements from the safety critical certification being fed back into the open source code base (although not the new safety related features).
FreeRTOS is a scale-able real time kernel designed specifically for small embedded systems. Highlights include:
- Free RTOS kernel - preemptive, cooperative and hybrid configuration options.
- The SafeRTOS derivative product provides a high level of confidence in the code integrity.
- Official support for 31 embedded system architectures (counting ARM7 and ARM Cortex-M3 as one architecture each).
- FreeRTOS-MPU supports the ARM Cortex-M3 Memory Protection Unit (MPU).
- Designed to be small, simple and easy to use. Typically a kernel binary image will be in the region of 4K to 9K bytes.
- Very portable source code structure, predominantly written in C.
- Supports both real time tasks and co-routines.
- Queues, binary semaphores, counting semaphores, recursive semaphores and mutexes for communication and synchronisation between tasks, or between real time tasks and interrupts.
- Mutexes with priority inheritance.
- Efficient software timers.
- Powerful execution trace functionality.
- Stack overflow detection options.
- Pre-configured RTOS demo applications for selected single board computers allowing 'out of the box' operation and fast learning curve.
- Free forum support, or optional commercial support and licensing.
- No software restriction on the number of real time tasks that can be created.
- No software restriction on the number of task priorities that can be used.
- No restrictions imposed on task priority assignment - more than one real time task can be assigned the same priority.
- Free development tools for many supported architectures.
- Free embedded software source code.
- Royalty free.
- Cross development from a standard Windows host.
FreeRTOS is licensed under a modified GNU General Public License (GPL) and can be used in commercial applications under this license without any requirement to expose your propriatory source code. The FreeRTOS download also includes demo application source code, some of which is provided by third parties AND IS LICENSED SEPARATELY FROM FREERTOS. An alternative commercial license option is also available in cases that:
- You cannot fulfill the requirements stated in the "Modified GPL license" column of the table below.
- You wish to receive direct technical support.
- You wish to have assistance with your development.
- You require legal protection or other assurances.
License Feature Comparison
Open Source License
|Is it free?||Yes||No|
|Can I use it in a commercial application?||Yes||Yes|
|Is it royalty free?||Yes||Yes|
|Do I have to open source my application code that makes use of the FreeRTOS services?||No, as long as the code provides functionality that is distinct from that provided by FreeRTOS||No|
|Do I have to open source my changes to the kernel?||Yes||No|
|Do I have to document that my product uses FreeRTOS?||Yes||No|
|Do I have to offer to provide the FreeRTOS code to users of my application?||Yes||No|
|Can I receive professional technical support on a commercial basis?||No, FreeRTOS is supported by an online community||Yes|
|Is a warranty provided?||No||Yes|
|Is legal protection provided?||No||Yes, IP infringement protection is provided|
FreeRTOS ports are categorised as either being officially supported, or contributed. Here only lists the official ports:
|Manufacturer||Supported Processor Families||Supported Tools|
|Actel||SmartFusion||IAR, Keil MDK-ARM, SoftConsole (GCC with Eclipse)|
|Altera||Nios II||Nios II IDE with GCC|
|Atmel||SAM3 (Cortex M3), SAM7 (ARM7), SAM9 (ARM9), AT91 and AVR32 UC3||IAR, GCC, Keil MDK-ARM, Rowley CrossWorks|
|Cortus||APS3||Cortus IDE with GCC|
|Cypress||PSoC 5 Cortex-M3||GCC, Keil MDK-ARM and RVDS - all in the PSoC Creator IDE|
|Energy Micro||EFM32 (Cortex M3)||A demo project is provided for IAR, although this uses the standard Cortex-M3 port so projects for GCC and Keil MDK-ARM could also be created.|
|Freescale||Kinetis Cortex-M4, Coldfire V2, Coldfire V1, Coldfire V4, HCS12, PPC405 & PPC440 (Xilinx implementations)||CodeWarrior, GCC, Eclipse, IAR|
|Infineon||TriCore, XMC4000 (Cortex-M4F)||GCC, Keil MDK-ARM, Tasking, IAR|
|Fujitsu||FM3 Cortex-M3, 32bit (for example MB91460) and 16bit (for example MB96340 16FX)||Softune, IAR, Keil MDK-ARM|
|Microchip||PIC32, PIC24, dsPIC, PIC18||MPLAB|
|NXP||LPC1700 (Cortex-M3), LPC1100 (Cortex-M0), LPC4300 (Cortex-M4F) LPC2000 (ARM7), LPC4300 (Cortex-M4F/Cortex-M0)||GCC, Rowley CrossWorks, IAR, Keil MDK-ARM, Red Suite, Eclipse|
|Renesas||V850 (32bit), 78K0R (16bit), RX600 / RX62N / RX63N, RX210, SuperH, RL78, H8/S||GCC, HEW (High Performance Embedded Workbench), IAR|
|Silicon Labs||Super fast 8051 compatible MCUs||SDCC|
|ST||STM32 (Cortex-M0, Cortex-M3 and Cortex-M4), STR7 (ARM7), STR9 (ARM9)||IAR, Atollic TrueStudio, GCC, Keil MDK-ARM, Rowley CrossWorks|
|TI||MSP430, Stellaris (Cortex-M3)||Rowley CrossWorks, IAR, GCC, Code Composer Studio|
|Xilinx||PPC405 running on a Virtex4 FPGA, PPC440 running on a Virtex5 FPGA, Microblaze||GCC|
|Application Note||Freescale: Serial-to-Ethernet Bridge Using MCF51CN Family and FreeRTOS|
|Application Note||Freescale: Web Server Using the MCF51CN Family and FreeRTOS|
|Application Note||Freescale: Email Client Using MCF51CN Family and FreeRTOS|
|Application Library||FreeRTOS Source Code|
|Application Library||Freescale: Serial-to-Ethernet Bridge Using MCF51CN Family and FreeRTOS Coding|
|Application Library||Freescale: Web Server Using the MCF51CN Family and FreeRTOS Coding|
|Application Library||Freescale: Email Client Using MCF51CN Family and FreeRTOS Coding|