Gary Poole

How to Ascertain Last Address of User Code

Discussion created by Gary Poole on Apr 17, 2007
Latest reply on Apr 18, 2007 by CompilerGuru

I have a requirement to perform a run-time CRC check on all of the user code residing in flash memory.

From the map file, it would appear that constant strings located in the rodata1section by the linker seem to be placed at or near the end of my user code. However, when looking at a memory dump at these addresses there seems to be a few bytes "tagged" on the end that i can't explain:-

00, 01, 00, A0, 80, 00, 00

My question really is how to reliably ascertain the last address of my user code so that a CRC calculation can be performed on all code up to said address.

Many thanks