I want to combine Hex of softdevice, bootloader, and application into one.

hi.

I used mergehex.exe to combine the hex of softdevice, bootloader, and application into one, but the board is in DFU state and the application does not start.

I am using nRF52832, SDK15, Softdevice s132.

Programming softdevice.hex + bootloader.hex first and then programming the firmware into Bluetooth works perfectly. But I want to program at once.

  • Does it not work because it is the included boot loader for public_key.c?

  1. I used mergehex.exe to combine the hex of Softdevice, bootloader, and application into one and then programmed app_valid_setting_apply_nRF52832.hex again. -> It does not work.
  2. In nrf_dfu_settings.c in the secure_bootloader example, we modified the following:

uint8_t m_dfu_settings_buffer[BOOTLOADER_SETTINGS_PAGE_SIZE]
        __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS)))
        __attribute__((used)) = {NRF_DFU_BANK_VALID_APP};

->It does not work.

I do not know what to do.
I hope for help.

Thank you.

Parents
No Data
Reply
  • Hi,

    In addition to the firmware, the bootloader stores information about the current application in flash. That flash page, the "bootloader settings page", is not part of the bootloader per se, and so it is not part of the bootloader binary / hex file. (Building it as part of the bootloader would not work either, as its contents depends on the application.)

    That means you must generate the bootloader settings page itself separately, to its own hex file, that may be combined with the other hex files for programming the device in one go. For more information, see Generating and displaying bootloader settings, and the Testing section of the BLE Secure DFU Bootloader example.

    Regards,
    Terje

Children