Hi,
I'm trying to calculate postbuild CRC16 between two mark of my application (checksum_start and checksum_end). In order to add it in ielftool_checksum variable set from my linker. Ielftool from IAR work properly with this command :
ielftool --fill 0xFF;checksum_start-checksum_end+7 --checksum ielftool_checksum:2,crc16,0x0;checksum_start-checksum_end+7 --verbose %OUT% %OUT%
But now we are using E2Studio only and this kind of tool isn't present on it. There is an equivalent ?
I have tried to use S-record srec_cat but it's just working between a fixed adress range. Is it possible to use S-record to achieve this ?
Thanks you by advance.
Regards,
So your issue is that you want it to figure out the range for the CRC based on those two symbols?
How about readelf -s <elf_file> | grep <symbol_name>
which will produce something like
000012345…
000012345 <symbol>
Run that twice to get your symbols, extract them with sed or a similar tool, and then use those addresses in srec_cat to calc and add the CRC.
This person seemed to figure it out.
https://stackoverflow.com/questions/69221793/trying-to-replicate-a-crc-made-with-ielftool-in-srec-cat
Good luck
lc
Thank you guys for your answer. I'll try this procedure larry_c_Mass and if it dosen't work I'll post a topic on the GCC community.