1 2 3 Previous Next 30 Replies Latest reply on May 8, 2019 3:27 PM by EuGe_296116 Go to original post
      • 15. Re: Debug the CM4 core
        EuGe_296116

        I would also like an update on this.

        • 16. Re: Debug the CM4 core
          EuGe_296116

          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.

          • 17. Re: Debug the CM4 core
            MichaelF_56

            PSoC 6 MCU CM4 Core Debug Issue - KBA227094

             

            I believe this KBA was written to address the issue.

            1 of 1 people found this helpful
            • 18. Re: Debug the CM4 core
              EuGe_296116

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

              • 19. Re: Debug the CM4 core
                MichaelF_56

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

                 

                MichiyukiY_91

                • 20. Re: Debug the CM4 core
                  DheerajK_81

                  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

                  1 of 1 people found this helpful
                  • 21. Re: Debug the CM4 core
                    JamesT_21

                    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

                    8 of 8 people found this helpful
                    • 22. Re: Debug the CM4 core
                      MiRo_263836

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

                       

                      Mike Roberts

                      Arrow Cypress Specialist

                      • 23. Re: Debug the CM4 core
                        maswc_3957451

                        Using PDL 3.0.4 solved this issue for me.

                        1 of 2 people found this helpful
                        • 24. Re: Debug the CM4 core
                          DheerajK_81

                          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

                          2 of 2 people found this helpful
                          • 25. Re: Debug the CM4 core
                            EuGe_296116

                            JamesT_21 and DheerajK_81,

                             

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

                            • 26. Re: Debug the CM4 core
                              JamesT_21

                              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

                              • 27. Re: Debug the CM4 core
                                McPo_842831

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

                                • 28. Re: Debug the CM4 core
                                  rodic_1330486

                                  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.

                                  • 29. Re: Debug the CM4 core
                                    JamesT_21

                                    <GRIN>  I blame it all on the engineers.