RT1020 - Cannot load my binary onto the flash using crt_emu_cm_redlink

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

RT1020 - Cannot load my binary onto the flash using crt_emu_cm_redlink

1,246 Views
adikarol
Contributor II

I have a binary that I (sometimes) am able to burn with the MCUXpresso Flash GUI tool.

I tries to use the command line crt_emu_cm_redlink tool and i'm not able to do this.

I have my own HW with the RT1020 on top. I have the correct flash driver since I am able to debug my binary when using MCUXpresso debug options. 

Main Question:

Here is the command I use:

 /usr/local/mcuxpressoide-10.3.0_2200/ide/binaries/crt_emu_cm_redlink --flash-load "<PATH TO MY BINARY>.bin" -p MIMXRT1021xxxxx --load-base=0x60000000 --flash-driver <PATH_TO_MY_FLASH_DRIVER>/MIMXRT1020-EVK_SINGLE_SPI.cfx -x <PATH TO ARTIFACTS FOLDER>

I get the following error:

Ns: MCUXpresso IDE RedlinkMulti Driver v10.3 (Nov 28 2018 02:37:04 - crt_emu_cm_redlink build 748)
Wc(03). No cache support.
Nc: Found chip XML file in <MY_PATH>/MIMXRT1021xxxxx.xml

Nc: Reconnected to existing link server
Nc: Connecting to probe 0 core 0 (using server started externally) gave 'OK'
Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.224 (NXP Semiconductors)
Nc: Serial Number: I3FWN1IR
Nc: VID:PID: 1FC9:0090
Nc: USB Path: /dev/hidraw6
Nc: Using memory from core 0 after searching for a good core
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: debug interface type = Cortex-M7 (DAP DP ID 0BD11477) over SWD TAP 0
Nc: processor type = Cortex-M7 (CPU ID 00000C27) on DAP AP 0
Nc: number of h/w breakpoints = 8
Nc: number of flash patches = 0
Nc: number of h/w watchpoints = 4
Nc: Probe(0): Connected&Reset. DpID: 0BD11477. CpuID: 00000C27. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Ns: Content of CoreSight Debug ROM(s):
Nc: RBASE E00FD000: CID B105100D PID 000008E88C ROM (type 0x1)
Nc: ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM (type 0x1)
Nc: ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM (type 0x1)
Nc: ROM 3 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
Nc: ROM 3 E0001000: CID B105E00D PID 04000BB002 Gen DWT (type 0x0)
Nc: ROM 3 E0002000: CID B105E00D PID 04000BB00E Gen (type 0x0)
Nc: ROM 3 E0000000: CID B105E00D PID 04000BB001 Gen ITM (type 0x0)
Nc: ROM 2 E0041000: CID B105900D PID 04001BB975 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
Nc: ROM 2 E0042000: CID B105900D PID 04004BB906 CSt type 0x14 Debug Control - Trigger, e.g. ECT
Nc: ROM 1 E0040000: CID B105900D PID 04000BB9A9 CSt type 0x11 Trace Sink - TPIU
Nc: ROM 1 E0043000: CID B105F00D PID 04001BB101 Sys (type 0x0)
Nc: NXP: MIMXRT1021xxxxx
Nc: DAP stride is 1024 bytes (256 words)
Et:85: Binary file 'uc_v1.0.9.bin' blank check failure: Ef(11). No flash configured.

I double checked the driver and it is the same I was using with MCUXPresso for debug..

what is wrong?

 

One more question:

In some older project of mine, I used this tool (10.3.0) with another NXP chip (LPC1115) and I worked but only after I turned on my MCYXpresso and clicked on the "red boot" to connect to the LPCLink2. Otherwise this didn't work.

Here, with this project, I fail in both cases, when connecting to the LPCLink2 or not. But, I do see the difference in the following lines that appear only after I connect in the MCUXpresso:

Nc: Reconnected to existing link server
Nc: Connecting to probe 0 core 0 (using server started externally) gave 'OK'
Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.224 (NXP Semiconductors)
Nc: Serial Number: I3FWN1IR
Nc: VID:PID: 1FC9:0090
Nc: USB Path: /dev/hidraw6

Question 2: Is there a way to do the full process with command line only without going to MCUXpresso and connecting to the LPClink2 manually?

-----------------------------------------------

Thanks a lot!

0 Kudos
Reply
3 Replies

1,090 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Adi,

How do you generate the bin file? I tested your command line. It works fine. Or, you can use axf directly.

> C:\nxp\MCUXpressoIDE_10.3.0_2187_prc3\ide\binaries\crt_emu_cm_redlink.exe -p MIMXRT1021xxxxx --flash-load ".\evkmimxrt1020_sai_interrupt.axf" -x .\

Current directory is project\debug or project\release.

Regards,

Jing

0 Kudos
Reply

1,090 Views
adikarol
Contributor II

Thanks jingpan‌..
After i started everything over, restarted the project and completely power cycle my debug environment, I was able to burn the binary file to the flash.. But, still some very unclear issues remain:

1. I still don't know how to manually avoid booting the LPCLink2 (clicking on the boot debug probe "red boot" in MCUXPresso). Without this it doesn't succeed in burning the flash. 

2. If I repeat the flash burning, with the same command that worked, I some times fail with 

Ed:05: File 'uc_v1.0.9.bin' load failure: Em(12). Target rejected debug access at location 0x200028F0

Thanks!

0 Kudos
Reply

1,090 Views
converse
Senior Contributor V

1. You can either boot LPC Link2 using a script

Booting LPC-Link2 

or you can load the image into flash using lpcscrypt

LPCScrypt v2.1.0 | NXP 

2. sounds like your device needs recovery. Search this site for RT1020 recovery.

0 Kudos
Reply