2026-03-24 10:25 AM
Hello,
I found a CubeMX database issue affecting STM32H747 dual-core projects using FreeRTOS with CMSIS-RTOS V2.
Environment
MCU: STM32H747
Cube/HAL: STM32CubeH7 1.13.x
CubeMX: 6.17
FreeRTOS: 10.6.2
Problem
Two FreeRTOS configuration parameters are not present in the MicroXplorer Configuration settings and are not retained in the internal IOC model:
configUSE_SB_COMPLETED_CALLBACK
configUSE_MINI_LIST_ITEMBecause of that, code generation can produce invalid output in FreeRTOSConfig.h such as:
#define configUSE_MINI_LIST_ITEM ( valueNotSetted )
#define configUSE_SB_COMPLETED_CALLBACK ( valueNotSetted )This breaks the build and/or downstream FreeRTOS code.
Editing the .ioc manually does not solve it permanently, because CubeMX overwrites the .ioc on regeneration.
Adding manual defines in USER CODE blocks is only a local workaround and does not fix the root cause.
Root cause found
The issue appears to be in the CubeMX FreeRTOS mode database, not in the generated project itself.
For STM32H747, CubeMX uses a FreeRTOS mode definition named FREERTOS-v8.0.0_Cube_Modes.xml for the UI/model layer, even though the generated FreeRTOS content/template is 10.6.2.
Inside that mode file, the two missing parameters were defined with a condition using: S_CMSIS_RTOS_V2
Without $context, those parameters are not properly exposed or persisted for the per-core FreeRTOS instances.
Local fix that works
In the CubeMX database file db/mcu/IP/FREERTOS-v8.0.0_Cube_Modes.xml, change the condition for configUSE_SB_COMPLETED_CALLBACK from S_CMSIS_RTOS_V2 to S_CMSIS_RTOS_V2$context.
Do the same for configUSE_MINI_LIST_ITEM, again changing S_CMSIS_RTOS_V2 to S_CMSIS_RTOS_V2$context.
After this change, the issue is fixed on my side.
Additional defensive fix
To prevent broken generation even if the parameters are still missing in some cases, I also added fallback defaults in the FreeRTOS H7 template file db/templates/freertos_conf_v10_6_2_cmsis_v2.ftl.
The defaults I added were:
This avoids generation of valueNotSetted in FreeRTOSConfig.h.
Why this is confusing
CubeMX shows or generates FreeRTOS 10.6.2, but the bug is in the v8.0.0_Cube mode XML.
From debugging this, it looks like:
So the wrong behavior comes from the UI/model database, while the generated template already expects the two parameters correctly.
Expected behavior
For STM32H747 FreeRTOS CMSIS-V2 projects, CubeMX should:
Observed behavior
CubeMX omits those settings from the model/UI for H747 and can generate invalid FreeRTOSConfig.h output where configUSE_MINI_LIST_ITEM and configUSE_SB_COMPLETED_CALLBACK are set to valueNotSetted.
Request
Please fix the FreeRTOS mode database for H747 dual-core/per-context handling so these two parameters use the correct context-aware condition and are always generated with valid values.
Solved! Go to Solution.
2026-03-25 1:45 AM - edited 2026-03-25 7:36 AM
Hello @ruddy17
Your detailed explanation is much appreciated.
Issue has been escalated to dev team under internal ticket ID #0060998
I will keep you posted with updates.
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.
2026-03-24 10:32 AM
I can confirm this is a real CubeMX code generation bug.
With newer FreeRTOS, CubeMX generated the following invalid setting in FreeRTOSConfig.h:
#define configUSE_MINI_LIST_ITEM ( valueNotSetted )
Because this is used in preprocessor #if expressions, it effectively behaves as 0. In newer FreeRTOS versions this changes the internal layout of List_t / MiniListItem_t.
As a result, FreeRTOS thread-aware debugging breaks. In my case:
2026-03-25 1:45 AM - edited 2026-03-25 7:36 AM
Hello @ruddy17
Your detailed explanation is much appreciated.
Issue has been escalated to dev team under internal ticket ID #0060998
I will keep you posted with updates.
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.