Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Panometric
Level 5
Level 5
10 likes received 100 sign-ins 100 replies posted

Recently, I cannot start a debug session, yet I can do the flash operation. I've tried other targets, regenerating launches, and rebooting, and none of them work. It's not clear why the debug session isn't completing.  Using a Kitprog 3. 

Console:

Started by GNU MCU Eclipse
Open On-Chip Debugger 0.11.0+dev-4.3.0.1746 (2021-09-16-07:59)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
adapter speed: 2000 kHz
adapter srst delay: 25
adapter srst pulse_width: 25
** Auto-acquire enabled, use "set ENABLE_ACQUIRE 0" to disable
cortex_m reset_config sysresetreq
cortex_m reset_config sysresetreq
Warn : SFlash programming allowed for regions: USER, TOC, KEY
Info : Using CMSIS-DAPv2 interface with VID:PID=0x04b4:0xf155, serial=1B1A05DD00189400
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : KitProg3: FW version: 2.30.1155
Info : KitProg3: Pipelined transfers enabled
Info : VTarget = 3.294 V
Info : kitprog3: acquiring the device (mode: reset)...
Info : clock speed 2000 kHz
Info : SWD DPIDR 0x6ba02477
Info : psoc6.cpu.cm0: hardware has 4 breakpoints, 2 watchpoints
***************************************
** Silicon: 0xE2F0, Family: 0x100, Rev.: 0x24 (B3)
** Detected Device: CYBLE-416045-02
** Detected Main Flash size, kb: 1024
** Flash Boot version: 1.20.1.45
** Chip Protection: NORMAL
***************************************
Info : psoc6.cpu.cm4: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for psoc6.cpu.cm0 on 3332
Info : Listening on port 3332 for gdb connections
Info : starting gdb server for psoc6.cpu.cm4 on 3333
Info : Listening on port 3333 for gdb connections
Info : SWD DPIDR 0x6ba02477
Info : kitprog3: acquiring the device (mode: reset)...
psoc6.cpu.cm0 halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00001f34 msp: 0x080477a8
** Device acquired successfully
** psoc6.cpu.cm4: Ran after reset and before halt...
psoc6.cpu.cm4 halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x1600400c msp: 00000000
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections


Error message:

Error in final launch sequence
Failed to execute MI command:
load C:/.....hex
Error message from debugger back end:
Error finishing flash operation
Failed to execute MI command:
load C:/.....hex
Error message from debugger back end:
Error finishing flash operation
Error finishing flash operation

 

 

 

0 Likes
1 Solution
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @Panometric 

The reason it was getting stuck may be because there was already a debug session going on. So a new debug session could not be launched.

Regards,
Leo

View solution in original post

3 Replies
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @Panometric ,

Can you please try a few things and share your results with us -

1. Can you please try changing the USB port?

2. Is there any breakpoint in the code? Can you please try removing that and check?

3. Can you please share a screenshot of the debuggers tab under debugger configurations?

Best Regards,

Aashita

0 Likes
Panometric
Level 5
Level 5
10 likes received 100 sign-ins 100 replies posted

@Aashita_R, Unfortunately I can't seem to recreate it now.  It was blocking so I stopped some other large programs I had running and rebooted the PC.  I also reverted any change to the launch files, but I can't say what fixed  it.  It was just frustrating that the error message was so useless.  I see now the next step is:

 

Info : accepting 'gdb' connection on tcp/3333
Info : New GDB Connection: 1, Target psoc6.cpu.cm4, state: halted
Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333"
semihosting is enabled
Info : Auto-detected RTOS: FreeRTOS
Info : Auto-detected RTOS: FreeRTOS
Info : All data matches, Flash programming skipped
Info : SWD DPIDR 0x6ba02477
psoc6.cpu.cm4 halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x10009ace msp: 0x080477e0, semihosting
Info : psoc6.cpu.cm4: bkpt @0x100022D1, issuing SYSRESETREQ
Info : SWD DPIDR 0x6ba02477
psoc6.cpu.cm4 halted due to debug-request, current mode: Thread 
xPSR: 0x61000000 pc: 0x100022d0 msp: 0x08047800, semihosting
Info : psoc6.cpu.cm0: external reset detected
===== arm v7m registers

Panometric_0-1689089406267.png

So is it fair to say it was getting stuck at establishing a connection to port 3333?

Is it possible that could be broken by using a VPN?

Otherwise, I hope you will try to make the error message more specific. 

 

 

 

0 Likes
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @Panometric 

The reason it was getting stuck may be because there was already a debug session going on. So a new debug session could not be launched.

Regards,
Leo