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

How to create combined image after DFU ?

Dear all,

Our application is made of Chip nRF518122 + SDK 11.0.0 + DFU Bootloader + BLE application (gcc complied) loaded with nRF Toolbox over the air

we are putting our project into production and need to generate a combined image file for pre-programming the nRF51822 chip.

Is there any way we can extract the programmed image from a chip and use it as a master image for programming all the other chips ?

Here are two similar questions I found.

devzone.nordicsemi.com/.../ devzone.nordicsemi.com/.../

which tried to solve the issue by using the mergehex.exe tool to combine the hex files, as well as adding some custom settings for the DFU app. However the custom settings seem to be changing from version to version. And I wonder how the custom settings should be created corresponding to our SDK 11.0.0 setup.

Any insight ?

Thanks a lot.

  • Is the custom settings you are referring to setting the BANK_VALID_APP flag on the bootloader setttings flash page?

  • Yes. I think so. And I wonder if there may be more settings need to be accounted for. If updating the settings is complicated, an alternative way would be modifying the bootloader to by-pass the app checking.

  • In order to flash a combined SoftDevice, Bootloader and Application, where the device jumps to the application without having to perform a OTA update, you have to set the BANK_VALID_APP flag in bootloader_settings.c, i.e. change the line

    uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used));   
    

    to the following

    uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)) = {BANK_VALID_APP};
    

    -Bjørn

  • Would this correspond to setting

    to

    in nrf_dfu_settings.c? (I'm using SDK 15.2.0 and facing the exact same problem)

    -Tim

  • Nordic guys!

    1+ for this question.

1 2