Fact-checked by Grok 2 weeks ago

FreeRTOS

FreeRTOS is a (RTOS) designed for microcontrollers and small microprocessors, providing essential functionality for applications with strict timing requirements. It features a small , enabling efficient operation on resource-constrained devices. Distributed under the permissive open source license, FreeRTOS supports over 40 processor architectures, including , , and AVR, and is compatible with more than 15 toolchains. Its core components include preemptive priority-based task scheduling, inter-task communication primitives such as queues, semaphores, and mutexes, as well as software timers and event groups for synchronization. Developed by Richard Barry and first released in 2003, FreeRTOS quickly gained popularity for its portability, reliability, and ease of integration into projects. Initially maintained by Real Time Engineers Ltd., the project saw stewardship transferred to (AWS) in late 2017, under which it has received ongoing enhancements, including support for (SMP) and integration with AWS services. The current stable version is 11.2.0 (March 2025). Today, FreeRTOS is a in the industry, downloaded every 170 seconds on average and trusted by leading companies and device manufacturers across sectors like automotive, consumer electronics, and industrial automation. Beyond the , FreeRTOS includes a suite of open-source libraries implementing standards for connectivity (e.g., TCP/IP with support), (e.g., TLS and device shadowing), and over-the-air () updates, all optimized for low-power edge devices. It emphasizes deterministic behavior, with features like tickless low-power modes to extend battery life, and undergoes rigorous testing, including certifications for standards such as SESIP Level 2 and Level 1. (LTS) releases provide at least two years of bug fixes and updates, ensuring stability for production deployments.

Introduction

Overview

FreeRTOS is a market-leading real-time operating system (RTOS) kernel designed specifically for microcontrollers and small microprocessors in embedded systems. It provides essential services such as multitasking, scheduling, inter-task communication, and memory management, enabling developers to create deterministic applications that meet strict timing requirements in resource-constrained environments. Unlike general-purpose operating systems, FreeRTOS prioritizes low overhead and predictability, making it ideal for applications in IoT devices, industrial controls, automotive systems, and consumer electronics where real-time performance is critical. The kernel's architecture emphasizes simplicity and portability, supporting over 40 processor architectures, including , , and , with a minimal often under 10 for core functionality. It implements a preemptive priority-based scheduler that ensures higher-priority tasks execute promptly, while offering features like mutexes, semaphores, and queues for and data exchange between tasks. FreeRTOS has gained widespread adoption due to its reliability, extensive community support, and integration with development tools from vendors like and NXP. Distributed freely as under the permissive , FreeRTOS allows modification and commercial use without royalties, though optional long-term support (LTS) releases and safety certifications (such as SIL 3 and ASIL D) are available for mission-critical applications. Since its acquisition by in 2017, FreeRTOS has evolved to include cloud connectivity libraries, enhancing its role in edge-to-cloud ecosystems while maintaining for legacy projects.

Licensing and Availability

FreeRTOS is distributed under the MIT open source license, which permits users to freely use, copy, modify, merge, publish, distribute, sublicense, and sell copies of the software, subject to including the and permission notice in all copies or substantial portions of the software. This permissive license has no royalty or other fees associated with its use, making it suitable for both commercial and non-commercial applications without requiring disclosure of modifications. The FreeRTOS kernel and associated libraries are available for free download from the official website, freertos.org, where users can access the latest releases, pre-configured demos, and documentation. It supports over 40 microcontroller architectures, including ARM Cortex-M, RISC-V, and others, along with more than 15 compiler toolchains, enabling broad portability across embedded systems. Long-term support (LTS) versions provide two years of updates and bug fixes, ensuring stability for production deployments. For users requiring commercial licensing and indemnification, Wittenstein High Integrity Systems offers OPENRTOS, a commercially licensed variant based on FreeRTOS with additional support services. For safety certifications such as SIL 3 and ASIL D, they provide SAFERTOS, a certified derivative compatible with the open-source .

History

Origins and Early Development

FreeRTOS originated from the work of Richard Barry, who began developing the in 2002 as a lightweight, open-source (RTOS) for applications. Barry founded the project through his company, Real Time Engineers Ltd., with the goal of providing a simple and portable alternative to commercial RTOS options that were often overly complex or resource-intensive for small-scale devices. The initial focus was on creating a that could run on microcontrollers with limited and processing power, emphasizing ease of use and broad compatibility. Early development prioritized core functionality, including preemptive priority-based task scheduling and basic inter-task communication mechanisms such as queues and semaphores. The was structured to be highly modular, allowing developers to port it to different architectures by implementing architecture-specific . Initial targeted popular 8- and 16-bit microcontrollers, with the kept under 10,000 lines to ensure and minimal —typically resulting in binaries smaller than 10 . By 2003, the first public version was released under a permissive (GPL with a static linking exception), enabling its integration into both open and proprietary projects without licensing fees. In its formative years, FreeRTOS evolved through community feedback and Barry's iterative improvements, addressing key challenges in systems. Early versions utilized a allocation scheme for , which provided predictable allocation times suitable for constraints but was later supplemented with configurable implementations for greater flexibility. This period saw rapid expansion in supported platforms, growing from a handful of initial ports to over a dozen architectures by the mid-2000s, laying the foundation for its widespread adoption in , industrial controls, and prototypes.

Acquisition by AWS and Modern Evolution

