FreeRTOS is a lightweight, production-proven real-time kernel maintained by AWS under the MIT license. Built for resource-constrained microcontrollers, it delivers deterministic task scheduling, queues, semaphores, mutexes, and memory management with minimal flash and RAM usage. Its modular, vendor-neutral design integrates easily with custom toolchains, hardware platforms, and abstraction layers, making it a strong choice for fast, predictable, low-level embedded systems.
Zephyr is a modern, full-featured RTOS hosted by the Linux Foundation under the Apache 2.0 license. Inspired by Linux, it combines standardized drivers, Devicetree and Kconfig configuration, built-in networking and wireless stacks, and security features such as MPU-based isolation. Its vendor-neutral, platform-oriented architecture enables developers to build secure, scalable IoT applications that can be ported across a wide range of hardware.
| Feature / Concept | FreeRTOS | Zephyr RTOS |
|---|---|---|
| License & Sponsor | Amazon Web Services (AWS) / MIT | Linux Foundation / Apache 2.0 |
| Core Philosophy | Minimalist kernel & task scheduler | Full-featured platform ecosystem |
| Execution Primitives | Tasks | Threads, work queues, system work queue |
| System Options | C Header file (FreeRTOSConfig.h) | Kconfig (prj.conf) |
| Hardware Description | Vendor initialization code & manual board support | Devicetree (.dts), overlays, and bindings |
| Abstraction Layer | Vendor HALs (e.g., STM32 HAL, ESP-IDF) | Universal, vendor-neutral driver APIs |
| App Portability | Vendor/chip-specific projects | Highly portable across boards and silicon vendors |
| Networking & Connectivity | Manual integration (or AWS IoT / FreeRTOS-Plus-TCP) | Built-in IPv4/IPv6, Ethernet, Wi-Fi, BLE, Mesh |
| System Services | Custom logging, optional third-party components | Built-in Logging subsystem, Shell CLI, USB, POSIX |
| Memory Isolation | Flat memory space (optional FreeRTOS-MPU) | Native User/Kernel mode isolation & MPU support |
| Build System & Tools | Vendor IDEs (Keil, STM32CubeIDE), Make, CMake | west meta-tool, CMake, and Zephyr SDK |
| Flash / RAM Footprint | Tiny (~5–10 KB Flash base) | Scalable (~15–50+ KB Flash depending on modules) |
FreeRTOS (Scheduler): FreeRTOS provides core RTOS primitives, tasks, semaphores, queues, and software timers. It leaves driver implementation, networking, and hardware configuration up to you or your target MCU’s vendor HAL.
Zephyr (Platform): Zephyr takes a batteries-included approach. It includes unified driver models, a shell interface, power management, filesystems, and security modules built directly into the tree.
FreeRTOS: Configuration is managed through a single FreeRTOSConfig.h file. You can easily integrate it into almost any vendor IDE (Keil, IAR, STM32CubeIDE) or custom Makefile/CMake environment.
Zephyr: Mimics the Linux kernel build process. Hardware is described using Devicetree (.dts), while software components are toggled using Kconfig (prj.conf). The meta-tool west manages repositories and builds, offering high cross-platform portability at the cost of a steeper initial learning curve.
FreeRTOS: Has lower context-switching and interrupt overhead because of its lean execution model. Tasks generally execute in a single shared memory space.
Zephyr: Emphasizes safety and isolation. On supported hardware, it separates kernel mode from user mode and enforces hardware stack protection and memory partitions using the Memory Protection Unit (MPU).
| Concept | FreeRTOS API | Zephyr RTOS API |
|---|---|---|
| Thread Creation | xTaskCreate() | k_thread_create() |
| Thread Delay | vTaskDelay() | k_sleep() k_msleep() |
| Binary Semaphore | xSemaphoreCreateBinary() xSemaphoreTake() | K_SEM_DEFINE(..., 0, 1) k_sem_take() |
| Mutex | xSemaphoreCreateMutex() xSemaphoreTake() | K_MUTEX_DEFINE(...) k_mutex_lock() |
| Event Group | xEventGroupCreate() | k_event_init() |
| Message Queue | xQueueCreate() xQueueSend() | k_msgq_init() k_msgq_put() |
| Direct Notification | Task Notification xTaskNotify() | Semaphore k_event, or k_poll_signal |
| Timers | Software Timer xTimerCreate() | Kernel Timer k_timer_init() |
| Background Exec | Daemon / Timer Task | System Work Queue k_work_submit() |
| Interrupt APIs | Separate ...FromISR() APIs | Unified APIs (e.g., k_sem_give() works in ISR) |
Back to top of the page