FreeRTOS
202411.00Features
-
Preemptive or co-operative multitasking with priority-based scheduling for deterministic performance.
-
Symmetric Multiprocessing (SMP) support for multi-core microcontroller architectures.
-
Native TCP/IP stack (FreeRTOS+TCP) with comprehensive support for both IPv4 and IPv6.
-
Integrated TLS v1.3 support via MbedTLS and WolfSSL for secure encrypted communications.
-
AWS IoT integration for Over-the-air (OTA) updates, Device Shadow, and Jobs management.
-
Support for ARMv8-M TrustZone and ARMv8.1-M PACBTI security extensions for firmware protection.
-
Lightweight IoT messaging via coreMQTT and coreMQTT Agent for shared network connections.
-
Cryptographic identity and key management through the corePKCS11 library.
-
Formal verification of software correctness for core libraries using CBMC proofs.
-
Memory Protection Unit (MPU) support for task isolation and enhanced system reliability.
-
Cellular interface library for seamless mobile network integration.
-
SNTP client for accurate network-based time synchronization across devices.
-
Support for 40+ architectures and 15+ toolchains including latest RISC-V and ARMv8-M.
-
Low power modes and tickless idle functionality for energy-efficient battery operation.
-
Trace and profiling support via Percepio View for real-time application analysis.
Architecture
FreeRTOS utilizes a microkernel design focused on providing a minimal but robust set of primitives for real-time applications. The core kernel is responsible for task management, scheduling, and inter-process communication (IPC) through queues, semaphores, and mutexes. It is designed to be highly portable, with a clear separation between the hardware-independent core and the hardware-dependent port layer. This architecture allows it to maintain a tiny memory footprint, typically around 6K to 12K bytes of ROM, depending on the architecture and configuration.
The system is highly modular, following a “kernel + libraries” approach. While the core kernel handles execution, additional functionality such as the TCP/IP stack (FreeRTOS+TCP), MQTT, and security protocols are provided as optional, loosely coupled libraries under the FreeRTOS-Plus umbrella. This design pattern ensures that developers only include the code necessary for their specific application, optimizing resource usage for constrained embedded devices.
Core Components
- Task Scheduler: Supports preemptive, co-operative, and round-robin scheduling with priority levels.
- IPC Primitives: Includes thread-safe queues, binary semaphores, counting semaphores, and recursive mutexes.
- Software Timers: Allows for the execution of functions at specific times or periodic intervals.
- Event Groups: Enables tasks to wait for combinations of events to occur.
- Stream/Message Buffers: Optimized for task-to-task and interrupt-to-task data transfer.
Use Cases
This RTOS is ideal for:
- Industrial Automation: Managing real-time sensor data and motor control loops with deterministic timing requirements.
- Consumer Electronics: Powering smart home devices, wearables, and appliances that require low power consumption and small footprints.
- Medical Devices: Providing a reliable and formally verified foundation for life-critical monitoring and diagnostic equipment.
- IoT Gateways: Handling complex networking stacks, TLS encryption, and cloud connectivity for edge-to-cloud data routing.
- Automotive Systems: Implementing non-safety critical telematics and infotainment systems using ARM Cortex-R or Cortex-A processors.
- Smart Energy: Managing smart meters and grid infrastructure components that require long-term stability and remote OTA updates.
Getting Started
To begin developing with FreeRTOS, it is recommended to clone the main repository using the --recurse-submodules flag, as the kernel and supplementary libraries are maintained in separate Git submodules. Developers should start by exploring the FreeRTOS/Demo directory, which contains pre-configured projects for hundreds of hardware platforms and various compilers (GCC, IAR, Keil). These demos provide a functional baseline that includes the necessary port files and configuration headers (FreeRTOSConfig.h).
Extensive documentation is available on the official FreeRTOS website, including a Kernel Quick Start Guide and a comprehensive API Reference. For community support, developers can access the FreeRTOS Support Forums to interact with the primary developers and the broader ecosystem.
Learn how FreeRTOS works
All Lessons →Step through the FreeRTOS kernel line by line in an interactive simulator, next to its source code. New to real-time kernels? Start with the basics.
- The tick and vTaskDelay in FreeRTOSHow vTaskDelay puts a task in a delayed list and how xTaskIncrementTick wakes it, line by line in the FreeRTOS source.
- The context switch in FreeRTOSHow FreeRTOS on a Cortex-M3 saves one task's registers, picks the next task and restores its registers, in the PendSV handler.
- How FreeRTOS chooses the next taskvTaskSwitchContext, the search through the ready lists and the walking index that makes tasks of one priority take turns, in the FreeRTOS source.
- Tick count overflow in FreeRTOSHow FreeRTOS keeps delays working when its 32-bit tick count wraps round to zero, with two delayed lists that swap roles.
- Suspending, resuming and ending a task in FreeRTOSHow vTaskSuspend and vTaskResume move a task in and out of xSuspendedTaskList, how the kernel tells a suspended task from one that waits forever, and why a task that deletes itself is freed by the idle task.
- Priority inheritance in FreeRTOSHow xTaskPriorityInherit raises a mutex holder and xTaskPriorityDisinherit lowers it again, line by line in the real kernel source.
- Interrupts in FreeRTOSHow xSemaphoreGiveFromISR wakes a task without switching, how portYIELD_FROM_ISR asks for the switch, and what xYieldPending does when the handler does not ask.
- xTaskDelayUntil in FreeRTOSHow xTaskDelayUntil keeps a periodic task on a fixed grid of wake-up times, and what it does when the task overruns its period.
- Semaphores in FreeRTOSHow FreeRTOS builds a counting semaphore on its queue, how xQueueSemaphoreTake waits when the count is 0, and why a woken task takes the count itself when it runs.
- Queues in FreeRTOSHow xQueueSend and xQueueReceive copy items through a ring of slots, how a task waits for room or for an item, and why the queue is locked while it does.
- Software timers in FreeRTOSHow the timer service task keeps its list of active timers, sleeps until the next one is due, runs the callbacks and processes the commands that xTimerStart and xTimerStop send it.
- Event groups in FreeRTOSHow xEventGroupWaitBits stores what a task waits for in its own list item, how xEventGroupSetBits walks every waiting task with the scheduler suspended, and why an interrupt's setBits goes through the timer service task.
- Task notifications in FreeRTOSHow a task notification signals a task directly, without a semaphore, how the count tells the task how many signals it got, and what Zephyr offers instead.
Related Projects
View All Projects →
EasyPill V0
EasyPill V0 is a smart pillbox built with a Seeed Studio XIAO ESP32-C3 microcontroller running FreeRTOS via the Arduino framework. It tracks individual compartment lid openings using seven omnipolar Hall effect switches and an analog multiplexing matrix while disguised as a conventional plastic container. The device serves a local web dashboard for dosage scheduling, activity tracking, and NTP time synchronization without requiring cloud infrastructure.

