I can partially confirm...
Tested with 0.5.0-rc1
Comparing with "right image" works fine:
verify_image c://stm32_blink_led.bin 0x8000000
verified 29888 bytes in 0.468750s (62.267 KiB/s)
verify_image c://stm32_blink_led.bin
verified 29888 bytes in 0.484375s (60.258 KiB/s)
verify_image c://stm32_blink_led.hex
verified 29888 bytes in 0.500000s (58.375 KiB/s)
verify_image c://stm32_blink_led.elf
verified 29888 bytes in 0.921875s (31.661 KiB/s)
Comparing with "almost right image" (compilation date inside has
changed) works fine too:
verify_image c://stm32_blink_led.elf
checksum mismatch - attempting binary compare
diff 0 address 0x08006d26. Was 0x32 instead of 0x31
diff 1 address 0x08006d27. Was 0x31 instead of 0x38
diff 2 address 0x08006d29. Was 0x34 instead of 0x32
diff 3 address 0x08006d2c. Was 0x35 instead of 0x34
diff 4 address 0x08006d2d. Was 0x34 instead of 0x36
diff 5 address 0x08006d34. Was 0x31 instead of 0x32
No more differences found.
in procedure 'verify_image'
verify_image c://stm32_blink_led.hex
checksum mismatch - attempting binary compare
diff 0 address 0x08006d26. Was 0x32 instead of 0x31
diff 1 address 0x08006d27. Was 0x31 instead of 0x38
diff 2 address 0x08006d29. Was 0x34 instead of 0x32
diff 3 address 0x08006d2c. Was 0x35 instead of 0x34
diff 4 address 0x08006d2d. Was 0x34 instead of 0x36
diff 5 address 0x08006d34. Was 0x31 instead of 0x32
No more differences found.
in procedure 'verify_image'
verify_image c://stm32_blink_led.bin
checksum mismatch - attempting binary compare
diff 0 address 0x00006d26. Was 0x32 instead of 0x31
diff 1 address 0x00006d27. Was 0x31 instead of 0x38
diff 2 address 0x00006d29. Was 0x34 instead of 0x32
diff 3 address 0x00006d2c. Was 0x35 instead of 0x34
diff 4 address 0x00006d2d. Was 0x34 instead of 0x36
diff 5 address 0x00006d34. Was 0x31 instead of 0x32
No more differences found.
in procedure 'verify_image'
verify_image c://stm32_blink_led.bin 0x8000000
checksum mismatch - attempting binary compare
diff 0 address 0x08006d26. Was 0x32 instead of 0x31
diff 1 address 0x08006d27. Was 0x31 instead of 0x38
diff 2 address 0x08006d29. Was 0x34 instead of 0x32
diff 3 address 0x08006d2c. Was 0x35 instead of 0x34
diff 4 address 0x08006d2d. Was 0x34 instead of 0x36
diff 5 address 0x08006d34. Was 0x31 instead of 0x32
No more differences found.
in procedure 'verify_image'
However... when checking against something completely wrong (almost
completely different code) strange things happen. When checking against
bin, everything is as expected, but when checking against hex or elf:
verify_image c://stm32_blink_led.hex
checksum mismatch - attempting binary compare
diff 0 address 0x20000000. Was 0x02 instead of 0x28
diff 1 address 0x20000001. Was 0x46 instead of 0x03
...
diff 126 address 0x20000097. Was 0x00 instead of 0x20
diff 127 address 0x20000098. Was 0x00 instead of 0x15
More than 128 errors, the rest are not printed.
in procedure 'verify_image'
verify_image c://stm32_blink_led.elf
checksum mismatch - attempting binary compare
diff 0 address 0x20000000. Was 0x02 instead of 0x28
diff 1 address 0x20000001. Was 0x46 instead of 0x03
...
diff 126 address 0x20000097. Was 0x00 instead of 0x20
diff 127 address 0x20000098. Was 0x00 instead of 0x15
More than 128 errors, the rest are not printed.
in procedure 'verify_image'
If you specify address it is treated as an offset from beginning of RAM...
verify_image c://stm32_blink_led.hex 0x2000
checksum mismatch - attempting binary compare
diff 0 address 0x20002000. Was 0x02 instead of 0x28
diff 1 address 0x20002001. Was 0x02 instead of 0x03
...
diff 126 address 0x2000207f. Was 0x37 instead of 0x20
diff 127 address 0x20002080. Was 0x10 instead of 0x15
More than 128 errors, the rest are not printed.
in procedure 'verify_image'
verify_image c://stm32_blink_led.hex 0x4000
checksum mismatch - attempting binary compare
diff 0 address 0x20004000. Was 0x8a instead of 0x28
diff 1 address 0x20004001. Was 0xb9 instead of 0x03
...
diff 126 address 0x2000407e. Was 0x52 instead of 0x00
diff 127 address 0x2000407f. Was 0x96 instead of 0x20
More than 128 errors, the rest are not printed.
in procedure 'verify_image'
verify_image c://stm32_blink_led.hex 0x8000
stm32.cpu -- clearing lockup after double fault
error executing cortex_m3 crc algorithm
JTAG-DP STICKY ERROR
MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x20008004
JTAG-DP STICKY ERROR
MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x20008004
Block read error address 0x20008000
in procedure 'verify_image'
(it's the same for elf).
So sometimes OpenOCD starts the check in completely wrong location...
4\/3!!
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development