Skip to main content
Associate III
October 15, 2025
Solved

Can CubeMX disable CMSIS when Enabling freeRTOS?

  • October 15, 2025
  • 1 reply
  • 347 views

Hi

It's a disaster that Current CubeMX have to select CMSIS when enabling freertos. many developers use raw freertos API to develop project. The project based on raw freertos api is more compatiable with other MCUs, also they are familar with raw freertos API. I think this option should be reserved for developer. 

Is there any way to use raw freertos api in cubemx?

 

Peter3718_0-1760501201221.png

Peter

Best answer by Ghofrane GSOURI

Hello @Peter3718 

I have submitted your change request as internal ticket 219813 to our development team for a feasibility review.

I will keep you posted with updates.

THX

Ghofrane

 

1 reply

Ghofrane GSOURI
Technical Moderator
October 15, 2025

Hello @Peter3718 

You can use the raw FreeRTOS API in CubeMX projects even though CubeMX defaults to the CMSIS-OS wrapper. Simply include the FreeRTOS headers in your application code and use the native FreeRTOS functions as needed. You can ignore  the CMSIS-OS generated files if you don’t need them, but always place your custom code within the designated user code sections to prevent it from being overwritten during code regeneration. 

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Peter3718Author
Associate III
October 15, 2025

@Ghofrane GSOURI 

If so, what's different that i copy the freertos project to my project while disabling freertos in cubemx?This will be clean without CMSIS related files.

Peter

Ghofrane GSOURI
Technical Moderator
October 15, 2025

Hello @Peter3718 

You do not need to enable FreeRTOS in CubeMX if your goal is to use only the native FreeRTOS API and you want to avoid unnecessary CMSIS-OS files. The main reasons developers enable FreeRTOS in CubeMX are:

Automatic configuration: CubeMX helps set up tasks, priorities, stack sizes, and other RTOS settings through a graphical interface.
Code generation: CubeMX generates initialization code and integrates FreeRTOS with the STM32 HAL, saving manual setup time.

However, if you are comfortable configuring FreeRTOS yourself and want a clean project without CMSIS-OS files , you can skip enabling FreeRTOS in CubeMX. Instead, manually add and configure FreeRTOS in your project.

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.