The following table gives a brief overview of common FreeRTOS features and their Zephyr project equivalents.
FreeRTOS Feature | Zephyr Equivalent | Notes |
---|---|---|
Tasks | Threads | |
Queues | Queues | |
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 | 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 | 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 |