In November 2017, (AWS) assumed stewardship of the FreeRTOS project from its original maintainer, Real Time Engineers Ltd., with founder Richard Barry joining AWS as a principal engineer to guide its ongoing development. This transition marked a pivotal shift, as AWS launched Amazon FreeRTOS as an extension of the core open-source kernel, incorporating AWS-specific libraries to facilitate secure connectivity for microcontroller-based devices. The kernel itself remained freely available under the permissive , ensuring continued open-source accessibility while enabling seamless integration with AWS IoT services. Post-acquisition, FreeRTOS evolved into a more comprehensive operating system, emphasizing and cloud-native features to address the growing demands of . Key enhancements included the addition of over-the-air () update capabilities through the AWS Jobs service, allowing remote firmware deployments without manual intervention, and built-in support for mutual TLS to bolster device security. These developments simplified the deployment of billions of low-power devices, with Amazon FreeRTOS providing pre-integrated libraries for messaging, device shadows, and data encryption, all optimized for resource-constrained environments. By 2018, initial ports and demos were expanded to support major microcontroller vendors like and Microchip, accelerating adoption in industrial and consumer applications. Under AWS management, FreeRTOS has seen sustained innovation through regular releases and initiatives. The advanced to version 11.2.0 in March 2025, introducing refinements in multi-core scheduling, improved interrupt handling, and enhanced portability across over 40 architectures, from to . In October 2025, the FreeRTOS (LTS) libraries were updated to version 202406.xx, offering extended maintenance patches for critical components like / stacks and secure sockets, thereby minimizing vulnerabilities and ensuring stability for production systems over multi-year deployments. remains a , with ongoing patches addressing high-severity issues in the and libraries, such as a critical FreeRTOS+TCP vulnerability resolved in June 2024. As of late 2025, FreeRTOS powers a vast ecosystem of devices, with AWS continuing to invest in its for features like advanced at the edge and deeper integration with services like AWS Greengrass.

Implementation

Kernel Architecture

The FreeRTOS kernel is a compact, real-time operating system kernel designed for embedded microcontrollers, emphasizing efficiency, determinism, and minimal resource usage. It employs a preemptive priority-based scheduler that ensures higher-priority tasks execute before lower-priority ones, supporting up to 32 configurable priority levels to facilitate real-time responsiveness. The kernel's architecture is modular, separating architecture-independent core logic from hardware-specific adaptations, which enables portability across over 40 processor architectures. This design prioritizes simplicity, with the entire kernel typically compiling to a binary size of 4,000 to 9,000 bytes, making it suitable for resource-constrained environments. At its core, the is implemented in just three primary source files that form the foundation of its functionality: tasks.c, which manages task creation, suspension, deletion, and the scheduler; queue.c, which implements inter-task communication primitives such as , semaphores, and mutexes; and list.c, which provides doubly-linked list data structures used extensively for ready lists, delayed task lists, and queue management. These files contain the portable, architecture-agnostic portions of the kernel, ensuring that the bulk of the logic remains consistent across ports. Optional modules, such as timers.c for software timers and croutine.c for co-routines, can be included to extend capabilities without altering the core structure. The kernel operates in a single , integrating all services directly, which contributes to its low overhead and predictable behavior in interrupt-driven environments. Portability is achieved through a dedicated port layer, organized in the portable directory under subfolders for each compiler and architecture (e.g., GCC/ARM_CM4F). This layer includes port.c for assembly or C implementations of critical functions like context switching, interrupt management, and stack initialization, alongside portmacro.h for architecture-specific macros defining stack growth direction, interrupt priorities, and entry/exit. Configuration is further customized via FreeRTOSConfig.h, allowing users to enable or disable features like preemption, tickless idle mode for power savings, or (SMP) support for multi-core systems. This separation ensures that porting involves minimal changes, primarily to the port layer, while preserving the kernel's deterministic scheduling and primitives. Recent enhancements include static memory allocation options, eliminating runtime usage for safety-critical applications.

Task Management

In FreeRTOS, tasks represent the fundamental units of execution within an application, functioning as lightweight threads managed by the scheduler. Each task operates independently with its own execution , including a dedicated for storing local variables, function parameters, and CPU registers during context switches. The ensures that only one task executes on a at any given time, swapping tasks in and out based on priority and state to achieve deterministic behavior suitable for systems. Tasks are created dynamically using the xTaskCreate function, which allocates memory for the task control block () and stack from the (or statically if using xTaskCreateStatic). The signature is:
BaseType_t xTaskCreate( TaskFunction_t pxTaskCode,
                        const char * const pcName,
                        const configSTACK_DEPTH_TYPE usStackDepth,
                        void * const pvParameters,
                        UBaseType_t uxPriority,
                        TaskHandle_t * const pxCreatedTask );
Here, pxTaskCode points to the task's entry , pcName provides a descriptive string (up to configMAX_TASK_NAME_LEN characters), usStackDepth specifies the stack size in words, pvParameters passes data to the task, and uxPriority sets the initial (ranging from 0 for the lowest to configMAX_PRIORITIES - 1 for the highest). Upon success, it returns pdPASS and optionally a TaskHandle_t via pxCreatedTask for later ; failure returns errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY. Tasks must be created before the scheduler starts via vTaskStartScheduler. FreeRTOS tasks can exist in one of five states: Running, Ready, Blocked, Suspended, or Deleted, with the managing transitions to ensure efficient resource use and responsiveness. A task enters the Running state when it is actively executing on the ; on single-core systems, only one task can be Running at a time. The Ready state indicates a task is eligible to run but yields to a higher-priority Running task, placed in a priority-based ready list for quick selection. In the Blocked state, a task awaits an event (such as a or ) or a time delay, consuming no and including a configurable timeout; upon expiration or event occurrence, it moves to Ready if its priority allows. The Suspended state explicitly halts a task indefinitely without timeout, often for power saving or , requiring manual resumption. Finally, the Deleted state occurs post-termination, freeing the and stack (if dynamic allocation was used). Transitions are triggered by calls, interrupts, or scheduler decisions, with the eTaskGetState function querying a task's current (enabled via INCLUDE_eTaskGetState in FreeRTOSConfig.h). Task priorities drive management decisions, with higher numerical values indicating higher urgency (e.g., priority 0 for the task). The uses , ensuring the highest-priority Ready or Running task always executes, while equal-priority tasks may share time via if configUSE_TIME_SLICING is enabled. Priorities can be queried with uxTaskPriorityGet or changed via vTaskPrioritySet, but alterations require caution to avoid disrupting guarantees. For , mutexes support basic inheritance to mitigate inversion, temporarily boosting a low-priority task's effective priority to match a blocked higher-priority one. Key control functions enable runtime management. Delays are implemented with vTaskDelay(xTicksToDelay), which blocks the calling task (typically NULL for self) for at least the specified ticks relative to the call time, or vTaskDelayUntil for periodic execution at fixed intervals, both leveraging the system tick interrupt for precision. Suspension via vTaskSuspend(xTaskToSuspend) moves a task to the Suspended state, preventing scheduling until vTaskResume(xTaskToResume) restores it to Ready (if not Blocked). Deletion with vTaskDelete(xTaskToDelete) removes a task from all kernel lists, cleans up resources, and transfers control to the highest-priority Ready task; calling with NULL self-deletes the current task, though this should be the last action in the task function to avoid undefined behavior. Stack usage is monitored via uxTaskGetStackHighWaterMark, returning the minimum free stack words since creation to aid debugging and prevent overflows. Handles (TaskHandle_t) reference tasks for these operations, obtained at creation or via functions like xTaskGetCurrentTaskHandle. All APIs require appropriate config options (e.g., INCLUDE_vTaskDelayUntil) and are thread-safe except where noted.

