2026-04-28 5:37 AM
Hello,
I’m working on a project generated by STM32Cube AI Studio targeting the NUCLEO-N657X0-Q, using an XIP configuration with external XSPI flash ( It was said in another post that the generated projects from STM cube AI Studio follow XIP configuration).
Model location (from generated network.c):
I programmed manually using STM32CubeProgrammer:
I start debugging from the FSBL project.
In Debug Configuration → Startup → Load Image and Symbols, I configured:
So FSBL is loaded/debugged, while App and model are already present in flash.
Additionally, I also tried adding the runtime GCC libraries to the FSBL debug configuration, but this did not change the behavior
Application reaches:
Execution enters:
Execution gets stuck in:
Observed behavior:
Thanks for your assistance
2026-04-28 7:23 AM
To verify that the application is actually running, I added a simple GPIO test:
I also tried UART debugging. USART1 is initialized and I have used USART1 successfully on the same board in other projects. However, in this Cube AI Studio project, printf does not output anything. I noticed that _write() is already defined in aiTestUtility.c, so I did not add a duplicate _write() in main.c.
Can you please provide and explanation/tutorial that would be very helpful
2026-04-29 2:54 AM
Update :
I now understand that not being able to use the virtual com port or leds to debug was because they were not configured in the generated Cube mx project , but i still didnt find a solution to the inference stuck in the aiRun() Loop
2026-04-30 7:45 AM
2026-05-04 4:55 AM
Hello @ayaaaa
On my side, your project is not stuck in the while loop:
I will share with you a NUCLEO-N657X0-Q project with outputs in UART, if it works on your side, I will try to help you to modify the model integrated in it.
Best regards,
Yanis
2026-05-05 12:08 AM
Thanks for your reply !
Okay i see , i must be doing something wrong then in the debugging phase , can share with me please how you debugged (app/fsbl) with options and also the positions of boot 0 and boot1. Thanks
2026-05-05 12:23 AM
Im sorry but it doesnt work , when i try to debug the application i get this error
and when i try to debug the fsbl it doesnt get to the application , was i supposed to flash it manually beforehand or anyhting else ?
2026-05-05 12:28 AM
Hello,
Yes, startup is quite tricky.
Either you start using this tutorial: How to debug STM32N6 using STM32CubeIDE - STMicroelectronics Community
Or, you can avoid signing procedure by:
- Flash Appli.elf with STM32CubeProg
- Power cycle your board
- Start your debug session with FSBL, and "Download" only the FSBL .elf file.
Best regards,
Yanis
2026-05-05 12:41 AM
i did actually end up following the tutorial ( which i did in my intiial project too )
this is the configuration :
i ended up with the same error on the fsbl debug too !
I figured it might be a board problem , but its not as old project debug normally .
2026-05-05 12:57 AM
Could you please try to disable the first "binary" flash and only load the FSBL to see what happens?
You have two kinds of errors:
- ST-Link probe undetected => power-cycle required
- Startup issue => related to flashing procedure
Be aware that setting up breakpoints prior to jump to Application can lead to startup issues as well.