Hi there,
I would like to implement a checksum into my firmware to verify the integrity of code prior to executing my main application, either using a simply byte sum or CRC checksum. Are there any tools available to calculate this checksum and inject it into a set location into Flash, after the applications has been compiled?
I would like to use this with Code Composer and the LM4F232H5QC.
thanks.
Simon,
I see from a post in the Code-Gen Tools forum that CGT can calculate CRC's across a single section. That post was with regard to another processor but I'm guessing there is symmetry across CPU's (I apologize I don't have my tools available at the moment) but I'm not 100% positive.
If the CRC over a single section is inadequate then it should be easy enough to reserve 4 bytes via your linker script and write a quick utility to calculate a CRC on your binary output.
--Miles
Thanks Miles.
I will require the entire Flash to have a checksum. I can ask our PC software guys to write me an app to do this.
It would be a nice feature to add to CCS, I know IAR has one - it was a little tricky to setup and doesn't work well with software breakpoints, but once it's done its very handy.
Hello Miles,
just to pick up on the post from you (11Mar12 4:53PM) - what you suggest in your second paragraph is exactly what I am trying to do:
1. Reserve 4 bytes at the beginning of my code image preferably immediately following the intvect section.
2. Use an external tool to calculate the CRC of the image (again, not including the intvects) and store it in the area that I reserved in (1).
I have noticed however, that reserving the 4 dummy bytes using my linker script is trickier than I thought (compiler always wants to take it out because the four bytes aren't actually used in the code...
I have looked through the TI documentation and web sites but I cannot find a good way to do this. Could you help?
Thanks!
TC
Connecting this thread to another related one.
http://e2e.ti.com/support/microcontrollers/stellaris_arm_cortex-m3_microcontroller/f/471/p/186296/672904.aspx#672904
Brandon