Scheduling and Synchronization

FreeRTOS employs a as its core mechanism for , ensuring that the highest-priority ready task executes immediately upon becoming runnable, preempting any lower-priority tasks in progress. This approach supports requirements by minimizing latency for critical tasks, with task priorities ranging from 0 (lowest) to configMAX_PRIORITIES - 1 (highest), configurable at compile time. Preemption is enabled by default via the configUSE_PREEMPTION ; when disabled, the operates in cooperative mode, where tasks yield control voluntarily using functions like taskYIELD(). For tasks of equal priority, time-slicing can be applied, cycling execution every tick period if configUSE_TIME_SLICING is set to 1, promoting fairness without compromising . In single-core configurations, the scheduler maintains a ready list sorted by , selecting the highest- task for execution during each , typically triggered by tick interrupts, task delays, or blocking calls. Asymmetric multiprocessing (AMP) extends this by running independent FreeRTOS instances on separate cores, each with its own scheduler, allowing isolated execution but requiring explicit inter-core communication for coordination. (SMP), introduced in FreeRTOS version 11.0.0, utilizes a single instance to schedule tasks across multiple cores, enabling concurrent execution of tasks from different levels—one per core—while supporting core affinity to pin tasks to specific cores via vTaskCoreAffinitySet(). This SMP model enhances throughput on multicore hardware without altering the fundamental -based algorithm. Synchronization in FreeRTOS is achieved through lightweight primitives designed for constraints, primarily s, mutexes, queues, and event groups, which facilitate inter-task communication and resource protection. Binary s serve as signaling mechanisms, allowing a task or to "give" the (setting it to available) to unblock a waiting task that "takes" it, ideal for -driven such as notifying a task of peripheral activity. Unlike binary s, counting s maintain a to track multiple instances of an or resource, incrementing on "give" and decrementing on "take," with the initial count reflecting available resources or pending s. Mutexes, implemented as binary semaphores with priority inheritance, prevent by temporarily boosting the priority of a low-priority task holding the mutex if a higher-priority task attempts to acquire it, ensuring bounded blocking times. This inheritance mechanism releases the boost only after the mutex is freed, simplifying while avoiding unbounded inversion chains. Queues provide buffered inter-task communication, acting as both points (tasks block until is available or space exists) and data conduits, with optional priority inheritance for mutex-like behavior. Event groups enable efficient multi-bit flag , allowing tasks to wait for combinations of events using xEventGroupWaitBits() or synchronize multiple tasks at a rendezvous point via xEventGroupSync(), where each task sets its bit and waits for all others, optimizing for scenarios like coordinated startup sequences. All primitives support interrupt-safe variants (e.g., xSemaphoreGiveFromISR()) to handle asynchronous events without disabling interrupts for extended periods.

Memory Management

