Other Parts Discussed in Thread: NOWECC, UNIFLASH, , SEGGER
Hello,
During the implementation of the CRC calculation of the whole flash content (safety mechanism required by the TMS570 safety manual), we got some uncorrectable ECC error that we traced back to unused flash locations. Our linker script includes the following:
MEMORY { VECTORS (X) : origin=0x00000000 length=0x00000060 KERN_FUNC (RX) : origin=0x00000060 length=0x0000FF0F vfill = 0xffffffff FLASH0 (RX) : origin=0x00010000 length=0x002F0000 vfill = 0xffffffff
After compilation generates the following .map file:
MEMORY CONFIGURATION name origin length used unused attr fill ---------------------- -------- --------- -------- -------- ---- -------- VECTORS 00000000 00000060 00000020 00000040 X KERN_FUNC 00000060 0000ff0f 00008494 00007a7b R X FLASH0 00010000 002f0000 002f0000 00000000 R X ffffffff
For instance, only 0x8494 bytes out of 0xFF0F are used in the KERN_FUNC section. We get the ECC error at 0xC000, which is in the used part. According to the linker documentation, the vfill specifier is sufficient to force ECC generation for the whole section and not just the parts that are filled. But when generating the ECC with nowECC we see the following:
PS C:\...\build> .\nowECC.exe -i .\input.hex -f021 16M_ADD -a -o .\output.hex This is nowECC Version 2.22 Mapping: F021-16MB ECC calculation from 0x00000000 to 0x0000001F ECC calculation from 0x00000060 to 0x000084F7 ECC calculation from 0x00010000 to 0x00058ABF *** Appending ECC section to file -> .\output.hex No Errors
So the ECC is generated only until address 0x84F7.
Then if we change the vfill specifier to just fill in the linker script, the ECC gets generated for the whole flash (as expected), ECC error does not appear, BUT the size of the binary naturally also drastically increases.
Is there some particularity of the vfill specifier that I am missing?
Thank you for your help,
Aaron