2026-05-06 4:55 AM
I am trying to debug AI application via FSBL (generated itself in STM32cube AI studio) , I have attached the debugger settings and Problem hereby. I had added some printf statements also in between , whose Teraterm output I have attached.
Kindly help.
Regards
Chanchal
Solved! Go to Solution.
2026-05-07 12:17 AM
debugging Cortex-M Hard Faults
2026-05-07 12:17 AM
debugging Cortex-M Hard Faults
2026-05-11 4:08 AM
I have a very similar problem. My hypothesis is that the code expects to find the model's weight in the external Flash memory, but in debug mode, the binary is directly downloaded in the RAM, skipping the Flash. when executing the first operation, it reaches uninitialized memory and thus goes in HardFault mode.
I did not succeeded in fixing this. I tried to add a flashing step in my debug configuration, but it did not help. Maybe the weights are not expected to be downloaded in the FSBL section (@0x70000000).
The only way I successfully ran an inference was by flashing a "complex" project (FSBL + APPLI), but it looses the debugging capabilities, so I would like to find how to properly Debug STM32Cube AI studio projects.
Regards,
Julien
2026-05-22 5:35 AM
You can check the memory addresses in external memory manager and FSBL load & run file. After that go to cube programmer and try full chip erase and reflash the binaries of application and FSBL again at respective addresses according to the address in memory manager, and then again try to debug . Sometimes it clears the fault. Also you have to flash network weights at 0x71000000 not at 0x70000000. Application at 0x70100000 if you are using STM32N6570-DK. Also check the external memory loader is correct with respect to the board.
I hope any of this input can help you
Regards
Chanchal