Hello Dialog Support,
we want to modify our firmware (HEX file) after compilation, so that different devices will have different names (without having to recompile). It seems that the devices do not boot with the modified HEX, I guess there is a checksum involved somewhere.
I have found the related topicshttps://support。dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/change-bd-address-when-fw-burned-spiandhttps://support。dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%C2%A0%E2%80%93-tools/crc-calculation-otp-header, the latter gives a hint about CRC.
Can you point me to where this is documented? How is the checksum calculated, and where is it placed in the HEX file?
Thanks,
Johannes
Hi gme_johannes,
Thanks for your question. Initially you should search into the hex file and find where the device name is located. As correctly is mentioned, the checksum should be changed accordingly. To do so, in every “line” in the hex file that has been changed, you should calculate a new checksum. How the checksum is calculated is non Dialog relates, so you can search on the web.
Please check this link from Keil – I guess it will help you.
https://www.keil.com/support/docs/1584/#:~:text=The%20number%20of%20data%20bytes%20in%20the%20record%20must%20match,and%20taking%20the%20two's%20complement.
As mentioned in a previous post, you can use the following tool to calculate the checksum.
http://easyonlineconverter.com/converters/checksum_converter.html
There is not any specific document demonstrating how it is calculated.
Thanks, PM_Dialog
Hi PM_Dialog,
indeed calculating the CRC is not the problem, I was just missing the information of how the HEX file is structured in general. Your first link answered this question.
Thanks!
Johannes
Hi Johannes,
Glad that you figured your issue out and thanks for accepting my answer.
If you have any other question, please raise a new forum post.
Thanks, PM_Dialog
I would like to extend my question from HEX to the binary file as produced by hex2bin.exe from the SDKs.
Is there any mechanism involving a checksum for this image? If I change a string that I find in this binary (advertised name), can I expect that the DA14585 will accept this modified image?
I am aware I could just make the change in the HEX and then convert, but I want to avoid this extra step since we are only working with the binary files in our workflow.
Hi Johannes,
If the modified hex file is correct, then you can use it in the DA14585. We don’t have any specific mechanism for that. So, if I understood correctly, you need this mechanism for mass production>?
Thanks, PM_Dialog