This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Version Check in dfu_init_prevalidate

The comment in dfu_init_prevalidate says the following

  // To support application versioning, this check should be updated.
// This template allows for any application to be installed. However, 
// customers can place a revision number at the bottom of the application 
// to be verified by the bootloader. This can be done at a location 
// relative to the application, for example the application start 
// address + 0x0100.

Is there a recommendation as to what form of structure should be stored at address + 0x0100?

Thanks, Darren

Parents
  • Hi Darren,

    It's up to you to decide where you want to locate the application version and how you should check and compare. It doesn't need to be application address + 0x0100. And it should not be because most likely your application has bigger size than 0x0100. I would suggest to put it at the end of your application image size or any location that you know for sure will not be used by the bootloader as the swapping area.

    The structure can be anything, could be simply a 32bit word to tell which application version you currently have. So if the image you are receiving is older than the one the device has then the device can reject this update. But this also mean you can't do downgrading your device. It's all up to you to define this check.

  • Hi Hung Bui,

    Can you give an example on how to modify linker script to achieve this? I do not have too much experience with linker scripts.

    Thanks, Arjun

Reply Children
No Data
Related