FreeRTOS employs dynamic memory allocation to provision resources for kernel objects such as tasks, queues, mutexes, and semaphores, drawing from a dedicated heap managed by the kernel itself. This approach allows flexibility in resource usage but introduces considerations like fragmentation and determinism, which are critical in real-time embedded systems. The kernel provides five distinct heap implementation schemes—labeled heap_1 through heap_5—each varying in complexity, features, and suitability for different applications. Additionally, FreeRTOS supports static memory allocation as an alternative to enhance predictability, configurable via options in the FreeRTOSConfig.h header file. The choice between static and dynamic allocation is controlled by the configuration parameters configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION, which can be enabled independently or together. Static allocation pre-allocates for objects at , ensuring deterministic behavior and avoiding allocation failures, but it may increase the overall . Dynamic allocation, in contrast, uses the for on-demand requests via functions like pvPortMalloc() and vPortFree(), reducing waste in systems with variable resource needs but risking fragmentation over time. For objects, dynamic allocation is the default, where creating a task with xTaskCreate() or a queue with xQueueCreate() internally calls pvPortMalloc() to obtain the necessary blocks. The five heap schemes differ primarily in their handling of allocation, deallocation, fragmentation, and determinism, as summarized in the following table:
SchemeAllocation MethodDeallocation SupportFragmentation HandlingDeterminismKey Use Cases and Limitations
heap_1Subdivides a contiguous array of size configTOTAL_HEAP_SIZE using a simple next-fit approach.None (vPortFree() is a no-op).None, as no freeing occurs.Fully deterministic; allocation time is constant.Ideal for small, simple systems where tasks and objects are never deleted; lacks flexibility for dynamic lifecycles.
heap_2Best-fit search within the same contiguous array as heap_1.Supported, but without coalescing adjacent free blocks.High risk due to no merging of freed blocks, leading to external fragmentation.Non-deterministic due to search overhead.Rarely recommended; superseded by heap_4 for systems needing basic freeing, but fragmentation limits long-term use.
heap_3Wraps the standard C library's malloc() and free(), with thread safety achieved by suspending the scheduler during calls.Fully supported via free().Depends on the underlying malloc() implementation; often prone to fragmentation.Non-deterministic, as it relies on compiler-specific library behavior.Suitable for porting existing code or when standard library integration is needed; heap size is linker-defined, not configTOTAL_HEAP_SIZE. Avoid in strict real-time scenarios due to variability.
heap_4First-fit algorithm on a contiguous array, similar to heap_1/2.Supported, with coalescing of adjacent free blocks on free.Reduced through block merging, though external fragmentation can still occur.Mostly deterministic but allocation time varies with list traversal.Recommended for most dynamic allocation needs; faster than standard malloc() and balances efficiency with fragmentation control.
heap_5Extends heap_4 with support for multiple non-contiguous memory regions, initialized via vPortDefineHeapRegions().Supported, with coalescing within each region.Handled per region, similar to heap_4; no cross-region coalescing.Similar to heap_4, with added initialization overhead.Best for systems with disjoint RAM areas (e.g., external memory); requires pre-defining regions in a HeapRegion_t array. Most feature-rich but complex to set up.
Each scheme is implemented in a separate source file (heap_n.c) within the FreeRTOS portable directory, and only one is compiled into the application by including the corresponding file. Custom heap implementations are also possible by providing user-defined pvPortMalloc() and vPortFree() functions, allowing with proprietary allocators or hardware-specific controllers. To monitor heap usage, FreeRTOS offers functions such as xPortGetFreeHeapSize() for current free bytes (available in _1, 2, 4, and 5) and xPortGetMinimumEverFreeHeapSize() for the lowest free level since boot (_4 and 5 only). More detailed statistics, including fragmentation metrics, are accessible via vPortGetHeapStats() in _4 and 5, populating a HeapStats_t structure. If an allocation fails, the optional vApplicationMallocFailedHook() callback can be implemented when configUSE_MALLOC_FAILED_HOOK is enabled, allowing custom error handling. For task stacks, applications can override allocation with pvPortMallocStack() and vPortFreeStack() macros to use specialized memory, such as faster . Best practices emphasize selecting a heap scheme based on system requirements: heap_1 or static allocation for maximum determinism in safety-critical applications, heap_4 for general dynamic use, and heap_5 for complex memory topologies. Enabling configCHECK_FOR_STACK_OVERFLOW and tracking task memory with configTRACK_TASK_MEMORY_ALLOCATIONS further aids in preventing exhaustion. Fragmentation should be monitored in production, as repeated allocate-free cycles in heap_2 or 3 can lead to allocation failures despite sufficient total free memory.

Key Features

Real-Time Capabilities

FreeRTOS provides capabilities through its priority-based preemptive scheduler, which ensures that higher-priority tasks execute before lower-priority ones, enabling predictable and timely responses in embedded systems. The scheduler operates on a fixed-priority model with up to 32 priority levels (configurable via configMAX_PRIORITIES), where the highest-priority ready task always runs, preempting lower-priority tasks immediately upon becoming ready. This preemption occurs not only through explicit yields but also via interrupt service routines (ISRs) that unblock higher-priority tasks, minimizing response times to critical events. To maintain , FreeRTOS avoids non-deterministic operations in time-critical paths, such as dynamic memory allocation during scheduling or execution; instead, it supports static allocation of objects to eliminate runtime heap fragmentation and variability. The system's tick , configurable via configTICK_RATE_HZ (typically 1000 Hz for a 1 resolution), provides the timing basis for , timeouts, and task switching, ensuring consistent periodicity without excessive overhead. Tickless further enhances in low-activity periods by suppressing unnecessary ticks while preserving timing accuracy through functions like vTaskStepTick(). Priority inheritance in mutexes prevents unbounded , where a low-priority task holding a could indefinitely block a high-priority one, thus upholding guarantees. Interrupt latency is optimized by categorizing interrupts into those that can safely call FreeRTOS APIs (below configMAX_SYSCALL_INTERRUPT_PRIORITY) and higher-priority ones that execute without kernel interference, ensuring minimal disruption to real-time deadlines. ISR-safe APIs, such as xSemaphoreGiveFromISR(), allow interrupts to signal tasks efficiently, potentially triggering immediate context switches if a higher-priority task is unblocked, with the return value indicating the need for rescheduling. This design supports hard real-time applications by keeping scheduler overhead low—typically just a few microseconds on common microcontrollers—and avoiding time-slicing (configurable via configUSE_TIME_SLICING) for equal-priority tasks in strict scenarios to eliminate slicing-induced jitter. In symmetric multiprocessing (SMP) configurations, the scheduler extends these capabilities across cores, allowing concurrent execution of tasks at different priorities for scalable real-time performance. Overall, FreeRTOS's real-time features emphasize simplicity and configurability, enabling developers to meet deadlines in resource-constrained environments like devices and industrial controls, provided tasks are designed to block on events rather than busy-wait, preventing CPU waste and ensuring scalability.

Portability and Supported Architectures

