LPC-Link2 as Debug probe for i.MX RT1170 -EVK

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

LPC-Link2 as Debug probe for i.MX RT1170 -EVK

Jump to solution
5,232 Views
SakSath
Contributor III

Hi,

I am trying to flash one of the example projects in the SDK on i.MX RT1170 board. However, I am not able to flash successfully due as the debug probe was not supported. We have a LPC Link2 available. However I am not sure how we have to connect or proceed with the flashing/debugging using LPC Link2.

I am using JLink for flashing/debugging and ARM GCC tools for building. 

Any guidance with connections/software checks will be of great help.

Thanks!

Labels (1)
0 Kudos
Reply
1 Solution
4,889 Views
SakSath
Contributor III

Hi @kerryzhou ,

After many attempts with KEIL and ARM GCC tools I found that the flashing issue resolved when I used MCUXpresso IDE. I am still not completely sure what setting could have gone wrong in KEIL or ARM GCC settings. However, for now I see MCUXpresso solves the flashing issue even without the LPC-Link2 Debug probe.

Thanks for all Your support! I am closing this thread!

View solution in original post

0 Kudos
Reply
27 Replies
4,014 Views
SakSath
Contributor III

Hi @kerryzhou 

The connection failure issue sorted after I started using a JTag device.

Currently I am facing another issue where the GDB server gets stuck at "Starting target CPU..."

Please find a screen shot below

SakSath_0-1659936325188.png

Can You please suggest a solution.

Let me know if You want this to be put in a different thread.

 

Thanks!

0 Kudos
Reply
4,012 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

  Please try the JLINK command connection, whether that works OK or not?

I mean, like this:

MIMXRT1170 JLINK.jpg

 

Best Regards,

Kerry

0 Kudos
Reply
4,010 Views
SakSath
Contributor III

Hi Kerry,

 

Yes connection through J-link is working for me as expected.

Issue is only with logs on the Putty /  Tera Term Terminal.

I have cross checked the settings multiple times.

0 Kudos
Reply
4,000 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

  What do you mean: Issue is only with logs on the Putty /  Tera Term Terminal?

  Do you mean, you download the hello_world project, and can't output the uart data?

  If yes, you need to check your project, whether it is selected to the semihosting, and the UART hardware connection to your PC COM port.

  If not the JLINK debug issues, just the UART printf issuse, it's better to create a new case about it, thanks.

 

Best Regards,

kerry

0 Kudos
Reply
4,188 Views
SakSath
Contributor III

Hi @kerryzhou,

Thanks for the very quick and prompt response!

Can You please guide us to a quick link on how to use the CMSIS DAP on the board?

Is this is a setting that is available with JLink software ?

Thanks in advance!

0 Kudos
Reply
4,181 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

  Please download the SDK for RT1170, then follow this manual:

https://mcuxpresso.nxp.com/en/builder?hw=MIMXRT1170-EVK

SDK_2_12_0_MIMXRT1170-EVK\docs\

Getting Started with MCUXpresso SDK for MIMXRT1170-EVK.pdf

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply
4,172 Views
SakSath
Contributor III

Hi @kerryzhou

Thanks for the links!

We have referred to the same document that You have pointed and came across an error when JlinkGdbServer is launched. Please find a screenshot of the error we are facing below

jLinkGdbServer.JPG

From the document We see that there are two points mentioned to be taken care before launching Jlink gdb server 


  • The OpenSDA interface on your board is programmed with the J-Link OpenSDA firmware. If your board does not support OpenSDA, then a standalone J-Link pod is required.
  • You have a standalone J-Link pod that is connected to the debug interface of your board

    Can You please let us know how to update openSDA firmware on the device.

    Thanks!
0 Kudos
Reply
4,170 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

    Now, you are still using the MIMXRT1170-EVK on board debugger, right?

   Please give me a photo about your board connection, and the picture like this:

Control Panel\Hardware and Sound\Devices and Printers

kerryzhou_0-1658810460369.png

You can see, my board is the CMSIS DAP.

If you want to change the on board debugger, please refer to this link:

https://www.nxp.com/design/software/development-software/sensor-toolbox-sensor-development-ecosystem...

If you want to change it to the JLINK, you can use the LPCSCrypt to change it, but please note, after you change the firmware, you need to use another USB to connect the J20 power on the chip.

Wish it helps you!

Best Regards,

Kerry

 

0 Kudos
Reply
4,168 Views
SakSath
Contributor III

devices.JPGIMG_20220726_111250.jpg

 

Hi,

Yes I am still trying to use the on board debugger.

Additional Information:
The jumper J22 is closed.


Thanks in advance!

0 Kudos
Reply
4,154 Views
SakSath
Contributor III

[Update]

Please find below the screenshot of devices when I booted the device with Command_Jlink.cmddevices_JLink.JPG

 

I believe I should get this to "CMSIS DAP" not sure of the appropriate script!

Thanks!

0 Kudos
Reply
4,151 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

   Ok, your board is not the new board which is out of factory, the on board debugger should be modified to the JLINK when you get the board.

  So, now, do you want to use the JLINK as debugger? JLINK also works OK.

  You can try the JLINK, please note, find another USB cable to connect the J20, otherwise, maybe you meet issues, as the RT chip is not powered on.

 

