I would like to see the option added to the linker to be
able to have it compute a CRC on the produced code
and insert that into the output code as well. This way a
program can sanity check itself before startup. This way
one could also decide (based on an educated guess) not
to download code to a target, because it wasn't
changed, which saves development time.
To implement this, I think the following are required:
1) Generate a symbol for the CRC
2) Select an area to compute the CRC over
3) Fill unused bytes in the area with a default value (FF)
4) Compute the CRC (8/16/32)
5) Store the CRC outside this area.
Keep up the good work, hope this helps improving SDCC
further and further.
Log in to post a comment.