2017-03-19 11:38 PM
Hi All,
I am planning to have CRC calculation for my Hex file generated and i want to keep that CRC at the end memory location of hex file generated ,
Is there any option in SPCstudio to enbale CRC so that when IDE is generating hex file it can calculate the CRC and keep it at the end location of the generated Hex file,
while flashing to the board we can remove that CRC bytes and flash the hex file,
Please let me know is there any option to enable in SPCstdio.
Thanks in advance,
---
Thanks & Regards,
Mujeeb
#crc #spc52017-03-22 03:31 AM
Hello Mujeeb ,
Sorry, we have not a test application in SPC5Studio which generates the checksum of the hex file.
i would use srecord for that.
https://mcuoneclipse.com/2015/04/26/crc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse/
http://www.avrfreaks.net/forum/tutgccadding-crc-and-app-length-hex-files
Best regards
Erwan
2017-03-22 11:20 PM
Hi Erwan,
Thanks for your response,
As per my understanding Srecord is separate utility,How to add this utility to SPCstdio,if it is not possible to add how we can use srecord standalone,
In link whatever provided by you (
/external-link.jspa?url=https%3A%2F%2Fmcuoneclipse.com%2F2015%2F04%2F26%2Fcrc-checksum-generation-with-srecord-tools-for-gnu-and-eclipse%2F
)is forKinetis Design Studio(MCU is ARM based) but in my case SPC560B is not ARM based so how to use Srecordfor SPC560B family which is not ARM based can you please help me in this regards,it will be really very helpful to me.
Thanks in advance,
Thanks & Regards,
Mujeeb.
2017-03-23 04:42 AM
Hello Mujeeb ,
For this task , you need a separate utility to calculate a checksum and to reintegrate it in the elf by updating your makefile during link procedure.
it is the same spirit for MPC56
https://community.nxp.com/docs/DOC-329541
in the binary directory (freevle-gcc plugins) you have all the tools to do that. (use objcopy)
http://stackoverflow.com/questions/24150030/storing-crc-into-an-axf-elf-file
Best Regards
Erwan
2019-01-01 07:35 PM
Hello Mujeeb,
If it is difficult to integrate SRECORD, then I will suggest you to use it as separate entity.
If you want to know how to use it as standalone. Follow beliw link.
https://embdsysbasics.blogspot.com/2018/12/hex-file-checksum-calculator-using.html?m=1
Use your hex file as input to srec tool and append crc to hex using srec tool.
Then load hex file to target.