Unable to debug or run project using LPC-Link2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to debug or run project using LPC-Link2

Jump to solution
2,946 Views
act642
Contributor II

I've been following a few tutorials using the MCUXpresso IDE, but I am unable to run or debug any of the example code.  

  1. https://www.nxp.com/docs/en/supporting-information/Debug_Probe_Firmware_Programming.pdf 
  2. http://thomasweldon.com/tpw/lpc4370/lpc4370tutorial1/index.html 

I am using two LPC-Link2 boards, one as a debugger and one as an eval board. JP1 and JP2 are connected on the debug LPC-Link 2, such that I can power on the eval board. Initially CMSIS-DAP did not work, so I configured the debugger as a Segger J-Link probe, which seemed to work. However, I am still unable to run or debug any example code. 

Set up:

act642_0-1661967947629.png

Error #1 for debug mode

act642_0-1661968074639.png

 

Error #2 when breakpoint is added

act642_1-1661966689420.png

New to micro-controllers, any advice would be much appreciated!

 

Tags (2)
0 Kudos
1 Solution
2,838 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi @act642 

I checked your video. you can connect, and debug board without issue.

If you want to run the project, click on Resume(F8) before Terminate. as I showed in my attached video.

Regarding to the run button problem you referred, I will report it. Thanks for brining the problem to our attention.

Have a nice day

Jun Zhang

 

View solution in original post

0 Kudos
9 Replies
2,940 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

1. please test the connection with a simple lpcopen led blink demo. 

2. In case the debug firmware is corrupt, use lpcscrypt update firmware, try both Jlink firmware and CMSIS-DAP.

3. If still can't work, send me a photo of your two board connection. tell me which one is for debug and which is for target. Let me check your board setting.

Thanks,

Jun Zhang

0 Kudos
2,921 Views
act642
Contributor II
  1. I am trying to test the connection with the blink demo, the debugger is failing each time in the same way.
  2. I tried both Jlink and CMSIS-DAP, still not establishing a connection
  3. Here is the attached photo. The USB connection is made to the debugger boardIMG-4668.jpg
0 Kudos
2,914 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi act642 

Your HW connection is ok. So I suggest you checking PC side.

As you said you already updated firmware with LPCScrypt? if so, Create a NEW project under a NEW workspace. test connection as my attached video shows. If still fails, change another computer and cable, test again.

If the board is not damaged, it should work.

Thanks,

Jun Zhang

0 Kudos
2,906 Views
act642
Contributor II

Hi Jun,

It still does not work, sometimes I get the same issue. 

I also always get this error if I try to run the project. 

"Error starting process.
Cannot run program "C:\....\NXP\workspace\test\Debug\test.axf": Launching failed"

I think the board works, I was able to see the debug board flash the LED, but not the target board.

I was only able to step into the code by restarting the debugger and stepping into all debug sessions. 

act642_0-1662578491374.png

I expect to see a result like in this tutorial: http://thomasweldon.com/tpw/lpc4370/lpc4370tutorial1/index.html 

However, I cannot get past line 46,

0 Kudos
2,898 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

From your screenshot, you didn't create a new project to test connection as I showed in my video?

Please create a new project to test connection, thus we can identify if the problem is caused by specific project.

In order to identify if the problem is caused by HW, swap your target and debug board, use LPCScrypt update debug firmware. adjust jumpers. see if the problem the same.

Jun Zhang

0 Kudos
2,891 Views
act642
Contributor II

Hi Jun,

I created a new workspace and a new project. I also uninstalled everything and re-downloaded everything as well. I have also swapped the target and debug board. Nothing appears to work.

 

 

0 Kudos
2,882 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Which version of LPCScrypt do you use to update the firmware? How it shows after update finish? send me a screenshot of it.

please send me a video like what I sent to you. make sure you follow the same steps as I did.

0 Kudos
2,870 Views
act642
Contributor II

Hi Jun,

I was able to recreate your video, but only when I open a "C project only". Previously, I was opening a "LCPOpen C Project". After debugging, I cannot run the code (see attached video). Do you know how I can successfully run the project? 

Thanks for your help.

0 Kudos
2,839 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi @act642 

I checked your video. you can connect, and debug board without issue.

If you want to run the project, click on Resume(F8) before Terminate. as I showed in my attached video.

Regarding to the run button problem you referred, I will report it. Thanks for brining the problem to our attention.

Have a nice day

Jun Zhang

 

0 Kudos