FreeRTOS achieves high portability through a modular that separates the core functionality, written in standard , from hardware-specific implementations. The 's portable layer contains architecture-independent code for , scheduling, and , while the port layer provides compiler- and processor-specific adaptations for critical operations such as context switching, interrupt handling, and definitions. This design allows developers to adapt FreeRTOS to new microcontrollers by implementing only the port layer, typically involving files like port.c and portmacro.h, without modifying the core . The source code organization reinforces this portability: the portable layer resides in FreeRTOS/Source, encompassing files such as tasks.c, queue.c, and list.c that handle generic RTOS operations. In contrast, the port layer is located in FreeRTOS/Source/portable/[Compiler]/[Architecture], where each subdirectory tailors the RTOS to a specific combination of compiler (e.g., GCC, IAR Embedded Workbench) and processor family. This structure supports integration with various integrated development environments (IDEs) and build tools, including Eclipse-based systems, by providing demo applications that demonstrate configuration for each port. Additionally, FreeRTOS includes five heap management schemes in FreeRTOS/Source/portable/MemMang (e.g., heap_1.c to heap_5.c), allowing customization of dynamic memory allocation to suit different hardware constraints. FreeRTOS officially supports over 40 architectures, spanning a wide range of systems from 8-bit microcontrollers to 64-bit application processors, with compatibility for approximately 20 compilers. Official ports are maintained by Real Time Engineers Ltd. (the original developers, now under ), ensuring reliability and ongoing updates, while contributed ports from third parties extend support further but may vary in maintenance. Key supported architecture families include ARM-based processors such as Cortex-M0/M0+/M3/M4/M7/M23/M33, Cortex-A5/A9/A53/R5, and legacy /; implementations like SiFive RV32 and Microsemi Mi-V; 8/16/32-bit families from vendors including Microchip (PIC24/dsPIC, PIC32), NXP (LPC series), Renesas (RX, RL78, ), STMicroelectronics (), Texas Instruments (MSP430, MSP432, Stellaris), and Infineon (XMC, AURIX); as well as others like Altera , Cadence Xtensa, CEVA cores, x86 (including Win32 simulation), and Xilinx /Zynq. These ports are adaptable to specific microcontroller variants within each family, with demo projects provided to facilitate initial setup and testing. This extensive architectural coverage, combined with the layered portability model, enables FreeRTOS to run on diverse platforms, from low-power devices to high-performance automotive and systems, while maintaining a minimal —typically under 10 for the . to unsupported architectures follows a documented , focusing on implementing interrupt-safe critical sections, timer setup, and stack alignment, often achievable in a few weeks for experienced developers.

Integrated Libraries and Tools

FreeRTOS extends its core kernel through a collection of integrated libraries and tools, designed to facilitate the development of applications with features like networking, , , and . These components are MIT-licensed, portable across supported architectures, and optimized for low-resource microcontrollers, enabling seamless integration into and systems. The libraries are divided into categories such as Core Libraries for standards-based functionality, FreeRTOS+ for kernel-specific extensions, and experimental Labs projects, while tools focus on , tracing, and utilities.

Core Libraries

The Core Libraries provide foundational implementations of open standards for connectivity, security, and data handling, suitable for microcontroller-based devices interfacing with cloud services like . They emphasize modularity, with no dependencies on specific hardware or the FreeRTOS kernel beyond basic abstractions, allowing reuse in other environments. Key examples include:
  • coreMQTT: A lightweight 3.1.1 client library that supports publish-subscribe messaging over , optimized for constrained devices with features like session persistence and quality-of-service levels. It enables efficient communication in scenarios without requiring a full TCP/IP stack.
  • coreHTTP: An HTTP/1.1 client library compliant with 7230-7235 standards, supporting request-response patterns for secure web interactions, including via integration with transport layers. It handles parsing and serialization for headers, bodies, and chunked transfers.
  • corePKCS11: Implements the v2.40 cryptographic token interface standard, providing hardware abstraction for keys, certificates, and operations like signing and encryption, often integrated with hardware security modules (HSMs).
  • coreJSON: A minimal parser and generator adhering to 8259, capable of validating, searching, and appending to JSON documents in memory-constrained settings without dynamic allocation.
  • coreSNTP: A simple client for synchronizing device clocks with NTP servers, essential for time-sensitive operations.
  • AWS IoT Libraries (e.g., , Device Shadow, , Device Defender): Specialized libraries for AWS integration, such as the Over-the-Air () library for secure updates via , Device Shadow for state synchronization, Jobs for remote management, and Device Defender for anomaly detection and security alerts, all built on core libraries for authentication and messaging.
These libraries are part of the (LTS) releases, ensuring stability and security updates for at least two years.

FreeRTOS+ Libraries

FreeRTOS+ libraries offer enhanced functionality tightly coupled to the FreeRTOS , providing practical tools for common needs like networking and file management. They depend on the for threading and but remain lightweight and configurable.
LibraryDescription
FreeRTOS-Plus-TCPA thread-safe, dual TCP/IP stack with BSD sockets , supporting protocols like DHCP, DNS, and ICMP; designed for applications with low and small footprint.
FreeRTOS-Plus-CLIA parser that processes user input via UART or TCP, allowing runtime configuration and through simple text commands.
FreeRTOS-Plus-FATA FAT12/16/32 implementation with read/write support, including long file names and partitioning, suitable for cards and USB storage in systems.
FreeRTOS-Plus-TraceA tracing using macros to record events (e.g., task switches, interrupts) into a , exportable for analysis; integrates with tools like Percepio Tracealyzer for .
These libraries are included in LTS packages and have been battle-tested in commercial deployments, with options for extensions in Labs variants.

Tools and Utilities

FreeRTOS integrates utilities within the and libraries for development and runtime support, focusing on ease of use without external dependencies. Kernel-level task utilities include functions like vTaskList() for runtime task status reporting and uxTaskGetStackHighWaterMark() for monitoring stack usage, aiding in and optimization. Configuration tools, such as the FreeRTOS Config (part of download packages), generate portable FreeRTOSConfig.h files tailored to and requirements. For advanced , the built-in tracing macros support with third-party tools, but core utilities like the heap monitoring APIs (e.g., xPortGetFreeHeapSize()) provide essential runtime insights directly. AWS-specific tools, like the FreeRTOS console for qualified device management, further streamline and certification. Labs projects, such as FreeRTOS-Plus-POSIX for portability and MCUBoot for secure bootloading, represent experimental tools evolving toward core integration, offering previews of future capabilities like over-the-air updates via Delta mechanisms.

Derivatives

Amazon FreeRTOS

