Skip to main content
Associate
Nov 4, 2026 10:20 PM UTC
Question

STM32CubeMX 6.18: FreeRTOS CMSIS-RTOS2 Non-Secure settings lost after reopening TrustZone project on STM32H563ZIT6

Hello,

I believe I have identified a bug in STM32CubeMX 6.18 on STM32H563ZIT6.

## Context
- MCU: STM32H563ZIT6
- Tool: STM32CubeMX 6.18
- Firmware package: STM32CubeH5 1.7.0
- Configuration: basic project, with no specific configuration other than:
  - TrustZone enabled
  - FreeRTOS enabled
  - CMSIS-RTOS2 enabled in both Secure and Non-Secure contexts

My goal is simply to run FreeRTOS with one task for now, and then set up proper memory management and access control, which requires using CMSIS-RTOS2 in the Non-Secure project.

## Observed behavior
When the project is created for the first time, everything works correctly:
- the project is generated successfully;
- the CMSIS-RTOS2 configuration on the Non-Secure side is accessible in the interface;
- the FreeRTOS / CMSIS-RTOS2 settings are correctly present in the `.ioc` file.

However, after saving and reopening the project in STM32CubeMX:
- the CMSIS checkbox on the Non-Secure side is still visible;
- but the CMSIS-RTOS2 Non-Secure configuration menu is no longer accessible;
- if the project is saved again, the CMSIS-RTOS2 Non-Secure settings disappear from the `.ioc` file.

## Impact
This behavior is very limiting, because the only workaround I have found so far to restore access to the CMSIS-RTOS2 Non-Secure configuration is to:
1. remove FreeRTOS from the Non-Secure side;
2. enable FreeRTOS again on the Non-Secure side.

But this causes the complete loss of the existing configuration.

## Reproducibility
The issue appears to be reproducible with a minimal configuration, without any additional complex settings.

## Question
Can you confirm whether this is a known bug in STM32CubeMX / STM32CubeH5?
Is there any fix or cleaner workaround than removing and re-enabling Non-Secure FreeRTOS?

Thank you.

7 replies

Ghofrane GSOURI
ST Technical Moderator
Nov 5, 2026 9:15 AM UTC

Hello ​@Marc_AlpesDEIS 

Could you please provide your IOC?

I will be waiting for your feedback.

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.
Associate
Nov 5, 2026 11:17 AM UTC

Hello ​@Ghofrane GSOURI ,

Thank you to take my point.
One Confirmation, I use the STM32CubeMX in version 6.18.1 not 6.18

Please find 2 IOC file

  1. with the RTOS config present juste after creation.
  2. A seconde juste after reopen it and perform a save (Ctrl+S).

Marc

Associate
Nov 6, 2026 12:35 PM UTC

Hello ​@Ghofrane GSOURI 

Do you have any feedback on this problem ? 

Best Regards, 
Marc

Ghofrane GSOURI
ST Technical Moderator
Nov 9, 2026 9:11 AM UTC

Hello ​@Marc_AlpesDEIS 

After opening both files “TestProjetTZ - VersionWithRTOSConfig.ioc and TestProjetTZ” and “TestProjetTZ -VersionAfterReopenAndSave.ioc” I was able to access the Non-Secure FreeRTOS configuration menu in both cases, as shown in the attached screenshots. The Non-Secure runtime context is selected, and CMSIS-RTOS2 is enabled.

Therefore, I have not reproduced the reported loss of access to the configuration menu with these files. 

Let’s try to close STM32CubeMX completely, hen delete .stm32cubemx and .stmcufinder from your Windows user folder 

then open your projects again 

 

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.
Associate
Nov 9, 2026 7:42 PM UTC

Dear ​@Ghofrane GSOURI ,

I performed the test on a clean installation on another PC, and the issue persists.

You do not have full access to the configuration tab; however, this is not immediately apparent when simply opening the IOC file. In both cases, the display is exactly the same like your screenshot.

 

Nevertheless, by comparing the two files, you can see the difference: all lines related to the RTOS configuration are gone.

In fact, you are encountering the same issue that I did: in your screenshot, the "CMSIS RTOS2" tab—which is used to configure tasks, queues, timers, semaphores, mutexes, events, and FreeRTOS heap usage—is missing.

 

 

You can follow the procedure to make the tab appear again.
Thank you in advance for your analysis.


Best Regards,
Marc

Associate
Nov 10, 2026 6:24 PM UTC

Dear ​@Ghofrane GSOURI ,

Small precision, after a code generation, notion appear in the file app_freertos.c, the Mx_init_Freertos rezmik empty and not integrated in the main(). 

 

Thank you in advance.

BR, 

Marc 

Ghofrane GSOURI
ST Technical Moderator
Nov 11, 2026 8:51 AM UTC

Hello ​@Marc_AlpesDEIS 

After checking internally , this issue has already been detected and escalated to dev team under the following  tickets ID 223277 and 226531 and it will be fixed as soon as possible.

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.