cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Issue with STM32CubeIDE

romi
Associate II

Hello,

I am encountering an issue while debugging a project using STM32CubeIDE. The problem arises when I start the debugging process. Below is the output from the console:

Open On-Chip Debugger 0.12.0+dev-00597-ga5a21219f (2024-06-03-11:04) 
Licensed under GNU GPL v2
For bug reports, read
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : STLINK V2J45S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.198949
Info : clock speed 1800 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x1ba01477
Info : [STM32F103C8Tx.cpu] Cortex-M3 r1p1 processor detected
Info : [STM32F103C8Tx.cpu] target has 6 breakpoints, 4 watchpoints
Info : [STM32F103C8Tx.cpu] Examination succeed
Info : starting gdb server for STM32F103C8Tx.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x20036410
Info : flash size = 64 KiB
undefined debug reason 8 (UNDEFINED) - target needs reset
Info : accepting 'gdb' connection on tcp/3333
undefined debug reason 8 (UNDEFINED) - target needs reset
[STM32F103C8Tx.cpu] halted due to breakpoint, current mode: Thread
xPSR: 0x01000000 pc: 0x080004a8 msp: 0x20005000
[STM32F103C8Tx.cpu] halted due to breakpoint, current mode: Thread
xPSR: 0x01000000 pc: 0x080004a8 msp: 0x20005000
Info : dropped 'gdb' connection
[STM32F103C8Tx.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x080005e0 msp: 0x20004fd8
shutdown command invoked
Info : dropped 'gdb' connection      

It seems to repeatedly halt due to a breakpoint, and there’s an "undefined debug reason 8 (UNDEFINED)" error message indicating that the target needs a reset. The debugger appears to lose the connection after this.

Could  please provide guidance on how to resolve this issue or any suggestions on what might be causing it?

Thank you.

0 REPLIES 0