2025-04-16 2:23 PM - edited 2025-04-17 5:09 AM
I had, after a considerable struggle, FreeRTOS debugging working in V18.1.0. It seems to have stopped working when the IDE was upgraded to 1.18.1.
I get the following in the debug console:
Unknown data structure layoutxLIST
Update threads. Failed collecting threads.
I have seen these errors in V1.18.0, but after changing debug settings, restarting the IDE and who knows what, they suddenly went away and it worked. In V1.18.1, no such luck. I got it to work again only by reverting back to V1.18.0, where it proceeded to work on the first try.
It would really be nice if FreeRTOS debugging worked reliably. It can be really hard to debug it if you cannot see each of the task stacks.
I am using a NUCLEO-G431KB on Windows 10.
2025-04-18 2:23 AM
Hello @rlk1 ,
First let me thank you for posting and welcome to the ST Community.
For more investigation, I suggest that you provide your STM32CubeIDE Project.
Thanks.
Mahmoud
2025-04-18 8:28 AM
Rather than just upload my project, I created a new project using the same IOC, and tried building and debugging it with V18.1.1. Much to my surprise it worked the first time. The only real difference between my original project and the new, was that the original project had configUSE_PORT_OPTIMISED_TASK_SELECTION set to 0, which was the only way I could get it to work under V18.1.0, whereas the new project had this set to the CubeMX default of 1. Changing configUSE_PORT_OPTIMISED_TASK_SELECTION to 1 in the original project allowed it to properly debug with V18.1.1.
Information on the proper setting of configUSE_PORT_OPTIMISED_TASK_SELECTION is conflicting. In addition, I believe this setting may depend on if you are using the ST-Link GDB server or the OpenOCD server. It would be nice, since STM Cube IDE nominally supports both ST-Link GDB server and OpenOCD server FreeRTOS debugging if there were an easily located set of instructions for setting these up and which specified the Cube IDE version to which they applied.