SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By emb_sys_dev
#174126
Hello,
I have an issue with loading the .bin or .elf file using OpenOCD.

"Programming with OPENOCD"
openocd-0.8.0 -d0 -f interface/ngxtech.cfg -f target/LPC1768.cfg -c init -c targets -c "reset init" -c "poll off" -c "flash write_image erase FLASH_RUN/project.bin" -c "verify_image FLASH_RUN/project.bin" -c "reset run" -c shutdown
Open On-Chip Debugger 0.8.0 (2014-04-28-08:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
debug_level: 0
adapter speed: 500 kHz
adapter_nsrst_assert_width: 10
adapter_nsrst_delay: 300
jtag_ntrst_delay: 300
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
cortex_m reset_config sysresetreq
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* lpc1768.cpu cortex_m little lpc1768.cpu halted
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x1fff0080 msp: 0x10001ffc
auto erase enabled
wrote 28672 bytes from file FLASH_RUN/project.bin in 4.000000s (7.000 KiB/s)
Error: checksum mismatch - attempting binary compare
diff 0 address 0x0000001c. Was 0xaa instead of 0xbe

No more differences found.
in procedure 'verify_image'
cs-make: *** [program] Error 1

I always get the same error!
Would appreciate any suggestions for solving this.
Thomas
By emb_sys_dev
#174142
Just an update:
Inspite of the above error,I find that the code has got flashed and is executing properly.I will try to run it in debug mode and see it it works.
Hope to get some advice on the error.
By Bingo600
#174222
You do know the NXP's has a "Flash Checksum Vector" in the "low area" , prob. at the address failing verify.

/Bingo
By emb_sys_dev
#174246
Thanks for the reply.

"You do know the NXP's has a "Flash Checksum Vector" in the "low area" , prob. at the address failing verify."
From what I read in the UM,that is the same area as the boot rom,which has redirected the code to the user code area.But for verification the prog. is reading the BOOT rom area and hence the error.Is this correct ?
If so,is there any way to direct the debugger to verify the code in the user mode area?