Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 8 months ago.
Why and how should we "modify vector checksum value"?
When you run make on an exported (GCC ARM Embedded) "blinky" you get a message in the compile output saying
***** ***** You must modify vector checksum value in *.bin and *.hex files. ***** /opt/gcc-arm/bin/arm-none-eabi-size GCC_Eclipse_Debug.elf text data bss dec hex filename 27512 180 764 28456 6f28 GCC_Eclipse_Debug.elf
It is not clear why or how to modify these values. Nor is a quick search turning anything up.
Question relating to:
1 Answer
9 years, 8 months ago.
This one explains it, http://bgamari.github.io/posts/2012-03-28-jtag-over-buspirate.html, there's flashing new image section.
Not certain though, if this is still valid. I have never edit that vector checksum for the mbed board
posted by 11 Mar 2015The checksum is usually inserted by the programmer/flash device. This is the case for the Segger JFlash and for the NXP Flashmagic utility. I guess that the mbed interface chip has a similar function. See here
posted by 11 Mar 2015Thanks, much as I thought. It's just another piece of the puzzle for using Eclipse and OpenOCD.
Martin,keeping in mind that I hope to sort out GCC export with eclipse project files, if we were to provide a tool that an eclipse project file could call (ie: autogenerated project file included in the export) do you think it would be acceptable to provide a linux binary, and a windows binary as part of the export with the makefile calling whichever is appropriate? MAC OS may be possible as well, but I don't know for sure as I have no experience with mac's.
I just did a test compile of the code you linked to with linux 64bit gcc (no arguments) and got a 6280 byte binary. There are a few other options I can think of easily,
- use some makefile magic to dump the needed 306 bytes of source to a temp file and compile before use. would require gcc to be available.
- require user to download the tool and place it in the path. warn if it's not available
- reimplement as bash/perl/python/etc this would work well on most linux systems, and likely OSX, but could be a pain for windows systems.
This is also reported by OpenOCD when you run GDB for debugging....