Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Best practice for storage of bootloader and application version

I am implementing the Device Information Service, and want to include the bootloader version as "Firmware revision" in DIS and the application version as "Software revision".

I am wondering where the best place is to store this information. Some places it is mentioned to use a fixed offset from the application start address. In other places it is mentioned that it is stored in the bootloader settings. However, I can not find anything authoritative on this.

How is it typically done?

Parents
  • Hi,

    The bootloader_version and app_verison are stored in the bootloader settings in the struct nrf_dfu_settings_t. This struct is stored in flash, at the address given by the Bootloader memory layout documentation. Note that this is related to softdevice, and you should use the define BOOTLOADER_SETTINGS_ADDRESS to make sure you look at the correct location. The file nrf_dfu_settings.c show how to retrieve the struct from flash.

    There is currently no correlation between DIS in the application, and the bootloader settings, but I think this is the best approach to implement it yourself.

    Best regards,
    Jørgen

Reply
  • Hi,

    The bootloader_version and app_verison are stored in the bootloader settings in the struct nrf_dfu_settings_t. This struct is stored in flash, at the address given by the Bootloader memory layout documentation. Note that this is related to softdevice, and you should use the define BOOTLOADER_SETTINGS_ADDRESS to make sure you look at the correct location. The file nrf_dfu_settings.c show how to retrieve the struct from flash.

    There is currently no correlation between DIS in the application, and the bootloader settings, but I think this is the best approach to implement it yourself.

    Best regards,
    Jørgen

Children
No Data
Related