Unable to debug CYBLE-416045-02's CM4

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

cross mob
user_1669321
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi,

I want to debug the CM4 in my CYBLE-416045-02 project, but I get these two errors after the programming:

dbg.M0007 The run request failed. Encountered error (Invalid thread id: 1)

dbg.M0015 Debugger exited unexpectedly during run. Encountered error (Remote communication error. Target disconnected.: No error.)

I tried with the example project Find Me (CE217637) and was able to debug the CM4, so the problem is not hardware.

I validated that the linker scripts are identical (we use the bootloader scripts in release but we use the default ones when we need to debug).

Both projects use PDL 3.0.4.

0 Likes
1 Solution

Found it. I was calling Cy_SysEnableCM4(CY_CORTEX_M4_APPL_ADDR); before doing SystemInit() in the CM0+ and before __enable_irq();.

View solution in original post

0 Likes
3 Replies
user_1669321
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

I commented the Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT); line in the CM0+ and was then able to debug, but not put any breakpoints. When I pressed pause, the disassembly window appeared, with the pointer just before 0x10080000.

0 Likes

I have tried using PDL 3.1.1 and the result is the same.

0 Likes

Found it. I was calling Cy_SysEnableCM4(CY_CORTEX_M4_APPL_ADDR); before doing SystemInit() in the CM0+ and before __enable_irq();.

0 Likes