Porting Quick Reference Table - WP560

FreeRTOS to Zephyr Porting Overview (WP560)

Document ID
WP560
Release Date
2025-02-11
Revision
1.0 English

The following table gives a brief overview of common FreeRTOS features and their Zephyr project equivalents.

Table 1. Porting Quick Reference
FreeRTOS Feature Zephyr Equivalent Notes
Tasks Threads
Queues Queues
Mutexes

Recursive Mutexes

Mutexes To be able to lock a mutex more than once in FreeRTOS applications, you must use the special class called recursive mutex. The Zephyr project allows this behavior by default.
Binary Semaphores

Counting Semaphores

Semaphores To have a semaphore that can be taken more than once (at a time) in FreeRTOS applications, you must use the special counting semaphore class. The Zephyr project allows this behavior by default.
Direct to Task Notifications Asynchronous Notifications
Stream and Message Buffers Message Queues

Pipes

FreeRTOS buffers need to have a mutex wrap the stream/message buffers to allow multiple threads trying to read/write from them. The Zephyr project allows this behavior by default.
Software Timers Timers
Event Groups Events
Customization/Configuration Configuration FreeRTOS systems uses a file called FreeRTOSConfig.h. The Zephyr project uses Kconfig, which allows you to either manually edit the configuration file or make use of an interactive (menu- or GUI-based) interface.
Static vs. Dynamic Memory Allocation See notes FreeRTOS systems need to have a configuration parameter (configSUPPORT_STATIC_ALLOCATION) enabled to let you allocate memory statically for certain objects. The Zephyr project typically allocates memory statically by default.
Heap Memory Management Memory Heaps
Stack Overflow Protection Memory Protection Design