Best Regards,

kerry

0 Kudos
Reply
4,145 Views
SakSath
Contributor III

Hi @kerryzhou 

Thanks a lot for all the support!

Have a couple of questions

1. When You say Jlink will work, does it need a Jlink debug probe as well ?

2. Can You please let know the procedure if I have to change the existing debugger to what comes as default with the board with out the need of any external probe. Also can You tell if there is  a way to check if the PC has all necessary drives to interact with the board and vice-versa


I have connected another USB to J20 yet Jlink says the probe does not support the processor. Here is the picture of my current connections for your reference

tmp_1658838305766.jpg

Thanks again!

0 Kudos
Reply
4,143 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

   

kerryzhou_0-1658840282660.png

 


1. When You say Jlink will work, does it need a Jlink debug probe as well ?
=> No, not the external JLINK, from your description, your board on board debugger already JLINK, so, when you do the debugging, just select the JLINK.

You even can use the JLINK command to connect your board, it should can find the ARM core:

kerryzhou_1-1658840374209.jpeg

 


2. Can You please let know the procedure if I have to change the existing debugger to what comes as default with the board with out the need of any external probe. Also can You tell if there is  a way to check if the PC has all necessary drives to interact with the board and vice-versa


I have connected another USB to J20 yet Jlink says the probe does not support the processor. Here is the picture of my current connections for your reference

=> This application note is useful to you, if you want to change back to the CMSIS DAP:

https://www.nxp.com/docs/en/application-note/AN13206.pdf

Ok, find you already use the external power supply, then J20 also can be removed.

Please use the item 1, JLINK driver attached JLINK command, check the ARM core at first. 

JLINK driver:

https://www.segger.com/downloads/jlink/JLink_Windows_x86_64.exe

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply
4,140 Views
SakSath
Contributor III

Hi @kerryzhou ,

PFA the error seen on trying JLink CommanderJlinkCommander.JPG

0 Kudos
Reply
4,133 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

   Sorry, we mainly support the customer with email or the community, no call.

If you need the directly support, you also can contact with the local NXP distributor.

https://www.nxp.com/support/sample-and-buy/distributor-network:DISTRIBUTORS

   Seems your used JLINK firmware is not OK.

  Please follow me to update your JLINK firmware again:

1. download the LPCScrypt and install it.

https://www.nxp.com/design/microcontrollers-developer-resources/lpcscrypt-v2-1-2:LPCSCRYPT

 

2. update JLINK firmware

https://www.segger.com/products/debug-probes/j-link/models/other-j-links/lpc-link-2/

Mainly this information

kerryzhou_0-1658887495898.png

 

3. then board enter DFU, insert J22, power off and power on the board again

   You will find the LPC like your previous picture

 

4. open this one

kerryzhou_1-1658887575290.png

Press any key to update your firmware.

Then the new JLINK firmware should can support it.

Then you can try remove J22, power off and power on the board again, and do the JLINK connection again.

BTW, your chip partnumber is wrong, you need to select RT1176, not RT1166

Best Regards,

kerry

 

 

0 Kudos
Reply
4,129 Views
SakSath
Contributor III

Hi @kerryzhou ,

I have downloaded and installed "LPCScrypt_2.1.2_57". However the installation folder does not contain the script You mentioned - "Program LPC-Link2 with segger J-Link_2."

I downloaded the LPCScrypt installation executable from the same page You referred.

Can You please let me know where I can find this script ?

Regards,

Saketh

0 Kudos
Reply
4,125 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

  These scrypt is what you need:

kerryzhou_0-1658901189372.png

 

If you open it from start->lpcscrypt, then you will find my mentioned picture in the previous reply, as I am the same version as you.

 

Best Regards,

kerry

 

0 Kudos
Reply
4,119 Views
SakSath
Contributor III

Hi,

So I changed the core to Cortex-M4 instead of Cortex-M7 and selected the board to MIMXRT1176XXX8_M4

I was able to connect to the board.

But after a power cycle when I did tried to flash some a demo application I am encountering the error "Could not find core in Coresight setup"

What could have gone wrong?

EDIT: I tried "unlock" as mentioned in other threads but still couldn't connect even after unlocking

Regards,

Saketh

0 Kudos
Reply
4,115 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SakSath ,

  Please refer to this post, which also using the on board JLINK, it works OK:

https://community.nxp.com/t5/i-MX-RT/How-to-program-rt1170-evk-octal-flash-with-JLink/m-p/1487099#M2...

 

Best Regards,

kerry

0 Kudos
Reply
4,092 Views
SakSath
Contributor III

Hi @kerryzhou ,

 

I have tried the steps you mentioned in the other thread as well.

Still I am facing the issue of "Could not find core in Coresight setup"

I tried unlocking following the discussions in few other threads. However that also did not help

The switch SW1 is in 1-OFF, 2-OFF, 3-ON, 4-OFF state and the Switch SW2 was is in all off state.

From the prints appearing on the Putty terminal I identified that the program currently flashed is "bubble_peripehral"

What other checks can I do?

Request You to guide me on how to halt/erase the existing program and re-program with some other sample application .

Regards,

Saketh

0 Kudos
Reply