# FreeRTOS — Industry-Standard Real-Time Operating System for Embedded Devices > The most deployed real-time operating system for microcontrollers, providing a reliable kernel with AWS IoT integration and a permissive MIT license. ## Install Save in your project root: # FreeRTOS — Industry-Standard Real-Time Operating System for Embedded Devices ## Quick Use ```bash # Clone FreeRTOS with submodules git clone https://github.com/FreeRTOS/FreeRTOS.git --recurse-submodules cd FreeRTOS/FreeRTOS/Demo/CORTEX_M4F_STM32F407ZG-SK # Build with your ARM toolchain (GCC example) make # Flash the resulting binary to your board ``` ## Introduction FreeRTOS is the most widely deployed real-time operating system kernel for microcontrollers, running on over 40 architectures. Maintained by AWS and released under the MIT license, it provides a small, portable, and proven kernel suitable for everything from tiny sensors to complex IoT gateways. ## What FreeRTOS Does - Provides preemptive and cooperative multitasking with configurable scheduling - Offers synchronization primitives: semaphores, mutexes, queues, event groups, and stream buffers - Supports tickless idle mode for low-power battery-operated devices - Includes optional TCP/IP stack, TLS, MQTT, HTTP, and OTA update libraries - Runs on 40+ architectures including ARM Cortex-M/A/R, RISC-V, Xtensa, and x86 ## Architecture Overview The FreeRTOS kernel is intentionally minimal: a scheduler, memory allocator (5 schemes to choose from), and IPC primitives. It compiles as a library linked with your application. The scheduler supports priority-based preemption with optional time-slicing. Memory allocation is pluggable — from simple bump allocators to thread-safe heap implementations. The kernel is contained in just 3 core C files, making it auditable and portable. ## Self-Hosting & Configuration - Configure via FreeRTOSConfig.h to set tick rate, heap size, and enabled features - Include the 3 kernel source files plus one portable layer for your architecture - Works with any IDE or build system (Make, CMake, IAR, Keil, Eclipse) - AWS provides reference integrations for popular evaluation boards - FreeRTOS+CLI provides a command-line interface for runtime diagnostics ## Key Features - Tiny footprint: kernel compiles to under 10KB on ARM Cortex-M - Memory safety via optional stack overflow detection and MPU support - Symmetric multiprocessing (SMP) support for dual-core chips - AWS IoT libraries for secure cloud connectivity (coreMQTT, coreHTTP) - Long Track Record Quality certification support (MISRA C, SAFERTOS derivative) ## Comparison with Similar Tools - **Zephyr** — Richer built-in subsystems; FreeRTOS is smaller and simpler to integrate - **RT-Thread** — More middleware included; FreeRTOS has broader industry certification history - **ChibiOS** — Dual-licensed with HAL; FreeRTOS is fully MIT with wider architecture support - **ThreadX (Azure RTOS)** — Now Eclipse open source; FreeRTOS has larger community and AWS backing - **Embassy (Rust)** — Async model without OS; FreeRTOS provides traditional threads for C codebases ## FAQ **Q: What is the minimum resource requirement?** A: FreeRTOS can run with as little as 4KB ROM and 1KB RAM on small Cortex-M0 devices. **Q: Is FreeRTOS certified for safety-critical systems?** A: FreeRTOS itself is not certified, but SAFERTOS (a derivative) is IEC 61508 SIL 3 certified. FreeRTOS code follows MISRA C guidelines. **Q: Does FreeRTOS support multicore?** A: Yes. FreeRTOS SMP supports symmetric multiprocessing on dual-core devices like ESP32 and RP2040. **Q: How does AWS involvement affect FreeRTOS?** A: AWS maintains the kernel and provides optional IoT libraries. The kernel remains MIT-licensed and vendor-neutral. ## Sources - https://github.com/FreeRTOS/FreeRTOS - https://www.freertos.org/Documentation/ --- Source: https://tokrepo.com/en/workflows/asset-4549d136 Author: AI Open Source