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.
Related Projects (65)
AIR32F103 Template Project
A comprehensive GCC-based development template for the AIR32F103, MH32F103A, and MH2103A series of microcontrollers. It provides a complete build system with support for FreeRTOS, LVGL, and uIP, including a specialized startup routine to unlock hidden internal RAM.
Arduino FreeRTOS Library
A specialized port of the FreeRTOS kernel optimized for 8-bit AVR microcontrollers within the Arduino ecosystem. It provides seamless real-time multitasking capabilities for ATmega-based boards like the Arduino Uno, Leonardo, and Mega, while maintaining compatibility with standard Arduino functions.
Arduino-Pico
A high-performance Arduino core for Raspberry Pi RP2040 and RP2350 microcontrollers, supporting both ARM and RISC-V architectures. It integrates the Raspberry Pi Pico SDK with FreeRTOS SMP support and provides advanced features like multicore processing, PIO-based peripherals, and integrated SSL/TLS.
AsyncESP32_SC_Ethernet_Manager
An asynchronous Ethernet connection manager for ESP32-S2/S3/C3 microcontrollers. It utilizes the LwIP stack with W5500 or ENC28J60 controllers to provide a web-based configuration portal for managing network credentials and static IP settings at runtime.
AsyncHTTPRequest_ESP32_Ethernet
An asynchronous HTTP client library for ESP32-based microcontrollers using LwIP Ethernet controllers like W5500, W6100, and ENC28J60. It provides a non-blocking interface for REST communication, similar to JavaScript's XMLHttpRequest, and relies on the AsyncTCP library for efficient networking.
AsyncHTTPSRequest_ESP32_Ethernet
An asynchronous HTTPS request library for ESP32-based boards using LwIP-compatible Ethernet controllers like W5500, W6100, and ENC28J60. It leverages AsyncTCP_SSL to provide a non-blocking, XMLHttpRequest-style API for efficient REST communication in embedded systems.
AsyncUDP_ESP32_Ethernet
A fully asynchronous UDP library for ESP32-based boards using LwIP with W5500, W6100, or ENC28J60 Ethernet controllers. It provides a non-blocking interface for Unicast, Broadcast, and Multicast networking, significantly improving performance over standard synchronous implementations.
AsyncUDP_ESP32_SC_W6100
A fully asynchronous UDP library for ESP32-S2/S3/C3 microcontrollers using the W6100 Ethernet controller and LwIP. It enables non-blocking network communication for unicast, broadcast, and multicast environments, allowing for high-speed multi-connection handling.
AsyncWebServer_ESP32_SC_ENC
An asynchronous web server library specifically designed for ESP32-S2, S3, and C3 microcontrollers using the ENC28J60 Ethernet controller via the LwIP stack. It enables high-performance, non-blocking network communication, supporting concurrent connections, WebSockets, and Server-Sent Events.
AsyncWebServer_ESP32_SC_W5500
An asynchronous web server library designed for ESP32-S2/S3/C3 microcontrollers using the W5500 Ethernet controller. It leverages the LwIP stack to provide high-performance, non-blocking network handling, supporting WebSockets, EventSource, and efficient CString-based memory management.
AsyncWebServer_ESP32_W5500
A high-performance asynchronous web server library for ESP32 microcontrollers using the W5500 Ethernet controller. It leverages the LwIP stack to provide non-blocking network operations, supporting WebSockets, Server-Sent Events, and efficient memory handling for large data transfers.
AWatch
AWatch is a retro-inspired smartwatch firmware for the ESP32-based TTGO T-Watch, featuring a user interface modeled after the Amiga Workbench 1.x. It leverages FreeRTOS for task management and integrates LVGL for its graphical interface, providing functionality such as countdown timers, MOD music playback, and speech synthesis.
BBN M5Stack Tough Sailing Instruments
A comprehensive sailing instrument display and autopilot controller for the M5Stack Tough (ESP32). It integrates with SignalK, NMEA 0183, and Victron systems using the LVGL graphics library to provide real-time marine data visualization and vessel control.
Blinker IoT Documentation
The official documentation repository for the Blinker IoT platform, providing comprehensive guides for connecting embedded devices to the cloud. It supports a wide range of hardware including ESP32, ESP8266, and Arduino, with SDKs for FreeRTOS, Python, and Node.js.
Blynk_Async_WM
An asynchronous WiFi and Blynk configuration manager for ESP8266 and ESP32 platforms. It leverages ESPAsyncWebServer to provide a non-blocking configuration portal with support for multi-WiFi/multi-Blynk credentials, SSL, and persistent storage via LittleFS, SPIFFS, or EEPROM.
coreMQTT Agent Library
The coreMQTT Agent library provides a thread-safe high-level API for the coreMQTT library, enabling multiple threads to share a single MQTT connection. It manages the MQTT connection by serializing access and handling the background process loop, simplifying MQTT integration in multi-threaded embedded systems like FreeRTOS.
Development of Real-Time Systems Assignments
A collection of educational assignments and simulations focused on real-time systems development using FreeRTOS. The project utilizes a POSIX-based FreeRTOS simulator to demonstrate task scheduling, synchronization, and Rate Monotonic (RM) analysis without requiring dedicated embedded hardware.
DIY Smart Coffee and Espresso Scale
A high-precision smart coffee scale project featuring ESP32 firmware written in Rust and a Svelte-based Progressive Web App. It utilizes an HX711 load cell with Kalman filtering for real-time weight tracking and communicates via Bluetooth Low Energy to provide live extraction curves and timer functionality.
dnx RTOS
dnx RTOS is a Unix-like operating system layer built on the FreeRTOS kernel, designed for 32-bit microcontrollers. It provides a modular architecture featuring a virtual file system (VFS), a C-standard compatible program layer, and support for multiple CPU architectures including STM32 and EFR32.
drone_stm32f1
A comprehensive open-source hobby drone project based on the STM32F103C8T6 (BluePill) microcontroller. It features a FreeRTOS-based firmware architecture, a C# ground station GUI for real-time monitoring, and complete hardware design files including PCBs and mechanical drawings.
Effortless-SPIFFS
Effortless-SPIFFS is a C++ library for ESP8266 and ESP32 that simplifies data persistence using the SPIFFS file system. It provides a high-level API for saving and loading various data types, including primitives, strings, and ArduinoJson documents, through simple template-based methods.
ESP-Scope
ESP-Scope is a web-based oscilloscope application built on the ESP-IDF framework for ESP32 microcontrollers. It utilizes the ESP32's ADC capabilities to capture analog signals and serves a real-time visualization interface via a web browser, supporting sample rates up to 83.3 kHz.
ESP32_BitlashTBP
A multi-interpreter environment for the ESP32-C3 that integrates Bitlash and TinyBasicPlus with Quick ESP-NOW wireless connectivity. It provides a programmable command shell and BASIC scripting capabilities with a LittleFS-based file system for persistent script storage.
ESP32 AsyncWebServer File Upload Example
A practical demonstration of handling file uploads and management on the ESP32 using the ESPAsyncWebServer library and SPIFFS. It features examples ranging from simple single-page uploads to advanced implementations with authentication and real-time progress bars.
ESP32 BLE OTA Arduino
A project enabling Over-the-Air (OTA) firmware updates for ESP32 microcontrollers using Bluetooth Low Energy (BLE). It supports both the standard ESP32 BLE library and the more memory-efficient NimBLE-Arduino, providing Python scripts and an Android app for the update process.
esp32-cam-micropython
A specialized MicroPython port for the ESP32-CAM module that integrates camera support directly into the firmware. It features a custom C-based camera module, support for LittleFS to optimize RAM usage, and includes various asynchronous web server examples for streaming video and capturing images.
ESP32 Composite Video Library
A specialized library for ESP32 that generates PAL, NTSC, and SECAM composite video signals using the internal DAC and I2S peripherals. It supports multiple resolutions and framebuffer formats, including direct integration with the LVGL graphics library for creating embedded GUIs without external video hardware.
ESP32-ENC28J60
A specialized Ethernet library for the ESP32 platform that provides driver support for the ENC28J60 SPI Ethernet controller. It leverages the standard Arduino ESP32 Ethernet API, allowing developers to use familiar networking functions with low-cost SPI Ethernet hardware.
ESP32 FATFS Image Tool and Example
A utility and example project for the ESP32 that allows developers to create FAT file system images on a host machine and flash them directly to the device's flash memory. It leverages the ESP-IDF framework and FreeRTOS to provide a Virtual File System (VFS) interface for accessing files stored in a FAT partition.
ESP32 FreeRTOS Examples
A comprehensive collection of firmware examples for the ESP32 microcontroller using the ESP-IDF framework and FreeRTOS. It demonstrates core RTOS primitives like task management, semaphores, and queues, alongside hardware-specific implementations for I2C, SPI, and WiFi connectivity.
ESP32 I2C MPU6050 Driver
A specialized hardware-based I2C driver for the MPU6050 inertial measurement unit, designed specifically for the ESP32 using the ESP-IDF framework. It features high-speed 400kHz communication and includes a Kalman filter implementation for smoothed sensor data processing.
ESP32 LVGL 8.x SDSPI Template
A comprehensive ESP-IDF project template for ESP32 and ESP32-S3 that integrates LVGL 8.x with the LovyanGFX display driver. It features a shared SPI bus for SD card storage and provides pre-configured setups for multiple hardware targets like the WT32-SC01 and FeatherS3.
ESP32 MJPEG Multiclient Streaming Server
A high-performance MJPEG streaming webserver for ESP32-CAM and ESP-EYE modules, capable of supporting up to 10 simultaneous clients. It leverages FreeRTOS tasks to handle concurrent streaming and utilizes the latest ESP32 camera drivers for various sensors like OV2640 and OV5640.
ESP32 Monaco Editor SPIFFS
A project demonstrating a VSCode-like Monaco editor interface for the ESP32, allowing users to edit files stored on the SPIFFS filesystem via a web browser. It utilizes WebSockets for real-time communication and the ESPAsyncWebServer for handling file operations.
ESP32 MQTT Motor Control
An ESP32-based automation project for controlling window blinds using a 12V wiper motor and MQTT. It features multi-threaded motor control, soft-start PWM, over-current protection, and integration with Home Assistant for remote management and sensor data reporting.
ESP32 Offline OSM Maps
This project provides a workflow and demo for displaying offline OpenStreetMap (OSM) data on ESP32 microcontrollers using the LVGL graphics library. It includes a Python-based map converter to transform raster tiles into LVGL-compatible image formats, specifically targeting hardware like the TTGO-Camera Plus.
ESP32 PPPoS Client Example
A comprehensive example project for the ESP32 that implements a Point-to-Point Protocol over Serial (PPPoS) client. It utilizes the ESP-IDF framework and lwIP stack to provide internet connectivity via GSM modules like the SIM800L, supporting HTTP, HTTPS, and SMS functionality.
ESP32-Repo
A comprehensive collection of examples and configuration guides for the ESP32 microcontroller, focusing on FreeRTOS primitives and peripheral interfacing. It provides structured code for both the Arduino framework and the ESP-IDF, including setup instructions for MSYS2 and CMake build systems.
ESP32 Sniffer
An ESP32-based firmware designed to capture Wi-Fi Probe Request packets sent by smartphones. Built on the ESP-IDF framework, it extracts metadata such as MAC addresses and signal strength, stores them locally using SPIFFS, and periodically uploads the data to a central server via MQTT.
esp32-smartdisplay
A specialized driver library for Sunton 'Cheap Yellow Display' (CYD) boards, providing a unified interface for LVGL 9. It leverages the Espressif esp_lcd component to support a wide range of ESP32, S3, and C3 based smart displays with integrated touch and peripheral control.
ESP32 Spartan Edge SPIFFS Loader
A utility for the Spartan Edge Accelerator Board that enables loading FPGA bitstreams directly from the ESP32's internal SPIFFS flash memory. By utilizing the onboard 4MB flash chip, it allows the Spartan-7 FPGA to be configured without the need for an external microSD card.
ESP32 SPIFFS with Directory Support Example
This project provides an enhanced SPIFFS implementation for the ESP32, adding native directory support to the standard ESP-IDF VFS driver. It includes a modified mkspiffs tool for host-side image creation and demonstrates advanced file system operations including multitasking and time-stamped file management.
ESP32 ST7789V FT6236U Arduino LVGL Demo
A comprehensive demo project for ESP32 using the LVGL v8.3.4 graphics library, featuring support for the ST7789 display and FT6236 touch controller. It includes various UI examples such as music players, widgets, and performance benchmarks.
ESP32-TUX
ESP32-TUX is a comprehensive Touch UX template for ESP32 and ESP32-S3 microcontrollers, leveraging the LVGL graphics library and LovyanGFX driver. It provides a ready-to-use framework for building sophisticated HMI applications with features like Wi-Fi provisioning, OTA updates, and theme switching across various 3.5-inch display modules.
ESP32 SPIFFS Image Generation Example
This project provides a practical example of integrating the SPIFFS file system into an ESP32 application using the ESP-IDF framework. It features automated workflows for generating binary images from local data folders and flashing them to specific partitions on the ESP32.
ESP32_W5500_Manager
A comprehensive connection and credential manager for ESP32 boards using the W5500 Ethernet controller and LwIP. It provides a fallback web configuration portal for runtime setup of static or DHCP IP addresses, custom parameters, and NTP settings, supporting storage via LittleFS or SPIFFS.
ESP32-Watch for OpenHaystack
An ESP32-based smartwatch project that integrates with Apple's Find My network using the OpenHaystack protocol. It features a graphical user interface built with LVGL and LovyanGFX, providing location tracking capabilities without the need for a GPS module by broadcasting via Bluetooth Low Energy (BLE).
ESP32 Web Server using SPIFFS
This project demonstrates how to host a web server on an ESP32 using the SPI Flash File System (SPIFFS) to serve static HTML and CSS files. It provides a practical example of controlling hardware GPIOs through a web interface, allowing users to toggle LEDs remotely.
FreeRTOS coreMQTT Agent Demos
A collection of demonstration projects showcasing the coreMQTT Agent library's ability to share a single MQTT connection across multiple concurrent FreeRTOS tasks. It includes practical implementations for AWS IoT Device Shadow, Device Defender, and Over-the-Air (OTA) updates targeting Windows and QEMU environments.