2026-02-20 2:59 AM - last edited on 2026-02-20 3:03 AM by Andrew Neil
Hi,
I am trying to debug my STM32N6570-DK board, i followed the steps listed under 4.1.3 (Debugging the application) in the getting started instruction list (https://www.st.com.cn/resource/en/application_note/an6265-getting-started-with-stm32n6-mcus-in-stm32cubeide-stmicroelectronics.pdf). When i try to debug the application, it starts normally (code uploads to the external memory), but when i click resume to start the program, the debugger loses connection and eventually exits debug mode. The program I am trying to debug was made using TouchGFX, it's configured as an FreeRTOS project. This is the output the debugger gives to me:
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
Target is not responding, retrying...
GdbSession, Lost target connection, Exiting...
GdbSession, Lost target connection, Exiting...
Shutting down...
Exit.
2026-02-25 1:42 AM
Hello @Ko1rr1ef ,
Let me thank you for your feedback.
Before launching the debug session, I recommend that you erase the board memory with STM32CubeProgrammer.
Thanks.
Mahmoud
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-02-25 2:04 AM
Hello @Mahmoud Ben Romdhane
I performed a full chip erase of the external memory using STM32CubeProgrammer. After the erase completed, I attempted to debug again, but the console output remained exactly the same as before.
For completeness: I can successfully upload and run programs using STM32CubeProgrammer. The same project that fails during debugging runs correctly when flashed via CubeProgrammer.