Downloading program with JTAG fails on i.MX8M Mini

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

Downloading program with JTAG fails on i.MX8M Mini

1,097 Views
knoelker
Contributor I

Hi,

we are using a Variscite evaluation board which is equipped with an i.MX8M Mini. We try to download a simple test program into RAM using Segger JLink. JTag-connection could be established, but downloading always fails with the message "Failed to write to memory". We have tried different different RAM positions, but it didn't work.

Can somebody advise on how to do this? To which RAM address should the program be downloaded?

In the technical reference manual I read about the JTAG security modes. Which fuses have to be changed to get this working?

Thanks in advance!

Labels (1)
0 Kudos
7 Replies

1,008 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,

Download i.MX8MM-EVK SDK from the link, then try to run SDK example code on M4 core.

https://mcuxpresso.nxp.com/en/select 

pastedImage_2.png

Press Build MCUXpresso SDK button:

pastedImage_4.png

Have a nice day!

B.R,

weidong

0 Kudos

1,008 Views
knoelker
Contributor I

Thanks for the hint!

With the examples I got a bit further. But when I try to download a Hello World program on the M4, I always get the error message "Failed to halt processor". I disconnected the SD card off the board to prevent booting of Linux, but I still get this error message.

I also connected using jlink command line tool, but halting M4 is not possible. What do I have to do halt the processor?

0 Kudos

1,008 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Configure BOOT_MODE[1:0] to be serial download mode, then power it up. Then check if you debugger can connect with M4 core.

Basically, when power up the board, debugger can connect M4 core directly, don't need to other special settings.

Have a nice day!

B.R,

Weidong

0 Kudos

1,008 Views
knoelker
Contributor I

When I change to serial download mode, I cannot connect to M4. JLink prints the error "Could not measure total IR len. TDO is constant high".

0 Kudos

1,008 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Thorsten,

Before using IAR to connect i.MX8MM, you should do these steps:

1. IAR tool patch for i.MX8MM

i.MX Software | NXP 

pastedImage_2.png

download it, and decompress it, you can find a arm directory, copy the directory to IAR intallation directory , recover original arm, for example , my installation directory is : D:\Program Files (x86)\IAR Systems

pastedImage_3.png

2. Download latest segger driver from segger website, up to now, it should be v6.80. then setup it to your PC.

3. Loading hello world project to IAR, don't forget to select "target" in "options-->targe".

Then try it again.

Have a nice day!

B.R,

Weidong

0 Kudos

1,008 Views
knoelker
Contributor I

Actually, I wanted to use Segger Embedded Studio instead of IAR. But my problem is not the IDE, I guess, because in order to be able to download something to the ARM, it has to be halted. As I have written above, halting ARM with simple jlink command line tool already fails. Or if I switch to "serial download mode", I cannot even connect.

0 Kudos

1,008 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Thorsten,

Below is my environment and steps:

1. IAR 8.40.1

2. debugger: Jlink Plus.

firmware should be latest one.

3. SDK_2.7_imx8mm

4. example code: Hello world

6. See my test result.

pastedImage_1.png

pastedImage_2.png

pastedImage_3.png

[Comment]

Don't need to set BOOT_MODE to be serial download mode.

Hope above is helpful to you.

Have a nice day!
B.R,

Weidong

0 Kudos