Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: CRC or checksum at end of code.

$
0
0

George,

I like that better, since it also avoids the whole .data section not compressible circular problem.  I got it to work with the following  linker file, but this assumes .cinit will always be last. (myCRCSect contains 4 bytes of precalculated CRC, don't want that included in the calculation so it is moved out of the way.)

   .intvecs:   > 0x00000000    .text   :   > FLASH    .const  :   > FLASH    .cinit  :   > FLASH END(__flash_end)    .pinit  :   > FLASH    .init_array : > FLASH      .myCRCSect :  > FLASH(HIGH) 

That is currently true from what I've observed (.init_array is empty and seems to be placed first) but can I rely on that to stay true long term?  Otherwise, without the group, I haven't been able to figure out how to set __flash_end to the first empty address.  I use this to calculate the checksum over everything that is programmed in flash.


Mike


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>