CMSIS-FreeRTOS: Technical data and limitations

| CMSIS-FreeRTOS Version 10.4.6 CMSIS-RTOS2 compliant FreeRTOS Implementation

- Main Page
- Usage and Description
- Reference

All Functions Groups Pages
Technical data and limitations

This lists the technical data of CMSIS-FreeRTOS.

# Limitations

The following list briefly describes the limitations and unsupported features of the CMSIS-RTOS2 wrapper for FreeRTOS:

- Static memory allocation will only work if all memory (from attributes structure) is provided statically. In order to allocate object memory statically, you need to:
  - provide the memory for control blocks and stack in the `osThreadAttr_t` structure for threads.
  - provide the memory for control blocks and message data in the `osMessageQueueAttr_t` structure for memory queues.
  - provide the memory for control blocks for other objects in the object's attributes structure.
- Each timer object requires additional 8 bytes of memory:
  - to allocate all memory statically, provide the memory for control block of size (sizeof(StaticTimer_t) + 8 bytes)
  - otherwise, additional 8 bytes of dynamic memory will be used
- `osKernelSuspend` and `osKernelResume` are not supported.
- `osThreadDetach`, `osThreadJoin()` and attribute `osThreadJoinable` are not supported (`osThreadNew` returns NULL when osThreadJoinable attribute is specified).
- `osThreadGetStackSize` is not implemented.
- Event flags are limited to 24 bits.
- `osEventFlagsGetName` is not implemented.
- `osEventFlagsWait` cannot be called from an ISR.
- Priority inherit protocol is used as default mutex behavior (`osMutexNew` creates priority inherit mutex object by default and ignores `osMutexPrioInherit` attribute when specified).
- Robust mutex objects are not supported (`osMutexNew` returns NULL when `osMutexRobust` attribute is specified).
- `osMutexGetName` is not implemented and always returns NULL.
- `osSemaphoreGetName` is not implemented and always returns NULL.
- `osMessageQueueGetName` is not implemented and always returns NULL.
- `osMessageQueuePut` and `osMessageQueueGet` always ignore message priority.

# CMSIS-RTOS validation suite results

CMSIS provides a validation suite that can be used to test a real-time operating system for compliance to the standard. The test suite has been run successfully on the CMSIS-FreeRTOS implementation with the following exceptions:

TC_ThreadParam:

- Reason: unsupported feature
- Test attempts to test `osThreadJoin` and `osThreadDetach` functions for invalid parameter input. These two functions are not implemented.

TC_ThreadInterrupts:

- Reason: unsupported feature
- Test attempts to call `osThreadJoin` and `osThreadDetach` from the ISR. These two functions are not implemented.

TC_EventFlagsInterrupts:

- Reason: unsupported feature
- Test attempts to call `osEventFlagsWait` from the ISR. Wrapper implementation does not allow function `osEventFlagsWait` to be called from interrupts.

TC_MutexRobust:

- Reason: unsupported feature
- Test attempts to create robust mutex. FreeRTOS implementation does not support robust mutexes.

TC_MutexOwnership:

- Reason: unsupported feature
- Test attempts to release a mutex from a thread which is not the mutex owner. Test fails, because FreeRTOS implementation does not verify ownership on mutex release.