MCUXPresso IDE can't debug through JLINK

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

MCUXPresso IDE can't debug through JLINK

Jump to solution
1,796 Views
Vinos
Contributor III

Hello everyone, I'm using MCUXPresso IDE to debug my program. Since the NOR Flash is connected to the Secondary group of FlexSPI1, I needed to modify the Flash download algorithm myself.

For DAP, I successfully modified the .cfx download algorithm file, and the program can be debugged through MCUXPresso IDE.

Recently, I started using JLINK for debugging, so I finished the corresponding Flash download algorithm file with the .FLM extension. I added a new device in the JLINK installation directory and used this download algorithm. After testing with J-Flash.exe, the algorithm successfully erases and writes the program.

Next, I used this new device in MCUXPresso IDE. After clicking "Debug," the program can be successfully downloaded to Flash (the program runs correctly from Flash after a reset without debugging). However, I cannot debug it within MCUXPresso IDE.it seems like the IDE doesn't recognize the program at address 0x30000000 and there's no disassembly code.

1.png

I've tried adding scripts in the configuration, but it hasn't been helpful.

2.png

Did I miss any steps, and what should I do to debug with JLINK in MCUXPresso IDE?

 

I would greatly appreciate your response.

0 Kudos
Reply
1 Solution
1,721 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Vinos ,

   Thanks for your information.

  So, now your situation is:

  FlexSPI1 secondary pin group connect QSPI flash

1. boots OK

2. CMSIS DAP debug OK

3. JLINK debug failed with mcuxpresso, right?

Please check the private message to you, then give me the private message, thanks. As I lack the related platform to test it.

Best Regards,

kerry

View solution in original post

0 Kudos
Reply
8 Replies
1,545 Views
razools
Contributor III

Hi @kerryzhou ,

Can you please provide the solution?
As I am also facing this issue

I am also using HyperFlash for my custom with IMRT1176
I have the JLinkDevices.xml as mentioned above

Regards,

Rohail Rasool

0 Kudos
Reply
1,500 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @razools ,

  If you have any issues, you can create your own question post, then we will help you in your own question post, thanks.

  You can refer to:

 https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/RT1170-Octal-flash-enablement/ta-p/1498369

Pic 23

uncheck the item “Reset before running” in the debug configuration.

 

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply
1,472 Views
razools
Contributor III

Thanks @kerryzhou 
Your suggestions worked

However, I am facing a different issue now. Will post it on my question post 

0 Kudos
Reply
1,768 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Vinos ,

  Which Flash download algorithm you are using now?

  Do you try the RT-UFL or not?

  I think you can try to modify the RT-UFL, and generate the flash algorithm, and use that jlinkscript.

kerryzhou_0-1699937072296.png

 

/*
* Copyright 2019-2020 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

void SetFlagInITCM()
{
MEM_WriteU32(0xFFFC, 0x5AA60FF0);

JLINK_SYS_Report("J-Link script: 0x5AA60FF0 has been written to address 0xFFFC");
}

/* SetupTarget */
void SetupTarget(void) {

SetFlagInITCM();
}

/* AfterResetTarget */
void AfterResetTarget(void) {

SetFlagInITCM();
}

More details, please refer to:

https://www.cnblogs.com/henjay724/p/13951686.html

https://www.cnblogs.com/henjay724/p/14942574.html

https://www.cnblogs.com/henjay724/p/15430619.html

 

Wish it helps you!

Best Regards,

Kerry

 

 

0 Kudos
Reply
1,756 Views
Vinos
Contributor III
I used the RT-UFL project to generate the Flash download algorithm. I tried the jlink script you mentioned, as well as some other scripts, but they didn't work. However, I was able to debug in Ozone, so I think it might be a problem with MCUXPresso IDE.
0 Kudos
Reply
1,751 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Vinos ,

   Thanks for your updated information.

  so, the JLINKDevices.xml is also modified, right?

kerryzhou_0-1699949581204.png

In fact, to the default algorithm to debug the MIMRT1170-EVK with RT-UFL, that debug is working.

Which mcuxpresso IDE version you are using? V11.8.0?

Best Regards,

Kerry

 

0 Kudos
Reply
1,745 Views
Vinos
Contributor III
I added the information in JLINKDevices.xml like the image you provided, and also specified the link script. But it's no use. The IDE version I used is 11.8.

This is the situation where my Flash is connected to the Secondary Group of FlexSPI1. In another board, my Flash is connected to the Primary Group of FlexSPI2. Same issue.
0 Kudos
Reply
1,722 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Vinos ,

   Thanks for your information.

  So, now your situation is:

  FlexSPI1 secondary pin group connect QSPI flash

1. boots OK

2. CMSIS DAP debug OK

3. JLINK debug failed with mcuxpresso, right?

Please check the private message to you, then give me the private message, thanks. As I lack the related platform to test it.

Best Regards,

kerry

0 Kudos
Reply