Hi,
I'm trying to replicate through a JLink Commander script (for prod automation purposes), what works 100% of the time when using IDEs such Embedded Studio and using the *exact same* setup (attached output from the GDB server).
I simply need to flash the very same binary produced by the IDEs, into an LPC2294 target, and verify that the flashing succeeded, but I cannot figure out why the verification (or the flashing itself) fails (see setup & details below).
I appreciate any help on what I may be missing here, thanks!
-------------------------------
- Command line: "C:/Program Files (x86)/SEGGER/JLink_V612f/JLink.exe" -device LPC2294 -if JTAG -speed Adaptive -JTAGConf -1,-1 -CommanderScript J-Link/flash.jlink
- "J-Link/flash.jlink" script contents (sleeps are just tests):
connect
erase
sleep 200
loadbin bin/Debug/gta_server.bin, 0x00000000
sleep 200
r
h
verifybin bin/Debug/gta_server.bin, 0x00000000
sleep 200
r
g
exit
- Command output (where verification fails):
SEGGER J-Link Commander V6.12f (Compiled Jan 13 2017 16:38:21)
DLL version V6.12f, compiled Jan 13 2017 16:37:50
Script 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 ARM V8 compiled Nov 28 2014 13:44:46
Hardware version: V8.00
S/N: *********
License(s): RDI,FlashDL,FlashBP,JFlash,GDB
VTref = 3.293V
Device "LPC2294" selected.
TotalIRLen = 4, IRPrint = 0x01
Found 1 JTAG device, Total IRLen = 4:
#0 Id: 0x4F1F0F0F, IRLen: 04, IRPrint: 0x1, ARM7TDMI-S Core
ARM7 identified.
ETM V1.2: 1 pairs addr.comp, 0 data comp, 4 MM decs, 1 counters
Erasing device (LPC2294)...
J-Link: Flash download: Total time needed: 2.131s (Prepare: 0.123s, Compare: 0.000s, Erase: 1.997s, Program: 0.000s, Verify: 0.000s, Restore: 0.010s)
Erasing done.
Sleep([i]200)[/i]
Downloading file [bin/Debug/gta_server.bin]...
J-Link: Flash download: Flash programming performed for 2 ranges (196608 bytes)
J-Link: Flash download: Total time needed: 3.720s (Prepare: 0.267s, Compare: 0.084s, Erase: 1.177s, Program: 1.994s, Verify: 0.078s, Restore: 0.117s)
O.K.
Sleep([i]200)[/i]
Reset delay: 0 ms
Reset type NORMAL: Using RESET pin, halting CPU after Reset
RESET has cleared breakpoint, using default reset strategy.
Resetting target using RESET pin
Resetting TRST
PC: (R15) = 00000000, CPSR = 000000D3 (SVC mode, ARM FIQ dis. IRQ dis.)
Current:
R0 =00000000, R1 =00000000, R2 =00000000, R3 =00000000
R4 =00000000, R5 =00000000, R6 =00000000, R7 =00000000
R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
R13=00000000, R14=00000000, SPSR=00000010
USR: R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
R13=00000000, R14=00000000
FIQ: R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
R13=00000000, R14=00000000, SPSR=00000010
IRQ: R13=00000000, R14=00000000, SPSR=00000010
SVC: R13=00000000, R14=00000000, SPSR=00000010
ABT: R13=00000000, R14=00000000, SPSR=00000010
UND: R13=00000000, R14=00000000, SPSR=00000010
Loading binary file bin/Debug/gta_server.bin
Reading 166476 bytes data from target memory @ 0x00000000.
Verify failed @ address 0x00000014.
Expected 00 read 84
Sleep([i]200)[/i]
Reset delay: 0 ms
Reset type NORMAL: Using RESET pin, halting CPU after Reset
RESET has cleared breakpoint, using default reset strategy.
Resetting target using RESET pin
Resetting TRST
Script processing completed.
I'm trying to replicate through a JLink Commander script (for prod automation purposes), what works 100% of the time when using IDEs such Embedded Studio and using the *exact same* setup (attached output from the GDB server).
I simply need to flash the very same binary produced by the IDEs, into an LPC2294 target, and verify that the flashing succeeded, but I cannot figure out why the verification (or the flashing itself) fails (see setup & details below).
I appreciate any help on what I may be missing here, thanks!
-------------------------------
- Command line: "C:/Program Files (x86)/SEGGER/JLink_V612f/JLink.exe" -device LPC2294 -if JTAG -speed Adaptive -JTAGConf -1,-1 -CommanderScript J-Link/flash.jlink
- "J-Link/flash.jlink" script contents (sleeps are just tests):
connect
erase
sleep 200
loadbin bin/Debug/gta_server.bin, 0x00000000
sleep 200
r
h
verifybin bin/Debug/gta_server.bin, 0x00000000
sleep 200
r
g
exit
- Command output (where verification fails):
SEGGER J-Link Commander V6.12f (Compiled Jan 13 2017 16:38:21)
DLL version V6.12f, compiled Jan 13 2017 16:37:50
Script 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 ARM V8 compiled Nov 28 2014 13:44:46
Hardware version: V8.00
S/N: *********
License(s): RDI,FlashDL,FlashBP,JFlash,GDB
VTref = 3.293V
Device "LPC2294" selected.
TotalIRLen = 4, IRPrint = 0x01
Found 1 JTAG device, Total IRLen = 4:
#0 Id: 0x4F1F0F0F, IRLen: 04, IRPrint: 0x1, ARM7TDMI-S Core
ARM7 identified.
ETM V1.2: 1 pairs addr.comp, 0 data comp, 4 MM decs, 1 counters
Erasing device (LPC2294)...
J-Link: Flash download: Total time needed: 2.131s (Prepare: 0.123s, Compare: 0.000s, Erase: 1.997s, Program: 0.000s, Verify: 0.000s, Restore: 0.010s)
Erasing done.
Sleep([i]200)[/i]
Downloading file [bin/Debug/gta_server.bin]...
J-Link: Flash download: Flash programming performed for 2 ranges (196608 bytes)
J-Link: Flash download: Total time needed: 3.720s (Prepare: 0.267s, Compare: 0.084s, Erase: 1.177s, Program: 1.994s, Verify: 0.078s, Restore: 0.117s)
O.K.
Sleep([i]200)[/i]
Reset delay: 0 ms
Reset type NORMAL: Using RESET pin, halting CPU after Reset
RESET has cleared breakpoint, using default reset strategy.
Resetting target using RESET pin
Resetting TRST
PC: (R15) = 00000000, CPSR = 000000D3 (SVC mode, ARM FIQ dis. IRQ dis.)
Current:
R0 =00000000, R1 =00000000, R2 =00000000, R3 =00000000
R4 =00000000, R5 =00000000, R6 =00000000, R7 =00000000
R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
R13=00000000, R14=00000000, SPSR=00000010
USR: R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
R13=00000000, R14=00000000
FIQ: R8 =00000000, R9 =00000000, R10=00000000, R11=00000000, R12=00000000
R13=00000000, R14=00000000, SPSR=00000010
IRQ: R13=00000000, R14=00000000, SPSR=00000010
SVC: R13=00000000, R14=00000000, SPSR=00000010
ABT: R13=00000000, R14=00000000, SPSR=00000010
UND: R13=00000000, R14=00000000, SPSR=00000010
Loading binary file bin/Debug/gta_server.bin
Reading 166476 bytes data from target memory @ 0x00000000.
Verify failed @ address 0x00000014.
Expected 00 read 84
Sleep([i]200)[/i]
Reset delay: 0 ms
Reset type NORMAL: Using RESET pin, halting CPU after Reset
RESET has cleared breakpoint, using default reset strategy.
Resetting target using RESET pin
Resetting TRST
Script processing completed.