FreeRTOS

202411.00
FreeRTOS is a market-leading real-time operating system kernel designed for microcontrollers and small microprocessors, featuring a small memory footprint and fast execution times. It provides a comprehensive ecosystem of libraries for IoT connectivity, security, and over-the-air updates, supporting over 40 processor architectures including ARM and RISC-V.

Features

  • 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

View All Projects →

Holocubic NES Dynamic Module

A high-performance NES emulator implemented as a dynamic shared object for the Clocteck Holocubic ESP32-S3 platform. It utilizes the ESP-ELFLoader to integrate with cubic Lua firmware, providing a scriptable interface for gaming with support for multiple mappers and BLE controllers.

freertos lwip

FlightPortrait Firmware

FlightPortrait is an open-source firmware for an ESP32-S3-powered 13.3" color e-ink frame that visualizes local aviation traffic. Built using the ESP-IDF framework, it leverages FreeRTOS and NimBLE to provide a secure, low-power display solution that retrieves images via HTTPS. The project emphasizes a "simple by design" approach, featuring a robust state machine for provisioning, polling, and deep sleep cycles to maximize battery life.

freertos nimblelwip
ESP32-P4 Home Assistant MQTT Voice Assistant

ESP32-P4 Home Assistant MQTT Voice Assistant

This project provides local voice assistant firmware for the ESP32-P4 platform, built natively on ESP-IDF and integrated with Home Assistant's Assist pipeline. It utilizes WakeNet9 for wake-word detection, MQTT for control and discovery, and features a local MP3 player and web-based management dashboard.

freertos lvgllwipspiffs
ESP32-C3 Environmental Monitoring Node

ESP32-C3 Environmental Monitoring Node

A high-efficiency, low-power environmental monitoring firmware developed using the native ESP-IDF v5.x framework for the ESP32-C3. It integrates deep sleep cycles with multi-sensor data collection and provides configurable alerts via Telegram, Discord, and custom webhooks. The system includes a built-in SoftAP web portal for runtime configuration, allowing users to manage Wi-Fi credentials and sensor thresholds without serial re-flashing.

freertos lwip

Tamagooshi

An ESP32-based pixel-art virtual pet platform for M5Stack devices that reflects live metrics from sources like Datadog and PostHog. The system uses a Python-powered hub to communicate over BLE or MQTT, allowing the mascot to react to technical telemetry or AI agent activity. It is built using the Arduino framework on FreeRTOS and features a modular configuration system for custom assets and HID functionality.

freertos h2zero-esp-nimble-cppplatformio-platformio-core
ESP32 AI Mini Screen

ESP32 AI Mini Screen

A retro-styled desktop companion for ESP32-C3 and ESP8266 that monitors AI coding assistant usage, stock markets, and system telemetry. It leverages the Arduino framework with TFT_eSPI and AnimatedGIF libraries to display real-time data provided by a local bridge application.

freertos littlefstft-espi

POOM Multitool Platform

POOM is an open-source multitool platform for ESP32-C5 and ESP32-C6 microcontrollers, designed for wireless security testing, IoT automation, and portable gaming. It leverages the ESP-IDF framework with FreeRTOS, OpenThread, and lwIP to provide a modular environment for Wi-Fi/BLE analysis and hardware interaction.

freertos lwipopen-thread
SensorStation3

SensorStation3

SensorStation3 is an ESP32-based environmental monitoring station that utilizes FreeRTOS and the LVGL graphics library to provide a real-time touchscreen dashboard. It supports a variety of I2C sensors for tracking temperature, humidity, CO2, and atmospheric pressure, featuring seamless integration with Home Assistant and MQTT-based platforms.

freertos lvgllwip