Error: dbg.M0015: Debugger exited unexpectedly during run.

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

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

I am unable to debug either cores of the PSoC 6 in PSoC Creator 4.3. The programming seems to be working fine, but as soon as it begins to run, I get the error dbg.M0015.

One thing that looks suspicious is that when I select the debug target, I don't see the cores of the psoc 6 unless I click on Port Acquire. Both issues seem to be connected somehow.

Any idea what could be causing this?

Thanks

0 Likes
1 Solution

Thanks everyone for your help. I found the issue. It was a hardware issue caused by a patch on my pcb. The patch was accidentally making a short between a gpio pin of the psoc and swdio. If the pin was set as an input, everything was fine, but if it was set as an output, then debug would fail, which makes sense.

Thanks again

View solution in original post

0 Likes
8 Replies
Rakshith
Moderator
Moderator
Moderator
250 likes received 1000 replies posted 750 replies posted

Hi AnCi_2234676​,

1. Can you please let me know if this issue is found only with one project or all projects? You can try programming one of the code examples and then debugging the device and let me know your observations.

2. Check the resolution in this thread - PSoC Creator frequently fails starting the debugger

3. Are you putting the device to sleep or deep sleep in your application?

If these steps do not help, can you please attach your project so that I can try it out?

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes

Hi RakshithM_16​,

1. I can debug example projects.

2. Debug is correctly set to SWD.

3. Yes, device is set to be able to sleep, but it doesn't reach that point in the firmware. In fact, it doesn't even seem to reach the entry point.

I can't share my project because of confidentiality issues. Is there some other things I can try or verify?

0 Likes
KeSn_4175816
Level 2
Level 2
10 sign-ins 10 replies posted 5 replies posted

I have had this issue for a while with other PSoC architectures (4 and 5), even with the Chip Protection set to Open. Assuming you're using Kitprog....


I think it might be related to a Kitprog Firmware issue (see latest reply in Debug mode keeps failing/disconnecting)

I have found that reverting to an older kitprog firmware version has worked.

  1. Using the Cypress Update manager to uninstall Psoc Programmer
  2. Download and install PSoC Programmer 3.26  from the PSoC Programmer archive:  https://www.cypress.com/documentation/software-and-drivers/psoc-programmer-archive  (note you may have to try a couple different versions of the programmer to get a firmware that works for you, I haven't done this with a 6 series yet)
  3. Open PSoC Programmer, connect your device and follow the usual 'upgrade firmware' procedure. If you installed PSoC Programmer 3.26, then the Kitprog firmware should be v2.18

Please keep us updated.

-KeSn

0 Likes

Hi KeSn_4175816​,

I am using a Miniprog4. It is not detected by PSoC Programmer versions earlier than 3.28. I tried all of them without success.

I also tried uninstalling everything related to cypress and reinstalling the latest version of Creator, but I still get the same issue.

0 Likes

Hi AnCi_2234676​,

As you are able to debug other projects the programming parameters and the debugger seems to be working fine. This might be a project-specific issue. You also have mentioned that you are able to program the device properly. So the project port settings also seem to be correct.

In fact, it doesn't even seem to reach the entry point

Can you please let me know how you found this out? Are you telling this because the debugger exits before reaching main() ?

One thing that looks suspicious is that when I select the debug target, I don't see the cores of the psoc 6 unless I click on Port Acquire

I have noticed this when I try to acquire the device when the device is in deep sleep.

Can you please remove the deep sleep code, program the device, and now try to debug the device?

Please let me know your observations.

Thanks and Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes
In fact, it doesn't even seem to reach the entry point

Can you please let me know how you found this out? Are you telling this because the debugger exits before reaching main() ?

Yes, the debugger exits before reaching main().

One thing that looks suspicious is that when I select the debug target, I don't see the cores of the psoc 6 unless I click on Port Acquire

I have noticed this when I try to acquire the device when the device is in deep sleep.

Can you please remove the deep sleep code, program the device, and now try to debug the device?

I removed the deep sleep code and still get the same behaviour.

Thanks for your help.

Let me know if there is anything else I can try.

0 Likes

Thanks everyone for your help. I found the issue. It was a hardware issue caused by a patch on my pcb. The patch was accidentally making a short between a gpio pin of the psoc and swdio. If the pin was set as an input, everything was fine, but if it was set as an output, then debug would fail, which makes sense.

Thanks again

0 Likes

Hi AnCi_2234676​,

Thank you for providing an update on the thread

Regards,

Rakshith M B

Thanks and Regards,
Rakshith M B
0 Likes