Modern embedded applications often need to concurrently execute multiple activities such as sensor readings, connectivity, machine-learning algorithms, graphics display and others. A real-time operating system (RTOS) equips users with necessary mechanisms that simplify implementation of complex programs and ensure their reliable operation with deterministic timing.
CMSIS-RTOS2 specifies a generic RTOS interface over real-time OS kernels running on Arm® Cortex® processor-based devices. Applications and middleware components can use CMSIS_RTOS2 API for better code reuse and simpler integration in various software ecosystems.
CMSIS-RTOS2 also specifies a standard OS Tick interface for use by RTOS kernels. It provides several OS tick implementations for simple kernel porting to different Cortex-M and Cortex-A processors.
CMSIS-RTOS2 provides great benefits to the embedded developers and software vendors:
Note
- The CMSIS-RTOS2 defines a minimum feature set. It's architecture allows to use advanced vendor-specific features directly as well.
Many popular RTOS kernels include support for CMSIS-RTOS2 API:
CMSIS-RTX (or Keil RTX5): provides most complete support for CMSIS-RTOS2 API and uses it as native interface. For more information see:
FreeRTOS : this popular RTOS kernel is enabled with CMSIS-RTOS2 API in the CMSIS-FreeRTOS variant. To learn more see:
Zephyr RTOS: is developed under governance of Linux Foundation and includes CMSIS-RTOS2 API support. See more at:
embOS: is a preemptive RTOS designed by Segger, and provides support for CMSIS-RTOS2 API.
Azure ThreadX RTOS for STM32: is an integration of Azure RTOS into STM32 middleware provided by STMicroelectronics.
Micrium OS is developed and maintained by Silicon Labs.
CMSIS-RTOS2 and OS Tick intefaces are actively maintained in the CMSIS 6 GitHub repository and provided as part of the CMSIS Software Pack.
The following files and directories relevant to CMSIS-RTOS2 are present in the ARM::CMSIS Pack:
File/Directory | Content |
---|---|
📂 CMSIS | CMSIS Base software components folder |
┣ 📂 Documentation/html/RTOS2 | A local copy of this CMSIS-RTOS2 documentation |
┗ 📂 RTOS2 | CMSIS-RTOS2 API header files and OS tick implementations |
┣ 📂 Include | API header files |
┣ 📄 cmsis_os2.h | cmsis_os2.h API header file |
┗ 📄 os_tick.h | OS Tick API header file |
┗ 📂 Source | OS tick implementations |
┣ 📄 os_systick.c | OS tick implementation using Cortex-M SysTick timer |
┣ 📄 os_tick_gtim.c | OS tick implementation using Cortex-A Generic Timer |
┗ 📄 os_tick_ptim.c | OS tick implementation using Cortex-A Private Timer |