Skip to main content
Graduate
June 30, 2025
Solved

Confused about IOC, FreeRTOS, and CMSIS_OS2

  • June 30, 2025
  • 1 reply
  • 640 views

Please enlighten me. I added FreeRTOS to my STM32CubeIDE project using IOC. I discovered that I had to choose either CMSIS_V1 or CMSIS_V2 as the FreeRTOS Mode, else FreeRTOS would not be included. I chose CMSIS_V2. I then noticed the FreeRTOS Configuration pane and added a task, timer, and Queue. Upon finding the generated code, I noticed they are created with osThreadNew, osTimerNew, , and osMessageQueueNew. I was expecting xTaskCreateStatic, xTimerCreateStatic, and xQueueCreateStatic instead.

Are the three set of functions somehow the same, or is one a wrapper for the other, or what? Can I still use the FreeRTOS Reference Manual, or do need to find and consult the CMSIS_V2 OS manual instead? Or, maybe I did something wrong.

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    CMSIS_V1 and CMSIS_V2 are CMSIS wrappers for RTOS implementation. So the application is RTOS agnostic. See CMSIS-RTOS2.

    To my knowledge you can still use FreeRTOS APIs but I don't have idea about the impact.

    So I recommend to use CMSIS wrappers to prevent any issue.

    You can inspire from the examples provided for FreeRTOS in github: https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Applications/FreeRTOS

    Hope it helps.

    1 reply

    mƎALLEmAnswer
    Technical Moderator
    June 30, 2025

    Hello,

    CMSIS_V1 and CMSIS_V2 are CMSIS wrappers for RTOS implementation. So the application is RTOS agnostic. See CMSIS-RTOS2.

    To my knowledge you can still use FreeRTOS APIs but I don't have idea about the impact.

    So I recommend to use CMSIS wrappers to prevent any issue.

    You can inspire from the examples provided for FreeRTOS in github: https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Applications/FreeRTOS

    Hope it helps.