cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

Contributor II

I am trying to debug the CM4 core.  I select the CM4 as the debug target and click on Debug.  The resume (F5) is grayed out.  I can add breakpoints but I have no way to resume.

pastedImage_0.png

How do I get to my breakpoint?

1 Solution
Moderator
Moderator

I am the technical marketing owner at Cypress  for programming tools generally. That includes PSoC Programmer. Let me jump in to provide a progress report.

EDIT: PSoC Programmer 3.28.3 is now available online here. This latest release has fixed the bug and you will now be able to successfully debug the CM4 core with PDL3.1.0 .

---

There is a workaround, detailed in KBA227094.

A new release of PSoC Programmer will fix this problem. That release is built, tested, and going through our release review process. I have approved it for release, but I'm not the only person in that chain. With luck it becomes available in a few days. Ii should be numbered 3.28.3. The purpose of this release is simply to fix this bug. (Behind the scenes, PSoC Creator uses the capabilities provided by PSoC Programmer to set up a debug session. The bug in the debugging process is actually in PSoC Programmer. Update that, and the bug goes away.)

I will post here again when PSoC Programmer 3.28.3 is publicly available.

This is a defect that escaped our testing, for which I personally apologize. No one likes it when stuff like this happens. We have root-caused WHY it escaped, so that will reduce the chance of this happening again..

I want to thank everyone on this thread for both reporting the issue, and for your patience as we figured out what was going on. This was pretty subtle.

Jim

View solution in original post

30 Replies
Moderator
Moderator

user_249199259mroberts_arrow

1;Help to check the project attributes, if it is Read-only, modify it.

pastedImage_0.png

2;If you double click the XXXX.exe file to open the project, close it, and open it use the following steps:

open creator->File->Open project.

Contributor II

That didn't help.  I still have the resume button greyed out.  I have no idea how to start running.

pastedImage_1.png

pastedImage_0.png

0 Likes
Reply
Moderator
Moderator

Could you attached your project here?

Generally, it is caused by the project attributes.

0 Likes
Reply
New Contributor II

Same issue. I am using CY8CPROTO-063-BLE. Tried creating a blank new project, building, and debugging the CM4 (using the on-board KitProg2.) Same result -- it "runs" (suspecting without a proper reset), and if I break manually it lands in unknown stack level and Disassembly code.

The selected device is CYBLE-416045-02. I am using PDL 3.1.0. The Updater is happy with all components, i.e. they are all up to date.

Odd that CM4 debug was working recently in my project ... I changed something. But un-packing and trying an old archive did not help. The fact that the blank project also did not allow debug either has me thinking it is something about my updated PDL library or a Creator configuration, or something persistent between project selections.

My Tools-->Options-->Program/Debug-->General  are like so:

PSoC Creator Debug Options dialog.png

I'll watch this thread. Thanks.

0 Likes
Reply
Contributor II

LinglingG_46

It is any project.  This is the BLE_FindMe example  v1.10 that I retargeted for the CYBLE-416045-02.  It has to be something basic that I am missing.

0 Likes
Reply
Moderator
Moderator

Hi mroberts_arrowuser_249199259

I tested the debugging issue of module CYBLE-416045-02 with the project provided in last post.

  1. there is no any problem for cm4 debugging if I choose PDLv3.0.4;
  2. but if choose PDLv3.1.0, it fails to enter debugging.

Can you check different PDL version on your side?

Contributor II

That worked.  I can debug with PDL 3.0.4.  I had 3.0.1 installed as well.  The project wouldn't compile with 3.0.1 so I had to find 3.0.4, which wasn't easy on the Cypress website. It just shows 3.1.0,  but when I Googled it, I found it in an earlier post.

New Contributor

Hi all and mroberts_arrow

We have a custom PCB with CYBLE-416045-02. It is showing the exact same problem in this thread, where debugging the CM4 doesnt work (hangs at reset vector?) with PDL v3.1.0 but debugging CM4 runs fine with PDL v3.0.4.

Does anyone know if there is an upcoming version of PDL that will resolve this issue?

0 Likes
Reply
Moderator
Moderator

Currently there is no an upcoming version PDL that resolves this issue. I believe it's an old version silicon of CYBLE-416045-02 that is not compatible with PDL3.1.0. The newer version of this module might resolve this issue.

Contributor II

Is the newer version of this module available?  Are the prototyping kits with the newer version available?

New Contributor II

Same question. And how can we identify compatible CYBLE-416045-02 modules? Are there markings that allow us to differentiate?

Like others, I have a CY8CPROTO-063-BLE prototyping kit with the CYBLE-416045-02 on board. That kit has a (break-away) KitProg2. Is there a firmware update to the KitProg2 that would resolve the issue and allow CM4 debug with PDL3.1.0?

0 Likes
Reply
Moderator
Moderator

We are discussing this internally and will update the thread shortly.

New Contributor II

Is there an update?

Thanks.

0 Likes
Reply
New Contributor II

Hi Michael are you able to share an update?