Amazon FreeRTOS is a for microcontrollers, developed by (AWS) as an extension of the original FreeRTOS kernel to facilitate secure connectivity and management of (IoT) devices. Announced on November 29, 2017, at the AWS re:Invent conference, it builds on the open-source FreeRTOS foundation created by Richard Barry in 2003, with Barry joining AWS to lead its enhancement. The system integrates the core FreeRTOS kernel—distributed under the open-source license—with AWS-specific libraries for connectivity, security, and over-the-air () updates, enabling low-power edge devices to connect easily to the AWS cloud. Key additions include pre-built libraries for protocols like and secure sockets, support for TLS , and with AWS Core for device provisioning, data ingestion, and remote management. Unlike the standard FreeRTOS, which focuses primarily on kernel-level real-time operations, Amazon FreeRTOS emphasizes scalability by qualifying hardware from partners such as , Microchip, , and , and providing demo applications for . It also introduces FreeRTOS (LTS) for stable releases and an Extended Maintenance Plan (EMP) for extended security patching, addressing the needs of billions of connected devices. In 2020, FreeRTOS was rebranded simply as FreeRTOS to reflect its broader adoption beyond AWS-specific use cases, while maintaining the same kernel and libraries; the project remains hosted on under AWS stewardship, with contributions from the community. This evolution has made it a market-leading RTOS, downloaded approximately every 170 seconds as of recent documentation.

SAFERTOS

SAFERTOS is a pre-certified (RTOS) designed for safety-critical applications, developed by WITTENSTEIN high integrity systems under license from Real Time Engineers Ltd., the creators of FreeRTOS. It adopts the functional model of the FreeRTOS kernel, including its structure for tasks, queues, semaphores, and mutexes, but features a complete redesign of the underlying implementation to meet stringent requirements without altering the user-facing . This allows developers familiar with FreeRTOS to migrate applications with minimal code changes while gaining safety certifications. SAFERTOS has undergone independent certification by TÜV SÜD to SIL 3, confirming its development processes and design rigor for 3 applications in and process control systems. It is also pre-certified to ASIL D for automotive applications, supports for , for medical devices, and FDA 510(k) compliance, making it suitable for high-risk environments where failure could lead to loss of life, injury, or significant environmental damage. These certifications reduce the certification burden for end-product developers by providing verifiable safety evidence, including safety manuals and analysis reports. Key features of SAFERTOS emphasize , robustness, and for safety-critical use. It employs a preemptive priority-based scheduler that ensures predictable task execution times, with no dynamic memory allocation to prevent fragmentation and runtime errors common in safety contexts. Task stacks are statically allocated and protected with spatial separation via units (MPUs) on supported hardware, isolating faults to individual tasks without system-wide crashes. Additional safeguards include runtime detection, assertion checking, and support for ultra-low power modes, enabling applications in battery-powered devices. SAFERTOS supports multicore processors, typically running safety-critical tasks on a dedicated core while isolating faults, but does not provide (SMP). These elements contribute to its small footprint—typically under 10 KB of ROM and minimal RAM—while delivering high performance for complex systems. As of November 2025, SAFERTOS aligns with FreeRTOS kernel updates up to version 10.x, with adaptations for safety certification.

OPENRTOS

OPENRTOS is a commercially licensed variant of the FreeRTOS kernel, developed and distributed by WITTENSTEIN high integrity systems to provide embedded developers with a (RTOS) free from open-source licensing constraints. It maintains functional equivalence to the core FreeRTOS scheduler and while offering enhanced commercial terms, including indemnification against claims and exclusion of open-source code obligations. This makes OPENRTOS suitable for applications requiring development without the modified GPL references present in earlier FreeRTOS versions. The OPENRTOS kernel is updated in parallel with Amazon FreeRTOS, ensuring compatibility with the latest FreeRTOS enhancements under the . It supports the same preemptive priority-based scheduling, task management, and synchronization primitives as FreeRTOS, with a compact optimized for resource-constrained microcontrollers. Typical usage ranges from 4 to 9 kB, RAM from 250 bytes, and per-task stack from 400 bytes, allowing deployment on devices with limited memory. Middleware components, such as / stacks and file systems, are available under the same commercial umbrella if needed. Licensing for OPENRTOS is perpetual and royalty-free, supplied as full source code with no runtime fees. Standard options include production licenses starting at basic kernel access, scaling to comprehensive packages with middleware and custom porting services. Unlike the open-source FreeRTOS, OPENRTOS includes a 12-month warranty covering updates, maintenance, and technical support, extendable through subscription. Professional services encompass board support packages, processor porting, and integration assistance, targeting industries like automotive and industrial automation. While not safety-certified itself—unlike the related SAFERTOS variant—OPENRTOS provides a foundation for custom certification efforts in safety-critical environments. As of November 2025, OPENRTOS aligns with FreeRTOS kernel updates up to version 10.x for commercial stability.

