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.
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
I am not aware of any tool for e2 studio or even stand-alone that does the same function as IAR's tool. Since we are using a version if the ARM GCC toolchain you look for something out there using their Community forums.
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.
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.
I'm not able to use readelf command from GCC postbuild command. This isn't recognized, the package doesn't seem to be installed. Is it possible to install or add it in order to use it within GCC ?
In GCC project, given toolchain path (with /bin) works as PATH environment variable in build process (including pre/post).Therefore no need to specify full path to drive GCC commands.In IAR project you need to call with full path for GCC commands.Try cmd /c <command string> if the problem was related to shell specifications of IAR plugin.