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.