Pareto Amp
Pareto Amp is open-source firmware for networked I2S audio amplifier systems based on ESP32 and ESP32-S3 microcontrollers. Built with ESP-IDF and FreeRTOS alongside LwIP and SPIFFS, it features Bluetooth A2DP sinking, USB audio streaming, Snapclient playback, hardware and software parametric equalization, and an integrated web control interface. It targets custom audio hardware including the Amped and Louder board series.

jRadio
jRadio is an all-in-one open-source audio player firmware for the ESP32-S3 microcontroller, supporting internet radio, local audio from USB and SD storage, DLNA media servers, Yandex Music, and FM radio. Built on ESP-IDF and FreeRTOS, it utilizes LVGL for graphical displays and lwIP for networking. The system features a responsive web interface, infrared remote learning, alarms, and browser-based OTA configuration.

ESP32 AirPlay 2 Surround
An open-source audio receiver firmware for ESP32-S3 microcontrollers that decodes and plays wireless 5.1 and 7.1 multichannel surround streams from Apple TV over AirPlay 2. Running on FreeRTOS and ESP-IDF with LwIP networking, each board synchronizes via Precision Time Protocol (PTP) and efficiently isolates and outputs a single target channel to an I2S DAC or amplifier.

AI Wireless Debugger
An ESP32-S3 multi-protocol wireless hardware debugger that bridges physical debugging interfaces with network services and AI tooling. Built on ESP-IDF with FreeRTOS and lwIP, it supports UART, SPI, I2C, PWM measurement, and CMSIS-DAP SWD debugging alongside an onboard ST7735 LCD and Model Context Protocol (MCP) server integration.

HellzGate
HellzGate is a multi-node wireless research platform built for the Espressif ESP32-C5 microcontroller. Running on ESP-IDF and FreeRTOS, it coordinates a master controller and multiple scanner nodes over ESP-NOW or I²C to perform passive dual-band Wi-Fi and BLE observation logging with GNSS time and location stamping.
HijelHID_BLEMouse
HijelHID_BLEMouse is an ESP32 Bluetooth Low Energy (BLE) Human Interface Device (HID) mouse library built on NimBLE-Arduino. It provides both an interrupt-safe base layer for hardware sensor integration and a high-level macro layer for scripted automation and emulation. The library targets ESP32 microcontrollers with BLE radio support across Windows, macOS, Linux, Android, and iOS platforms.

Vibe Watch
Vibe Watch is a wearable, tactile control surface for parallel AI-assisted coding built on the M5Stack StopWatch. Powered by an ESP32-S3, it leverages a 466 × 466 round touchscreen, tactile buttons, sound, and haptics alongside Bluetooth Low Energy to monitor up to six AI agent sessions and provide instant physical approval and voice controls.