References

  1. [1]
    FreeRTOS™ - FreeRTOS™
    FreeRTOS is a real-time operating system for microcontrollers, supporting 40+ architectures with a small memory footprint, and is open-source.Download FreeRTOS · About FreeRTOS · Supported Devices · Forums
  2. [2]
    The FreeRTOS™ Kernel
    FreeRTOS is a market-leading real-time operating system for microcontrollers and small microprocessors. Distributed freely under the MIT open source license.
  3. [3]
    FreeRTOS Kernel Developer Docs - FreeRTOS™
    **Summary of FreeRTOS Features (Based on https://www.freertos.org/features.html):**
  4. [4]
    Creator of FreeRTOS talks to Electronics Weekly
    May 14, 2010 · Richard Barry, head of innovation at Wittenstein High Integrity Systems and creator of FreeRTOS.org, talks to Electronics Weekly about important ...
  5. [5]
    Amazon FreeRTOS - Silicon Labs
    Development and maintenance responsibilities for FreeRTOS were officially taken over by Amazon in late 2017. Since that time, Amazon has expanded the ...Missing: Ltd acquisition
  6. [6]
    FreeRTOS Core Libraries
    FreeRTOS Core libraries implement open standards for connectivity, security, and related functionality, suitable for smart microcontroller-based devices ...
  7. [7]
    Security overview - FreeRTOS™
    FreeRTOS uses strict coding standards, code quality checks, and simpler memory protection. It has SESIP Level 2 and PSA Level 1 certifications.Missing: key | Show results with:key
  8. [8]
  9. [9]
    RTOS Fundamentals - FreeRTOS™
    A Real-Time Operating System (RTOS) is a small, deterministic OS used in embedded systems needing strict time constraints, and is smaller than general purpose ...
  10. [10]
  11. [11]
    FreeRTOS FAQ - Licensing
    I require a commercial license, is there anything available? Yes. OPENRTOS from WITTENSTEIN high integrity systems provides a commercial license for FreeRTOS.
  12. [12]
  13. [13]
    The Architecture of Open Source Applications (Volume 2)FreeRTOS
    FreeRTOS is under active development, and has been since Richard Barry started work on it in 2002. As for me, I'm not a developer of or contributor to FreeRTOS, ...
  14. [14]
    Announcing Amazon FreeRTOS – Enabling Billions of Devices to ...
    Nov 29, 2017 · Amazon FreeRTOS is an IoT microcontroller operating system that simplifies development, security, deployment, and maintenance of microcontroller-based edge ...
  15. [15]
    Real-Time Operating System - FreeRTOS - AWS
    ### Summary of Amazon FreeRTOS (as of 2025)
  16. [16]
  17. [17]
  18. [18]
  19. [19]
    Security Vulnerabilities - FreeRTOS™
    Security Updates ; 06/04/2025, High, FreeRTOS+TCP ; 06/17/2024, Critical, FreeRTOS+TCP ; 11/29/2023, High, FreeRTOS Kernel ; 09/16/2022, High, FreeRTOS Kernel (MPU ...
  20. [20]
    Smarter Devices at the Edge: A Conversation with FreeRTOS ...
    Aug 13, 2025 · • Richard Barry, creator of FreeRTOS and head of IoT technology strategy at AWS ... Not exactly sure when the first kind of mark in history is ...
  21. [21]
    FreeRTOS kernel fundamentals - AWS Documentation
    The FreeRTOS kernel is a real-time operating system that supports numerous architectures. The fundamentals of it are ideal for building embedded microcontroller ...
  22. [22]
    Creating a New FreeRTOS Port
    The FreeRTOS kernel source code is generally contained within 3 source files (4 if co-routines are used) that are common to all ports, and one or two 'port' ...
  23. [23]
    Source Organization - FreeRTOS™
    The directory structure is however very simple, and the FreeRTOS real time kernel is contained in just 3 files (additional files are required if software timer, ...
  24. [24]
    Customization - FreeRTOS™
    FreeRTOS is customized using a configuration file called FreeRTOSConfig.h. Every FreeRTOS application must have a FreeRTOSConfig.h header file in its pre- ...
  25. [25]
    Tasks and Co-routines - FreeRTOS™
    The Tasks and Co-Routine documentation pages provide information to allow you to determine when co-routine use may and may not be appropriate. Below is a ...
  26. [26]
  27. [27]
    xTaskCreate - FreeRTOS™
    Each task requires RAM that is used to hold the task state, and used by the task as its stack. If a task is created using xTaskCreate() then the required RAM is ...
  28. [28]
    Task states - FreeRTOS™
    ### Task States in FreeRTOS
  29. [29]
    Tasks - FreeRTOS™
    The FreeRTOS scheduler ensures that tasks in the Ready or Running state will always be given processor (CPU) time in preference to tasks of a lower priority.
  30. [30]
    vTaskDelay() - FreeRTOS™
    Delay a task for a given number of ticks. The actual time that the task remains blocked depends on the tick rate.
  31. [31]
    vTaskSuspend() - FreeRTOS™
    Suspend any task. When suspended a task will never get any microcontroller processing time, no matter what its priority.
  32. [32]
  33. [33]
    vTaskDelete - FreeRTOS™
    Remove a task from the RTOS kernels management. The task being deleted will be removed from all ready, blocked, suspended and event lists.
  34. [34]
    FreeRTOS scheduling (single-core, AMP and SMP)
    This page provides an overview of the FreeRTOS scheduling algorithm for single-core, asymmetric multicore (AMP), and symmetric multicore (SMP) RTOS ...
  35. [35]
    FreeRTOS binary semaphores
    Binary semaphores in FreeRTOS are used for mutual exclusion and synchronization, like a queue that can only hold one item, and are better for synchronization ...
  36. [36]
    FreeRTOS counting semaphores - FreeRTOS™
    ### Summary of FreeRTOS Counting Semaphores
  37. [37]
    FreeRTOS mutexes
    Mutexes are binary semaphores that include a priority inheritance mechanism. Whereas binary semaphores are the better choice for implementing synchronisation.Missing: synchronization | Show results with:synchronization
  38. [38]
    FreeRTOS event groups - FreeRTOS™
    ### Summary of FreeRTOS Event Groups for Synchronization, Including Task Rendezvous
  39. [39]
    3 Heap Memory Management | Mastering the FreeRTOS™ Real ...
    May 25, 2023 · FreeRTOS comes with five example implementations of pvPortMalloc() and vPortFree() , which are all documented in this chapter. FreeRTOS ...
  40. [40]
    Manage application memory - FreeRTOS - AWS Documentation
    Sep 26, 2024 · When applications need memory, they can allocate it from the FreeRTOS heap. FreeRTOS offers several heap management schemes that range in complexity and ...
  41. [41]
    FreeRTOS heap memory management
    FreeRTOS offers several heap management schemes that range in complexity and features. It is also possible to provide your own heap implementation.
  42. [42]
    [PDF] The FreeRTOS™ Reference Manual
    This document provides a technical reference to both the primary FreeRTOS API1, and the. FreeRTOS kernel configuration options. It is assumed the reader is ...
  43. [43]
    [PDF] Mastering the FreeRTOS™ Real Time Kernel
    This is a hands-on tutorial guide for mastering the FreeRTOS real-time kernel, but it does not cover FreeRTOS V9.0.0, V10.0.0, or low power tick-less operation.<|control11|><|separator|>
  44. [44]
    Supported Devices - FreeRTOS™
    This page only lists the official RTOS ports. No hardware yet? Don't worry - see the Demo Quick Start page for links to Windows and Linux ports.Missing: acquisition | Show results with:acquisition
  45. [45]
    'Officially Supported' and 'Contributed' FreeRTOS Code
    The microcontroller architecture specific part of a FreeRTOS port is called the port layer. There are several categories of FreeRTOS port, depending on who ...<|control11|><|separator|>
  46. [46]
    Supported Demos - FreeRTOS™
    RISC-V [contributed, there is now an official port too]; SiFive; Silicon Labs; Spansion (ex Fujitsu); ST Microelectronics; Synopsys ARC; Texas Instruments ...
  47. [47]
    FreeRTOS Library Categories
    All the libraries are MIT (open source) licensed and are designed for resource constrained devices such as microcontrollers and small microprocessors. FreeRTOS ...
  48. [48]
    coreHTTP library - FreeRTOS - AWS Documentation
    FreeRTOS provides open source real-time operating system kernel, libraries for connectivity, security, OTA updates, and demo applications on qualified hardware ...
  49. [49]
    FreeRTOS versions - AWS Documentation
    FreeRTOS kernel provides multitasking scheduler, memory allocation options, intertask coordination primitives, symmetric multiprocessing support, efficient ...
  50. [50]
    FreeRTOS LTS Libraries
    Updated Oct 2025. FreeRTOS LTS Libraries. IntroductionUpgrading to version 202406.xx of FreeRTOS LTS from the previous versionLTS StatusFreeRTOS LTS Patches ...
  51. [51]
    Task Utilities - FreeRTOS™
    The number of tasks that the RTOS kernel is currently managing. This includes all ready, blocked and suspended tasks. A task that has been deleted but not yet ...
  52. [52]
    FreeRTOS Lab Libraries
    FreeRTOS Labs projects are functional but either incomplete, experimental, or simply provided for open source community interest.<|control11|><|separator|>
  53. [53]
    FreeRTOS Services | Commercial Licencing, Porting and Upgrades
    At AWS re:Invent 2017, AWS announced Amazon FreeRTOS; based on the FreeRTOS kernel it is part of the AWS Edge to Cloud IoT offering, with Richard Barry joining ...<|control11|><|separator|>
  54. [54]
    What is FreeRTOS? - AWS Documentation
    FreeRTOS provides open source real-time operating system kernel libraries for qualified microcontroller hardware platforms, enabling secure connectivity ...
  55. [55]
    Document history - FreeRTOS
    The following table describes the documentation history for the FreeRTOS Porting Guide and the FreeRTOS Qualification Guide. ... Amazon FreeRTOS is now FreeRTOS.
  56. [56]
    SAFERTOS™ and OPENRTOS - FreeRTOS
    SAFERTOS is a safety certified SIL3 RTOS that has the same functional model as FreeRTOS. It was created under license by WITTENSTEIN high integrity systems.
  57. [57]
    FreeRTOS and SAFERTOS® Comparison
    SAFERTOS builds on the FreeRTOS functional model but has been completely redesigned for safety systems.
  58. [58]
    Functional Safety Standards of our Safety Critical RTOS, SAFERTOS
    SAFERTOS® supports functional safety standards including IEC 61508 SIL3, FDA 510(k), DO- 178C, IEC 62304, and ISO 26262 ASILD.Missing: certifications | Show results with:certifications
  59. [59]
    SafeRTOS certified to IEC61508 SIL3 by TUV SUD - FreeRTOS
    SafeRTOS has been independently certified by TÜV SÜD as having been developed in accordance with the rigour necessary for IEC 61508 projects at a safety ...Missing: certifications | Show results with:certifications
  60. [60]
    WITTENSTEIN SAFERTOS - STMicroelectronics
    SAFERTOS® · Pre-certified to IEC 61508 SIL 3 for Industrial · Pre-certified to ISO 26262 ASILD for Automotive · Certifiable to FDA 510(k) / EN 62304 for Medical ...
  61. [61]
    SafeRTOS® Features – often used with popular ARM Cortex M3, M4 ...
    SAFERTOS is an ideal choice in systems that need to protect users and equipment from hazards quickly after a power on or brown out event.
  62. [62]
    SAFERTOS | Pre-Certified Safety RTOS - Hitex GmbH
    SAFERTOS Features · Responsiveness · Ultra-Low Power Mode · No Dynamic Memory Operations · Spatial Separation of Tasks · Multicore Devices · The SAFERTOS pre-emptive ...
  63. [63]
    SAFERTOS® Supported Devices
    SAFERTOS® supports a wide range of silicon, including Texas Instruments, ST Microelectronics, Renesas, Infinion, Micropchip, NXP and others.
  64. [64]
    SAFERTOS now supports the TI Jacinto and Sitara platforms
    Jun 9, 2022 · SAFERTOS® now supports the Jacinto TDA4Vx, Sitara AM2x & AM6x and AWR29xx platforms. SAFERTOS 30-day evaluations are available on these ...
  65. [65]
    OPENRTOS®, part of embedded FreeRTOS
    OPENRTOS® offers middleware and licensing to FreeRTOS, as well as professional support and training.
  66. [66]
    OPENRTOS® Features - Functional Overview
    Compact Footprint: Typical ROM Requirements 4-9kB. Typical RAM Requirements 250 bytes. Typical Stack Requirements 400 bytes/task. Overview ...
  67. [67]
    Licensing for our RTOS & Middleware
    Our standard licensing model uses a royalty free, perpetual, full production license. We have three standard levels of licensing.Missing: features | Show results with:features