[Icc-avr] Different executable images with .COF and .HEX??
Rich Webb
webbra.mlist at verizon.net
Thu May 22 16:38:14 PDT 2008
> I have implemented an algorithm to calculate the CRC of the program
> memory on our Atmega168 (see code below).
>
> I was surprised to see that the resulting CRC is different if the
> program memory is loaded from the .COF instead of the .HEX file.
>
> I have the compiler option "Unused ROM Fill Bytes" set to 00.
Unused (genuinely unprogrammed) bytes will be 0xFF so perhaps there's a
difference in how the two formats (COF vs HEX) handle unused regions
with that option checked?
I'm not that familiar with COF, but in the HEX format the individual
lines contain address offsets, so "unused" bytes may not necessarily
(and probably won't) even appear in the file.
Unless you have an overriding need to zero the unused bytes, I'd just
leave them alone. Makes for a smaller file, faster load.
More information about the Icc-avr
mailing list