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.
