FreeRTOS is a
real-time operating system
A real-time operating system (RTOS) is an operating system (OS) for real-time computing applications that processes data and events that have critically defined time constraints. A RTOS is distinct from a time-sharing operating system, such as Unix ...
kernel for
embedded device
An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or Electronics, electronic syst ...
s that has been ported to 40
microcontroller
A microcontroller (MC, uC, or μC) or microcontroller unit (MCU) is a small computer on a single integrated circuit. A microcontroller contains one or more CPUs (processor cores) along with memory and programmable input/output peripherals. Pro ...
platforms. It is distributed under the
MIT License
The MIT License is a permissive software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts very few restrictions on reuse and therefore has high license compatibility.
Unl ...
.
History
The FreeRTOS kernel was originally developed by Richard Barry around 2003, and was later developed and maintained by Barry's company, Real Time Engineers Ltd. In 2017, the firm passed stewardship of the FreeRTOS project to
Amazon Web Services
Amazon Web Services, Inc. (AWS) is a subsidiary of Amazon.com, Amazon that provides Software as a service, on-demand cloud computing computing platform, platforms and Application programming interface, APIs to individuals, companies, and gover ...
(AWS). Barry continues to work on FreeRTOS as part of an AWS team. With the transition to Amazon control, subsequent releases of the project also switched licensing from GPL version 2 (with special exceptions for static linking to proprietary code outside the FreeRTOS kernel itself) to MIT.
Implementation
FreeRTOS is designed to be small and simple. It is mostly written in the
C programming language to make it easy to port and maintain. It also comprises a few
assembly language
In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
functions where needed, mostly in architecture-specific scheduler routines.
Process management
FreeRTOS provides methods for multiple
threads or
tasks,
mutexes,
semaphores and
software timers. A
tickless mode is provided for low power applications. Thread priorities are supported. FreeRTOS applications can be statically allocated, but objects can also be dynamically allocated with five schemes of
memory management
Memory management (also dynamic memory management, dynamic storage allocation, or dynamic memory allocation) is a form of Resource management (computing), resource management applied to computer memory. The essential requirement of memory manag ...
(allocation):
* allocate only;
* allocate and free with a very simple, fast, algorithm;
* a more complex but fast allocate and free algorithm with
memory coalescence;
* an alternative to the more complex scheme that includes memory coalescence that allows a heap to be broken across multiple memory areas.
* and C library allocate and free with some mutual exclusion protection.
RTOSes typically do not have the more advanced features that are found in
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s like
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
and
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, such as
device driver
In the context of an operating system, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabli ...
s, advanced memory management, and user accounts. 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
input/output
In computing, input/output (I/O, i/o, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, such as another computer system, peripherals, or a human operator. Inputs a ...
(I/O) abstraction 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 to 10 milliseconds ( to of a second) via an interrupt from a hardware timer, but this interval is often changed to suit a given application.
The software distribution contains prepared configurations and demonstrations for every port and compiler, allowing rapid application design. The project website provides documentation and RTOS tutorials, and details of the RTOS design.
Key features
* Book and reference manuals.
* Small memory size, low overhead, and fast execution.
* Tick-less option for low power applications.
* Intended for both hobbyists and professional developers working on commercial products.
* Scheduler can be configured for both preemptive or cooperative multitasking.
*
Coroutine
Coroutines are computer program components that allow execution to be suspended and resumed, generalizing subroutines for cooperative multitasking. Coroutines are well-suited for implementing familiar program components such as cooperative task ...
support (coroutines in FreeRTOS are simple and lightweight
tasks with limited use of the
call stack
In computer science, a call stack is a Stack (abstract data type), stack data structure that stores information about the active subroutines and block (programming), inline blocks of a computer program. This type of stack is also known as an exe ...
)
* Trace support through generic trace macros. Tools such as Tracealyzer, a commercial tool by FreeRTOS partner Percepio, can thereby record and visualize the
runtime behavior of FreeRTOS-based systems for debugging and verification. This includes task scheduling and kernel calls for semaphore and queue operations.
Supported architectures
*
Altera Nios II
Nios II is a 32-bit embedded processor architecture designed specifically for the Altera family of field-programmable gate array (FPGA) integrated circuits. Nios II incorporates many enhancements over the original Nios architecture, making ...
*
ARM architecture
ARM (stylised in lowercase as arm, formerly an acronym for Advanced RISC Machines and originally Acorn RISC Machine) is a family of reduced instruction set computer, RISC instruction set architectures (ISAs) for central processing unit, com ...
**
ARM7
**
ARM9
**
ARM Cortex-M
**
ARM Cortex-A
*
Atmel
**
Atmel AVR
AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. They are 8-bit RISC single-chip microcontrollers based on a modified Harvard architecture. AVR was one of the first microcontroller ...
**
AVR32
** SAM3, SAM4
** SAM7, SAM9
** SAMD20, SAML21
*
Ceva
**Ceva-BXx
**SensPro
**Ceva-XC16
**Ceva-XM6
**Ceva-Xx
**Ceva-XM4
* Cortus
** APS1
** APS3
** APS3R
** APS5
** FPS6
** FPS8
*
Cypress
**
PSoC
*
Energy Micro
**
EFM32
*
eSi-RISC
** eSi-16x0
** eSi-32x0
*
DSP Group
** DBMD7
*
Espressif
**
ESP8266
**
ESP32
*
Fujitsu
** FM3
** MB91460
** MB96340
*
Freescale
Freescale Semiconductor, Inc. was an American semiconductor manufacturer. It was created by the divestiture of the Semiconductor Products Sector of Motorola in 2004. Freescale focused their integrated circuit products on the automotive, embedde ...
**
Coldfire V1, V2
**
HCS12
** Kinetis
*
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
**
PPC404, PPC405
*
Infineon
Infineon Semiconductor solutions is the largest microcontroller manufacturer in the world, as well as Germany's largest semiconductor manufacturer. It is also the leading automotive semiconductor manufacturer globally. Infineon had roughly 58,0 ...
**
TriCore
**
Infineon XMC4000
*
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, and Delaware General Corporation Law, incorporated in Delaware. Intel designs, manufactures, and sells computer compo ...
**
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
**
8052
*
Microchip Technology
** PIC18, PIC24, dsPIC
** PIC32
*
Microsemi
**
SmartFusion
*
Multiclet
** P1
*
NXP
**
LPC1000
**
LPC2000
**
LPC4300
*
Renesas
** 78K0R
** RL78
**
H8/S
** RX600
** RX200
**
SuperH
SuperH (or SH) is a 32-bit reduced instruction set computing (RISC) instruction set architecture (ISA) developed by Hitachi and currently produced by Renesas. It is implemented by microcontrollers and microprocessors for embedded systems.
At the ...
**
V850
*
RISC-V
RISC-V (pronounced "risk-five") is an open standard instruction set architecture (ISA) based on established reduced instruction set computer (RISC) principles. The project commenced in 2010 at the University of California, Berkeley. It transfer ...
** RV32I
** RV64I
** PULP RI5CY
*
Silicon Labs
** Gecko (ARM Cortex)
*
STMicroelectronics
**
STM32
** STR7
*
Texas Instruments
Texas Instruments Incorporated (TI) is an American multinational semiconductor company headquartered in Dallas, Texas. It is one of the top 10 semiconductor companies worldwide based on sales volume. The company's focus is on developing analog ...
** C2000 series (TMS320F28x)
**
MSP430
** Stellaris
**
Hercules
Hercules (, ) is the Roman equivalent of the Greek divine hero Heracles, son of Jupiter and the mortal Alcmena. In classical mythology, Hercules is famous for his strength and for his numerous far-ranging adventures.
The Romans adapted the Gr ...
(TMS570LS04 & RM42)
*
Xilinx
Xilinx, Inc. ( ) was an American technology and semiconductor company that primarily supplied programmable logic devices. The company is renowned for inventing the first commercially viable field-programmable gate array (FPGA). It also pioneered ...
**
MicroBlaze
**
Zynq-7000
Derivations
Amazon FreeRTOS
Amazon
Amazon most often refers to:
* Amazon River, in South America
* Amazon rainforest, a rainforest covering most of the Amazon basin
* Amazon (company), an American multinational technology company
* Amazons, a tribe of female warriors in Greek myth ...
provides a now deprecated extension of FreeRTOS, this is FreeRTOS with libraries for
Internet of things
Internet of things (IoT) describes devices with sensors, processing ability, software and other technologies that connect and exchange data with other devices and systems over the Internet or other communication networks. The IoT encompasse ...
(IoT) support, specifically for
Amazon Web Services
Amazon Web Services, Inc. (AWS) is a subsidiary of Amazon.com, Amazon that provides Software as a service, on-demand cloud computing computing platform, platforms and Application programming interface, APIs to individuals, companies, and gover ...
. Since version 10.0.0 in 2017, Amazon has taken stewardship of the FreeRTOS code, including any updates to the original kernel.
SAFERTOS
SAFERTOS was developed as a complementary version of FreeRTOS, with common functions, but designed for safety-critical implementation. FreeRTOS was subject to
hazard and operability study (HAZOP), and weaknesses were identified and resolved. The result was put through a full
IEC 61508 SIL 3 development lifecycle, the highest level for a software-only component.
SAFERTOS was developed by Wittenstein High Integrity Systems, in partnership with Real Time Engineers Ltd, primary developer
[ of the FreeRTOS project.] Both SAFERTOS and FreeRTOS share the same scheduling algorithm, have similar application programming interfaces (API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
s), and are otherwise very similar, but they were developed with differing objectives.[Relationship between FreeRTOS and SAFERTOS](_blank)
/ref> SAFERTOS was developed solely in the C language to meet requirements for certification to IEC61508.
SAFERTOS can reside solely in the on-chip read-only memory
Read-only memory (ROM) is a type of non-volatile memory used in computers and other electronic devices. Data stored in ROM cannot be electronically modified after the manufacture of the memory device. Read-only memory is useful for storing sof ...
(ROM) of a microcontroller for standards compliance. When implemented in hardware memory, SAFERTOS code can only be used in its original, certified configuration. This means certifying a system needs no retesting of the kernel portion of a design. SAFERTOS is included in the ROM of some Stellaris Microcontrollers[TI Stellaris Product range](_blank)
/ref> from Texas Instruments. SAFERTOS source code does not need to be separately purchased. In this usage scenario, a C header file is used to map SAFERTOS API functions to their location in read-only memory.
OPENRTOS
OPENRTOS is a commercially licensed version of Amazon FreeRTOS, sold by Wittenstein High Integrity Systems. This product provides support and allows companies to use the Amazon FreeRTOS kernel and libraries without the a:FreeRTOS MIT license.
See also
* Embedded operating system
References
External links
*
{{Microkernel
Amazon Web Services
ARM operating systems
Embedded operating systems
Free software operating systems
Microkernel-based operating systems
Microkernels
Real-time operating systems
X86 operating systems