Cannot create breakpoint in main_cm4.c on PSoC6

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

cross mob
ToPe_1312931
Level 4
Level 4
10 replies posted 10 questions asked 5 replies posted

I am using PSoC Creator 4.3 PDL 3.1.1 and sample project CE223368 (USB CDC). Custom board with CY8C6247BZI-D54 processor. PSoC Programmer 3.29.0 in SWD mode. When selecting Debug Target, I must select the M0+, or I get an error dbg.M0007, Invalid thread id: 1. I cannot click on a line in the main_cm4.c file and get a solid red breakpoint circle, just a hollow red circle. The debugger does not stop there. The bottom left of the debugger says "Debugging ARM CM0+ - Running". I am working remotely, so cannot press the reset button and attach to running target. I have tried everything I have read regarding this.

Any help is greatly appreciated.

0 Likes
5 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello,

If you want to debug the CM4 core (main_cm4.c file), then you must select the Debug Target as CM4. Are you seeing the error "dbg.M0007, Invalid thread id: 1" only when selecting the CM4 core? Which debugger probe are you using?

Have you disabled the CM4 DAP or played around with EFuse lifecycle modes? If I run the Code Example on PSoC6 WIFI-BT Kit, I am able to select either of the cores and debug correctly.pastedImage_22.png

pastedImage_23.png

Can you please try it on a different board and see if the issue persists? Please share the schematic of the board so that we can see what might be going wrong.

Regards,
Dheeraj

0 Likes
lock attach
Attachments are accessible only for community members.

I can select the CM4 as the debugger target as shown in your first screenshot. The board is programmed. I then click Debug without Programming. I get the M007 error, dismiss and then get an M0015 error. If I just select Debug a popup wants me to select the target. Only the M0+ works, the M4 gives me errors. When I select the M0+, I am not allowed to set a breakpoint in main_cm4.c. My programmer is a Kitprog3. I have tried on 2 different boards with 2 different Kitprog3's. Using SWD mode. Here is the relevant piece of the schematic.

0 Likes

The screenshot only has the SWD pin connectors. Can you please share the schematic of the MCU's power supply connections if not the entire schematic.

Also, please note that KitProg3 is an onboard programmer/debugger guaranteed to work with Cypress kits only. It not guaranteed to work with custom boards or different devices. I would suggest using MiniProg4 in such cases. If you have one already, can you please try with that and let me know if it works?

Regards,

Dheeraj

0 Likes
lock attach
Attachments are accessible only for community members.

I can't share the whole schematic. Proprietary. But, here are power

pieces.

Todd Peterson

Management Sciences, Inc.

6022 Constitution Ave NE

Albuquerque, NM 87110

505-255-8611 (office)

505-205-7057 (cell)

0 Likes

Reviewed the schematic. Everything is in accordance with the Hardware Design Guide. In PSoC Creator, go to Debug > Delete all breakpoints and then try debugging the CM4 core. If the issue persists, can you please try running any of the other code examples without any modifications and see if you can debug?

Regards,

Dheeraj

0 Likes