Debugging CX3 Jlink failed break point.

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

cross mob
mapper
Level 1
Level 1
5 questions asked 10 sign-ins 5 replies posted

Hello,

 

I want to use a jlink to debug my application. Currently I am interested on the values of requests sent from the host application, therefore my breakpoints are inside the CyCx3UvcAppUSBSetupCB, which is the callback registered in CyU3PUsbRegisterSetupCallback(CyCx3UvcAppUSBSetupCB, CyTrue);

 

I have followed the instructions in EzUsbSuite_UG.pdf to start the debugging session. Since the first try, the initial break point in the main() functions works well, and I can step over the initial functions with no problem. I noticed, however, that once the execution enters CyU3PKernelEntry(), I can say goodbye to the execution flow as it cannot be stopped anymore. I understand CyU3PKernelEntry is a non-return, and that most of the CX3 firmware is closed source, but I would like to at least stop in some point inside the CyCx3UvcAppUSBSetupCB when the host application (v4l2 for example) sends a command to set something (gain in my case). But that doesn't happen if I try after a few seconds that the firmware is running**, breakpoint always fails (see prints below).

** if I add a break point somewhere within CyCx3UvcAppUSBSetupCB, before starting the firmware (while the debug session is stopped in main()) then the breakpoint works. THEREFORE, breakpoint works if set before starting debug, and doesn't work if I set it while the firmware is running in debug mode. 

 

Screenshot from 2021-08-09 15-04-46.pngScreenshot from 2021-08-09 15-04-44.pngScreenshot from 2021-08-09 15-04-36.pngScreenshot from 2021-08-09 15-03-34.png

 

I removed the handling of USB_SUSP_EVENT_FLAG, which puts the CX3 in LowPower as suggested in here https://community.cypress.com/t5/Knowledge-Base-Articles/Segger-J-Link-Known-Issues-with-FX3-CX3-FX3.... I also tried setting the clock before DeviceInit as suggested in here https://community.cypress.com/t5/Knowledge-Base-Articles/Fix-Bad-JTAG-communication-Write-to-IR-Expe.... Finally, I also added the absolute file path in here https://community.cypress.com/t5/USB-Low-Full-High-Speed/CX3-JLINK-DEBUGGING/td-p/269347

 

Don't know what to try next. Can someone help with this?

 

Best regards,

Renato.

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Renato,

Please see below community thread. Referring to the same, if the breakpoints are to be used while firmware is running, then you will have to use ezusb suite from FX3 SDK 1.3.3 for firmware debug while using firmware libraries from SDK 1.3.4

https://community.cypress.com/t5/USB-Superspeed-Peripherals/FX3-SDK-version-1-3-4-won-t-put-breakpoi...

Regards,

Hemanth

View solution in original post

0 Likes
1 Reply
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Renato,

Please see below community thread. Referring to the same, if the breakpoints are to be used while firmware is running, then you will have to use ezusb suite from FX3 SDK 1.3.3 for firmware debug while using firmware libraries from SDK 1.3.4

https://community.cypress.com/t5/USB-Superspeed-Peripherals/FX3-SDK-version-1-3-4-won-t-put-breakpoi...

Regards,

Hemanth
0 Likes