Adding a CRC during post-build steps

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding a CRC during post-build steps

1,688 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lsimons on Tue Jun 03 12:32:15 MST 2014
I am trying to add a 32-bit CRC to my code on the LPC1769 for integrity checking during startup.  To add the CRC, I use the following post-build operations with SRecord :

arm-none-eabi-size "${BuildArtifactFileName}"
arm-none-eabi-objcopy -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"
checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"
../util/srec_cat "${BuildArtifactFileBaseName}.bin" -binary -crop 0 0x7FFFC -fill 0x00 0 0x7FFFC -crc32-b-e 0x7FFFC -unfill 0x00 8 -o "${BuildArtifactFileBaseName}.crc.bin" -binary


So, this gives me a binary with a 32-bit checksum in the last 4 bytes of user Flash. Is there a way to debug using this modified binary from LPCXpresso, or can I only burn the binary to Flash and run?

Thanks,
Louis
0 Kudos
Reply
1 Reply

1,172 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Jun 04 01:31:13 MST 2014
Simplest way to do this is probably to program the binary, then do an 'attach only' debug…

http://www.lpcware.com/content/faq/lpcxpresso/debugging-running-system
http://www.lpcware.com/content/faq/lpcxpresso/gui-flash-programming-tool

Regards,
LPCXpresso Support
0 Kudos
Reply