When trying to flash the MIMXRT1170 EVK using the onboard JLink. USB cable is connected to J11. I'm getting the following error. Sometimes the board is successfully fleshed and runs the updated application other times it fails and doesn't boot. I've tried different host PC's boards and USB cables. Any ideas would be appreciated.
$ west -v flash --build-dir ../test_blinky
-- west flash: rebuilding
cmake version 3.30.1 is OK; minimum version is 3.13.1
Running CMake: 'C:\Program Files\CMake\bin\cmake.EXE' --build ../test_blinky
ninja: no work to do.
[0/3] Performing build step for 'blinky'
[2/3] No install step for 'blinky'
[3/3] Completed 'blinky'
-- west flash: using runner jlink
-- runners.jlink: reset after flashing requested
runners.jlink: JLINKARM_GetDLLVersion()=79402
-- runners.jlink: JLink version: 7.94b
runners.jlink: JLink commander script:
ExitOnError 1
r
LE
loadfile "C:\Dev\VSCode\Phoenix\mani-test\test_blinky\blinky\zephyr\zephyr.bin" 0x30000000
r
g
writeDP 1 0
readDP 1
q
-- runners.jlink: Flashing file: C:\Dev\VSCode\mani-test\test_blinky\blinky\zephyr\zephyr.bin
runners.jlink: 'C:\Program Files\SEGGER\JLink\JLink.exe' -nogui 1 -if swd -speed auto -device MIMXRT1176xxxA_M7 -CommanderScript 'C:\Users\MacDonaS\AppData\Local\Temp\tmpcgv8kpyejlink\runner.jlink' -nogui 1
SEGGER J-Link Commander V7.94b (Compiled Dec 13 2023 17:07:41)
DLL version V7.94b, compiled Dec 13 2023 17:05:52
J-Link Command File read successfully.
Processing script file...
J-Link>ExitOnError 1
J-Link Commander will now exit on Error
J-Link>r
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link LPCXpresso V2 compiled Apr 4 2019 16:54:03
Hardware version: V1.00
J-Link uptime (since boot): N/A (Not supported by this model)
S/N: 721381573
VTref=3.300V
Target connection not established yet but required for command.
Device "MIMXRT1176XXXA_M7" selected.
Connecting to target via SWD
Found SW-DP with ID 0x6BA02477
DPv0 detected
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[3]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x84770001)
AP[1]: AHB-AP (IDR: 0x24770011)
AP[2]: APB-AP (IDR: 0x54770002)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FD000
CPUID register: 0x411FC272. Implementer code: 0x41 (ARM)
Cache: L1 I/D-cache present
Found Cortex-M7 r1p2, Little endian.
FPUnit: 8 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FD000
[0][0]: E00FE000 CID B105100D PID 000BB4C8 ROM Table
ROMTbl[1] @ E00FE000
[1][0]: E00FF000 CID B105100D PID 000BB4C7 ROM Table
ROMTbl[2] @ E00FF000
[2][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
[2][1]: E0001000 CID B105E00D PID 000BB002 DWT
[2][2]: E0002000 CID B105E00D PID 000BB00E FPB-M7
[2][3]: E0000000 CID B105E00D PID 000BB001 ITM
[1][1]: E0041000 CID B105900D PID 001BB975 ETM-M7
[1][2]: E0042000 CID B105900D PID 004BB906 CTI
[0][1]: E0043000 CID B105900D PID 001BB908 CSTF
I-Cache L1: 32 KB, 512 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way
Memory zones:
Zone: "Default" Description: Default access mode
Cortex-M7 identified.
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Core did not halt after reset, halting it manually.
AfterResetTarget() start
Valid application detected. Setting PC / SP manually.
Booting from FlexSPI1.
PC = 0x30003539
SP = 0x80001100
Clean & invalidate cached CPU registers
AfterResetTarget() end - Took 61.8ms
J-Link>LE
J-Link>loadfile "C:\Dev\VSCode\mani-test\test_blinky\blinky\zephyr\zephyr.bin" 0x30000000
'loadfile': Performing implicit reset & halt of MCU.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Reset: Core did not halt after reset, trying to disable WDT.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Core did not halt after reset, halting it manually.
AfterResetTarget() start
Valid application detected. Setting PC / SP manually.
Booting from FlexSPI1.
PC = 0x30003539
SP = 0x80001100
Clean & invalidate cached CPU registers
AfterResetTarget() end - Took 62.2ms
Downloading file [C:\Dev\VSCode\mani-test\test_blinky\blinky\zephyr\zephyr.bin]...
Comparing flash [100%] Done.
Erasing flash [100%] Done.
Programming flash [100%] Done.
Verifying flash [100%] Done.
J-Link: Flash download: Bank 0 @ 0x30000000: 1 range affected (65536 bytes)
J-Link: Flash download: Total: 1.216s (Prepare: 0.260s, Compare: 0.203s, Erase: 0.123s, Program: 0.287s, Verify: 0.202s, Restore: 0.138s)
J-Link: Flash download: Program speed: 223 KB/s
****** Error: Verification failed @ address 0x30000000
Error while programming flash: Verify failed.
Script processing completed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\SEGGER\JLink\JLink.exe' -nogui 1 -if swd -speed auto -device MIMXRT1176xxxA_M7 -CommanderScript 'C:\Users\MacDonaS\AppData\Local\Temp\tmpcgv8kpyejlink\runner.jlink' -nogui 1