thanks @jingpan
I tried your suggestion and unfortunately it gives the same error message, see below. Did I miss something or make a mistake somewhere?
script.jlink contents:
ExitOnError 1
r
h
w4 0x400AC040,0x00200007
w4 0x400AC044,0xaaaaaabb
w4 0x400AC038,0x00a70000
loadfile "C:\mcuxpresso_ws_11p4\XXXXX\Debug\XXXXX.hex" 0x60000000
qc
qc
output :
C:\mcuxpresso_ws_11p4\XXXXX>prog.cmd
C:\mcuxpresso_ws_11p4\XXXXX>set MCUX_WORKSPACE_LOC=C:/mcuxpresso_ws_11p4
C:\mcuxpresso_ws_11p4\XXXXX>set MCUX_JLINK=C:/Program Files (x86)/SEGGER/JLink/
C:\mcuxpresso_ws_11p4\XXXXX>"C:/Program Files (x86)/SEGGER/JLink/JLink.exe" -if SWD -speed auto -commanderscript "C:/mcuxpresso_ws_11p4/XXXXX/script.jlink" -device MIMXRT1062xxx6A -SelectEmuBySN 59102795
SEGGER J-Link Commander V7.50 (Compiled Jul 1 2021 17:38:54)
DLL version V7.50, compiled Jul 1 2021 17:37:28
J-Link Command File read successfully.
Processing script file...
J-Link Commander will now exit on Error
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.10
S/N: 59102795
License(s): GDB
VTref=3.232V
Target connection not established yet but required for command.
Device "MIMXRT1062XXX6A" selected.
Connecting to target via SWD
InitTarget() start
InitTarget()
_TargetHalt: CPU halted
InitTarget() end
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: 32 KiB, 512 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 32 KiB, 256 Sets, 32 Bytes/Line, 4-Way
Cortex-M7 identified.
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
ResetTarget() start
ResetTarget() end
PC = 60002308, CycleCnt = 00000000
R0 = 60002309, R1 = 20203AB8, R2 = 0003E75D, R3 = 000090F0
R4 = 60002309, R5 = 20203A70, R6 = 3ECDE544, R7 = 000000F0
R8 = 00200300, R9 = 00000000, R10= 00000000, R11= 400F8000
R12= 000001FE
SP(R13)= 20200F70, MSP= 20200F70, PSP= 00000000, R14(LR) = 00215329
XPSR = 81000000: APSR = Nzcvq, EPSR = 01000000, IPSR = 000 (NoException)
CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
FPS0 = 00000000, FPS1 = 00000000, FPS2 = 00000000, FPS3 = 00000000
FPS4 = 00000000, FPS5 = 00000000, 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= 00000000
Writing 00200007 -> 400AC040
Writing AAAAAABB -> 400AC044
Writing 00A70000 -> 400AC038
Downloading file [C:\mcuxpresso_ws_11p4\XXXXX\Debug\XXXXX.hex]...
****** Error: Failed to prepare RAMCode using RAM
Error while determining flash info (Bank @ 0x60000000)
Unspecified error -1
Script processing completed.
C:\mcuxpresso_ws_11p4\XXXXX>