Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Jlink to download code to external Flash correctly? #10

Open
solawc opened this issue Dec 3, 2022 · 4 comments
Open

How to use Jlink to download code to external Flash correctly? #10

solawc opened this issue Dec 3, 2022 · 4 comments

Comments

@solawc
Copy link

solawc commented Dec 3, 2022

Hello, I have been using platformIO for some time. At present, I have a project that uses NXP i.MX RT1020. Of course, I also have 1020 evk. Later, I found that if I use upload to download the code to the motherboard, the actual code is not downloaded to the motherboard correctly. But when I use debug, it is correct. Is there any difference? Or is my setting incorrect?

@solawc
Copy link
Author

solawc commented Dec 3, 2022

Configuring upload protocol...
AVAILABLE: jlink
CURRENT: upload_protocol = jlink
Uploading .pio\build\genericMIMXRT1021XX\firmware.bin
SEGGER J-Link Commander V7.50a (Compiled Jul 8 2021 18:18:11)
DLL version V7.50a, compiled Jul 8 2021 18:16:52

J-Link Command File read successfully.
Processing script file...

J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link V9 compiled May 7 2021 16:26:12
Hardware version: V9.20
S/N: 59999749
VTref=4.004V
Target connection not established yet but required for command.
Device "MIMXRT1021XXX5A" selected.

Connecting to target via SWD
Found SW-DP with ID 0x0BD11477
DPIDR: 0x0BD11477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770041)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FD000
CPUID register: 0x411FC271. Implementer code: 0x41 (ARM)
Found Cortex-M7 r1p1, 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]: E0040000, CID: B105900D, PID: 000BB9A9 TPIU-M7
ROMTbl[0][2]: E0043000, CID: B105F00D, PID: 001BB101 TSG
Cache: Separate I- and D-cache.
I-Cache L1: 16 KiB, 256 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 16 KiB, 128 Sets, 32 Bytes/Line, 4-Way
Cortex-M7 identified.
PC = 600B4EDE, CycleCnt = 60097E40
R0 = 000000A6, R1 = 0000186A, R2 = 20015310, R3 = 00000000
R4 = 200068F8, R5 = 20005C68, R6 = 20005C34, R7 = 000000F0
R8 = 401F4470, R9 = 20203A00, R10= A51F7C2E, R11= 00000000
R12= 00000004
SP(R13)= 2001FFA8, MSP= 2001FFA8, PSP= 2001FFF8, R14(LR) = 600B4599
XPSR = 81000000: APSR = Nzcvq, EPSR = 01000000, IPSR = 000 (NoException)
CFBP = 04000000, CONTROL = 04, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00

FPS0 = 00000000, FPS1 = 42B40000, FPS2 = 00000000, FPS3 = 40240000
FPS4 = 00000000, FPS5 = 3FF00000, FPS6 = 00000000, FPS7 = 00000000
FPS8 = 00000000, FPS9 = 00000000, FPS10= 00000000, FPS11= 00000000
FPS12= 00000000, FPS13= 00000000, FPS14= 00000000, FPS15= FFFFFFFF
FPS16= 00000000, FPS17= 00000000, FPS18= 00000000, FPS19= 00000000
FPS20= 00000000, FPS21= 00000000, FPS22= 00000000, FPS23= 00000000
FPS24= 00000000, FPS25= 00000000, FPS26= 00000000, FPS27= 00000000
FPS28= 00000000, FPS29= 00000000, FPS30= 00000000, FPS31= FFFFFFFF
FPSCR= 62000010

Downloading file [.pio\build\genericMIMXRT1021XX\firmware.bin]...
O.K.

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
ResetTarget() start
ResetTarget() end

Script processing completed.

@solawc
Copy link
Author

solawc commented Dec 3, 2022

image

@solawc
Copy link
Author

solawc commented Dec 3, 2022

image

When I use debugging, it can download correctly and enter debugging

@ivankravets ivankravets transferred this issue from platformio/platformio-core Dec 7, 2022
@pitchbent
Copy link

do you have found a solution for that? I am facing the same issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants