⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
gme_johannes
Offline
Last seen:1 day 16 hours ago
加入:2017-12-22 10:09
CRC of HEX

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

Device:
PM_Dialog
Offline
Last seen:2 days 15 hours ago
工作人员
加入:2018-02-08 11:03
Hi gme_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

gme_johannes
Offline
Last seen:1 day 16 hours ago
加入:2017-12-22 10:09
Hi 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

PM_Dialog
Offline
Last seen:2 days 15 hours ago
工作人员
加入:2018-02-08 11:03
Hi 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

gme_johannes
Offline
Last seen:1 day 16 hours ago
加入:2017-12-22 10:09
I would like to extend my

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.

PM_Dialog
Offline
Last seen:2 days 15 hours ago
工作人员
加入:2018-02-08 11:03
Hi Johannes,

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