RT1170-EVK program via JLink command line

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

RT1170-EVK program via JLink command line

Jump to solution
1,731 Views
yfliu
Contributor IV

Dear support,

 

I am learning to program the RT11770-EVK device via the on-board debug probe with JLink firmware using command line tool JLinkExe v6.98e

I can connect from JLinkExe commander to the target correctly after issuing the "connect" command and select SWD connection type:

Connecting to target via SWD
InitTarget() start
InitTarget() end
Found SW-DP with ID 0x6BA02477
DPv0 detected
AP map detection skipped. Manually configured AP map found.
AP[0]: AHB-AP (IDR: Not set)
AP[1]: AHB-AP (IDR: Not set)
AP[2]: APB-AP (IDR: Not set)
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FD000
CPUID register: 0x411FC272. Implementer code: 0x41 (ARM)
Found Cortex-M7 r1p2, Little endian.
FPUnit: 8 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FD000
ROMTbl[0][0]: E00FE000, CID: B105100D, PID: 000BB4C8 ROM Table
ROMTbl[1] @ E00FE000
ROMTbl[1][0]: E00FF000, CID: B105100D, PID: 000BB4C7 ROM Table
ROMTbl[2] @ E00FF000
ROMTbl[2][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[2][1]: E0001000, CID: B105E00D, PID: 000BB002 DWT
ROMTbl[2][2]: E0002000, CID: B105E00D, PID: 000BB00E FPB-M7
ROMTbl[2][3]: E0000000, CID: B105E00D, PID: 000BB001 ITM
ROMTbl[1][1]: E0041000, CID: B105900D, PID: 001BB975 ETM-M7
ROMTbl[1][2]: E0042000, CID: B105900D, PID: 004BB906 CTI
ROMTbl[0][1]: E0043000, CID: B105900D, PID: 001BB908 CSTF
Cache: Separate I- and D-cache.
I-Cache L1: 32 KB, 512 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way
SetupTarget() start
FlexRAM configuration is restored
syspll2 has been initialized already
syspll2 pfd1 has been initialized already
SDRAM init done
SetupTarget() end
Cortex-M7 identified.

However, I failed to download the target via loadfile command:

J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
ResetTarget() start
DISPLAYMIX SRC reset
CM7 SRC reset
ResetTarget() end
AfterResetTarget() start
FlexRAM configuration is restored
syspll2 has been initialized already
syspll2 pfd1 has been initialized already
SDRAM init done
AfterResetTarget() end
J-Link>loadfile maestro_playback.bin
No address passed for .bin file. Assuming address: 0x0
Downloading file [maestro_playback.bin]...
Writing target memory failed.

I guess that the starting address parameter shouldn't be 0, but I can't find the right parameters to use as am I totally new to the RT1170-EVK device.

Please help to share some relevant materials so that I can follow.

 

Regards,

Yanfeng

 

 

 

Tags (1)
0 Kudos
1 Solution
1,695 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
It seems a bit weird, maybe the issue's related to the board itself, so you'd better check the board at first.
More further, did you ever try to debug the demo as the post shows? if not, please give it a try, especially for the LED blink demo.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
6 Replies
1,722 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you to use a .srec file instead of .bin file or use the J-Flash to program the image file.

jeremyzhou_0-1653903735404.png


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,714 Views
yfliu
Contributor IV

@jeremyzhou 

 

Thank you for sharing JFlash tool, however it seems that I can't make it work with on-board debug probe running firmware: J-Link LPCXpresso V2 as the JFlash tool requires a license which I don't have.

Then I tried to program my app using the JLinkExe commander tool, 

J-Link>loadfile iled_blinky_cm7.bin 0x30000000
Downloading file [iled_blinky_cm7.bin]...
...
J-Link: Flash download: Program & Verify speed: 397 KB/s
O.K.

However, after programming, I powered off the device and then power on it, there is no LED blinking. 

Can you please  let me know what should I do?

Regards,

Yanfeng

 

 

0 Kudos
1,705 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Can you please let me know what should I do?
-- Firstly, you'd better check the bin is good, next, confirm the bin is programmed to chip, as the below figure shows.
By the way, I can program the bin file to the board and it also can boot up well.

jeremyzhou_0-1654133706828.png

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,701 Views
yfliu
Contributor IV

@jeremyzhou 

Here I can see similar thing as your screen shot from JFlash tool, please see blinky-jflash.png attachment.

I did more tests here:

Firstly I tried a "debug" build .elf using gdb/JLinkGDBServer, and I run the program with break points and I can see the GPIO pin write function called correctly from gdb debugger. However, I never see the LED blinking correctly.

Then I tried a "flexspi_nor_debug" build using gdb/JLinkGDBServer, I noticed errors in GDB server side when gdb did "load" operation. However, after resetting these errors are gone. Eventually I got similar experience as the "debug" build. 

I never saw blinky LED even though the app is downloaded to the device with Jlink tools via on-board probe.

 

Regards,

Yanfeng

 

 

0 Kudos
1,696 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,
It seems a bit weird, maybe the issue's related to the board itself, so you'd better check the board at first.
More further, did you ever try to debug the demo as the post shows? if not, please give it a try, especially for the LED blink demo.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,673 Views
yfliu
Contributor IV

@jeremyzhou 

Thanks for the warm followups, it turned out that the board hardware was tweaked thus the default LED light doesn't blink. I tried on another board and it works now.

Sorry for all the trouble.

Regards,

Yanfeng

 

0 Kudos