I was configured for PDL 3.1.0. Have now gone back to PDL 3.0.4 - temporarily I hope?

This just caught me for several hours after taking over software development of a prototype PCB with a CYBLE-416045-02 (de-soldered from a CY8CPROTO-063-BLE). We opted for the PSOC6 rather than a PSOC4 as the 6 is now in production.

0 Likes
Reply
Contributor II

I would also like an update on this.

0 Likes
Reply
Contributor II

MichaelF_56​, what's going on with this?  It's been over a month since this thread was going to be updated "shortly".  This is about to become a critical issue on my project.

0 Likes
Reply
Moderator
Moderator

PSoC 6 MCU CM4 Core Debug Issue - KBA227094

I believe this KBA was written to address the issue.

Contributor II

Thanks.  Just so you know, the first workaround works, and the second one has no effect.

0 Likes
Reply
Moderator
Moderator

Adding DheerajK_81​ from the PSoC 6 Applications team in case any further clarification is needed.

MichiyukiY_91

0 Likes
Reply
Moderator
Moderator

The second workaround might be confusing. I tested it and it works, so I'll try to highlight the key steps to make it clear.

(1) Add the code in line 3 and 4  in your application at the very beginning of main as shown below:

int main(void)

{

    volatile int flag = 0;

    while(flag==0);

   

    __enable_irq(); /* Enable global interrupts. */

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    for(;;)

    {

        /* Place your application code here. */

        Cy_GPIO_Inv(Red_PORT, Red_NUM);

        Cy_SysLib_Delay(500);

    }

}

(2) Program the project to the device and then press the Reset button.

(3) In PSoC Creator, select Debug > Attach to Running Target. Select CM4 as the target for the debug probe. Note that Halt target on attach is enabled.

pastedImage_4.png

(4) The debugger now stops at the infinite loop.

debug1.PNG

(5) Change the value of the flag variable by placing the cursor on the flag variable and write 1 to it.

eugene1.png

(6) Now Step over and continue with the debug session

euegene1.PNG

Note: Directly debugging will not work even though you have added the code in Step 1. The right flow is Program the board > Attach to running target.

Regards,

Dheeraj

Moderator
Moderator

I am the technical marketing owner at Cypress  for programming tools generally. That includes PSoC Programmer. Let me jump in to provide a progress report.

EDIT: PSoC Programmer 3.28.3 is now available online here. This latest release has fixed the bug and you will now be able to successfully debug the CM4 core with PDL3.1.0 .

---

There is a workaround, detailed in KBA227094.

A new release of PSoC Programmer will fix this problem. That release is built, tested, and going through our release review process. I have approved it for release, but I'm not the only person in that chain. With luck it becomes available in a few days. Ii should be numbered 3.28.3. The purpose of this release is simply to fix this bug. (Behind the scenes, PSoC Creator uses the capabilities provided by PSoC Programmer to set up a debug session. The bug in the debugging process is actually in PSoC Programmer. Update that, and the bug goes away.)

I will post here again when PSoC Programmer 3.28.3 is publicly available.

This is a defect that escaped our testing, for which I personally apologize. No one likes it when stuff like this happens. We have root-caused WHY it escaped, so that will reduce the chance of this happening again..

I want to thank everyone on this thread for both reporting the issue, and for your patience as we figured out what was going on. This was pretty subtle.

Jim

View solution in original post

Contributor II

Thanks, Jim.  This was an issue that was not intuitive.  Great job tracking it down.

Mike Roberts

Arrow Cypress Specialist

0 Likes
Reply
Moderator
Moderator

PSoC Programmer 3.28.3 is now available online here​. This latest release has fixed the bug and you will now be able to successfully debug the CM4 core with PDL3.1.0

Regards,
Dheeraj

Contributor II

JimT_21​ and DheerajK_81​,

Thanks very much for the detailed explanations and the effort to get the fix out quickly.

0 Likes
Reply
New Contributor II

Using PDL 3.0.4 solved this issue for me.

Moderator
Moderator

Indeed! The defect was revealed by a change in the PDL 3.1 startup code - how it accesses the SROM API. That change in itself was not a defect, in fact it is an improvement. But the change wasn't tested against "the right stuff" and so the side-effect (PSoC Programmer broke) escaped.

Happily, as DheerajK_81​ reported, the update is now publicly available, so you don't need to revert to PDL 3.0.4.

Again, thanks everyone for the reports, and the patience.

Jim

0 Likes
Reply
New Contributor II

Adding my appreciation. PSoC Programmer 3.28.3 resolved the issue in my setup.

0 Likes
Reply
New Contributor II

Appreciated.

Between my last post and this reply we have demonstrated our product to the customer (on 3.0.4 PDL) and have successfully moved across to 3.1.0 for field trials. We continue to develop using PSOC Creator as the product utilises a PSOC 5 along with three PSOC 6 BLE modules.

0 Likes
Reply
Moderator
Moderator

<GRIN>  I blame it all on the engineers.

Contributor II

They're the worst.

0 Likes
Reply
Top labels