CX3 JLINK DEBUGGING

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

cross mob
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hello
 CX3 JLINK DEBUGGING.Every time I click resume while debugging, the program starts debugging, but it doesn't stop when it hits a breakpoint. Another problem is that I click step over CyU3PKernelEntry () and the program keeps running for more than half an hour without stopping, I want to know what causes this, every time I debug the program I can't stop, no result. I hope you can help me to answer this question, thank you very much!
Best Wishes
yanjuqi

 

0 Likes
1 Solution
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

I apologize for not making my last response clear for you. Please follow the steps mentioned below:

1. Open the Sources tab of debug configurations as shown below:

JayakrishnaT_76_0-1615359683558.png

2. On the right side of the sources tab, there will be a button named Add. Click on this button. This will open up a popup as shown below:

JayakrishnaT_76_1-1615359748506.png

3. Select Project - Path Relative to Source Folders in the popup and click OK. This will open another popup showing all the projects in your workspace as shown below:

JayakrishnaT_76_2-1615359886807.png

4. Select the project that is to be debugged and press on OK. After these changes, the sources tab of debug configurations will change as shown below:

JayakrishnaT_76_3-1615359944624.png

5. Now, click Apply and hit Debug.

Please try these steps and let me know if you still face any issues.

Best Regards,
Jayakrishna

View solution in original post

0 Likes
13 Replies
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello,

As per my understanding, initially the debugger always breaks correctly at main(). Please correct me if my understanding is wrong. If my understanding is wrong, then please share snapshots of all the tabs of debug configurations so that we can check if the settings are proper.

Please refer to the following KBA which documents the known issues while using Segger J-Link for debugging:

https://community.cypress.com/t5/Knowledge-Base-Articles/Segger-J-Link-Known-Issues-with-FX3-CX3-FX3...

The API CyU3PKernelEntry () is a non-returnable call and using Step Into for the CyU3PKernelEntry () API will cause the firmware control to get stuck. The KBA mentioned above provides a workaround for the same issue. Please try this and let us know if you still face any issues.

Best Regards,
Jayakrishna
0 Likes
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hello
My configuration should be fine

yaqi_4776616_0-1615271480940.pngyaqi_4776616_1-1615271540994.pngyaqi_4776616_2-1615271582582.pngyaqi_4776616_3-1615271605952.pngyaqi_4776616_4-1615271627289.pngyaqi_4776616_5-1615271676368.png

I've tried the above and it still didn't work. When I step over the CyU3PKernelEntry () API, it ran for more than half an hour without stopping, and finally I gave up

yaqi_4776616_6-1615271913376.png

Can't stop every time when resume.

Can you help me with these questions? Thank you very much!

Best Regards,

Yaqi

0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

Can you please refer to the following thread and implement the suggestions mentioned in this thread?

https://community.cypress.com/t5/USB-Superspeed-Peripherals/fx3-segger-CyU3PKernelEntry/m-p/161521

I tried this at my end on Denebola Kit and it works fine.

Best Regards,
Jayakrishna
0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

In the source tab of debug configuration, please try adding Path relative to source folders by selecting add option and let me know the result.

Best Regards,
Jayakrishna
0 Likes
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hello Jayakrishna,

I don't quite understand what you mean.Where should I add?

I'd like to rephrase my question.I had a problem when I started debugging CX3 projects with jlink.
1. When I click resume, the debugging program will not stop when it encounters a breakpoint, and it will keep running until the end, but it will not stop unless I disconnect the jlink.
2. when I stepover CyU3PKernelEntry () API in main() function, the program will also keep running without stopping, same as problem 1.
So I don't know where the problem is that causes the program to keep running without stopping every time I debug, and now I can't debug at all
I hope you can help me!
Best Regards
Yaqi

0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

I apologize for not making my last response clear for you. Please follow the steps mentioned below:

1. Open the Sources tab of debug configurations as shown below:

JayakrishnaT_76_0-1615359683558.png

2. On the right side of the sources tab, there will be a button named Add. Click on this button. This will open up a popup as shown below:

JayakrishnaT_76_1-1615359748506.png

3. Select Project - Path Relative to Source Folders in the popup and click OK. This will open another popup showing all the projects in your workspace as shown below:

JayakrishnaT_76_2-1615359886807.png

4. Select the project that is to be debugged and press on OK. After these changes, the sources tab of debug configurations will change as shown below:

JayakrishnaT_76_3-1615359944624.png

5. Now, click Apply and hit Debug.

Please try these steps and let me know if you still face any issues.

Best Regards,
Jayakrishna
0 Likes

Hi Jayakrishna

I did what you said but.Select Project - Path Relative to Source Folders in the popup and click OK. Mine didn't open  this popup showing all the projects in your workspace as shown below:

yaqi_4776616_0-1615360380618.png

Instead, go directly to this page

yaqi_4776616_1-1615360522516.png

Debugging still has the same problem

Best Regards,

Yaqi

 

0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi, 

I think you wrongly selected Absolute File Path instead of Project - Path Relative to Source Folders in the popup. The result of the same is seen in the sources tab of debug configurations. Please select Project - Path Relative to Source Folders from the popup as shown below:

JayakrishnaT_76_0-1615361136478.png

If Absolute File Path is selected, then you will see the same in the sources tab of debug configurations as shared in your previous response.

Best Regards,
Jayakrishna
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi Jayakrishna,

I set it up and then debugged it and it worked perfectly, thank you so much, you've helped me a lot!

Best Regards,

Yaqi

0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

We are glad to hear that the issue is resolved!

Best Regards,
Jayakrishna
0 Likes
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hi Jayakrishna

Excuse me I have one more question, I need to see the debugging printf message how should I do it, do I need to install any additional software? 

Best Regards,

Yaqi

 

0 Likes
JayakrishnaT_76
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hello Yaqi,

I had mentioned my comments regarding this query in the following thread created by you:

https://community.cypress.com/t5/USB-Superspeed-Peripherals/CX3-Debugging-with-jlink/td-p/269293

Please refer to the thread mentioned above. If you have any queries, please post them in the thread mentioned above. We will carry forward our discussion related to this issue there.

Best Regards,
Jayakrishna
0 Likes
yaqi_4776616
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

HI Jayakrishna

Ok I understand, thank you.

Best Regards,

Yaqi

0 Likes