Hello I am wanting to place a checksum at the end of the flash image. I have a crc.c that only has this array - where I will manually replace xx and yy with the 16bit CRC, once I have made a .bin image. (...wish there was a way for the compiler to do this automatically)
const unsigned char __attribute__((aligned (16)))ucCRC[16] = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', 'C', 'R', 'C', 'xx', 'yy' };
Using the Scatter-Loading Description File I have this
; ************************************************************* ; *** Scatter-Loading Description File generated by uVision *** ; ************************************************************* LR_IROM1 0x08040000 0x000B00000 { ; load region size_region ER_IROM1 0x08040000 0x000B00000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM2 0x10000000 0x00010000 { ; RW data kLokIram2.o(+RW +ZI) ttydebugout.o(+RW +ZI) ttydebugin.o(+RW +ZI) } RW_IRAM1 0x20000000 0x00020000 { ; RW data .ANY (+RW +ZI) } }
Without manually placing each .o section, how do I place the crc.o or ucCRC[16] after the .ANY (+RO) in the ER_IROM1 region? I tried crc.o (+RO, +Last) - but the linker does not allow that - error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.FIRST/LAST. Any help would be much appreciated