CRC in image header for dual boot

5 posts / 0 new
Last post
motred
Offline
Last seen:5 years 3 months ago
Expert
加入:2014-01-20 21:48
CRC in image header for dual boot

Hi Dialog,

We're currently working on setting up a dual boot option from our external I2C EEPROM (M24M01) in order to allow for over the air updates of our product's firmware. I've been reading through the UM-B-012 app note about booting from different images, and I think that we have a handle on most of it.

Our intention is to put the bootloader at address 0 of the EEPROM and the starting image at address 0x8000. The product header we will put at 0x1FF00. We have currently generated the product header, the bootloader image, and our test BLE image. The only thing that remains is the image header.

In UM-B-012, page 8, the image header is described. I understand that I can program this using the same method that we program the product header. My main question is how to generate the image. In order to do that, we need to generate a 4 byte CRC header.

What is the best way to generate the CRC for the image header?

Thanks!

JE_Dialog
Offline
Last seen:1 day 3 hours ago
Staff
加入:2013-12-05 14:02
Hello motred, sorry for the

Hello motred, sorry for the delayed response : i will get the team to look into this ASAP. BR JE_Dialog

PY_Dialog
Offline
Last seen:2 years 7 months ago
Staff
加入:2014-08-25 09:59
Hi Motred,

Hi Motred,

Sorry to feedback later! You said you already have product heeader, bootloader image and BLE image. I assume your BLE image is in bin format already.
You can use image making tools mkimage.exe (reside in ..\DA1458x_SDK_3.0.6\tools\mkimage) to build up the image from bin file. The command line will be:
makimage.exe single input.bin version.h output.img
input.bin is your BLE image, output.img is the final image file. You can rename it. The version.h is reside in ..\DA1458x_SDK_3.0.6\tools\flash_programmer\include
The generated image file will include the proper CRC already so you dont need to calculate it.
Hope this help you!

Regards!
PY

motred
Offline
Last seen:5 years 3 months ago
Expert
加入:2014-01-20 21:48
这是容易得多

这是容易得多what I was trying to do. Thanks for the info, I now have the bootloader working and loading my image.

motred
Offline
Last seen:5 years 3 months ago
Expert
加入:2014-01-20 21:48
I have a couple of questions

I have a couple of questions regarding the different options for the #defines in version.h. Specifically, I want to include an image ID, and it looks like the default is 0xFF.

How do I specify a different imageID?
Are all the options for version.h explained somewhere?