- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found it. I was calling Cy_SysEnableCM4(CY_CORTEX_M4_APPL_ADDR); before doing SystemInit() in the CM0+ and before __enable_irq();.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried using PDL 3.1.1 and the result is the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found it. I was calling Cy_SysEnableCM4(CY_CORTEX_M4_APPL_ADDR); before doing SystemInit() in the CM0+ and before __enable_irq();.