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

nrf52840 app and bootloader merge. the program did not jump to application execution.

I use sdk15.2.
bootloader nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_ble_debug.
Application nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_buttonless_dfu.
step1:
nrfutil keys generate priv.pem
nrfutil keys display --key pk --format code --out_file dfu_public_key.c priv.pem
copy dfu_public_key.c to nRF5_SDK_15.2.0_9412b96\examples\dfu
step2:
Rbuil pca10056_ble_debug project.get bootloader.hex.
step3:
Rbuil ble_app_buttonless_dfu project.get app.hex.
step4:
nrfutil settings generate --family NRF52 --application nrf52840_app.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings_52840.hex
mergehex.exe -m s140_nrf52_6.1.0_softdevice.hex nrf52840_app.hex -o sd_and_app_52840.hex 
mergehex.exe -m sd_and_app_52840.hex  nrf52840_boot.hex -o sd_and_app_and_boot_52840.hex
mergehex.exe -m sd_and_app_and_boot_52840.hex settings_52840.hex -o sd_app_boot_setting_complete_52840.hex
step5:
nrfjprog.exe --family NRF52 --eraseall
nrfjprog.exe  --family NRF52 --program sd_app_boot_setting_complete_52840.hex
nrfjprog.exe  --family NRF52 --verify sd_app_boot_setting_complete_52840.hex
nrfjprog.exe  --reset
over.
But the program did not jump to app execution. (This method 52832 can run.)

Parents Reply Children
  • HI.

    This is Test 3 log and test 3 hex file.

     0> <info> app: Inside main
     0> <debug> app: In nrf_bootloader_init
     0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
     0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
     0> <debug> nrf_dfu_settings: Settings OK
     0> <debug> app: Enter nrf_bootloader_fw_activate
     0> <info> app: No firmware to activate.
     0> <debug> app: Enter nrf_dfu_app_is_valid
     0> <debug> app: No valid app to boot.
     0> <debug> app: DFU mode because app is not valid.
     0> <info> nrf_bootloader_wdt: WDT is not enabled
     0> <debug> app: in weak nrf_dfu_init_user
     0> <debug> app: timer_stop (0x200057D4)
     0> <debug> app: timer_activate (0x200057D4)
     0> <info> app: Entering DFU mode.
     0> <debug> app: Initializing transports (found: 1)
     0> <debug> nrf_dfu_ble: Initializing BLE DFU transport
     0> <debug> nrf_dfu_ble: Setting up vector table: 0x000F1000
     0> <debug> nrf_dfu_ble: Enabling SoftDevice.
     0> <debug> nrf_dfu_ble: Configuring BLE stack.
     0> <debug> nrf_dfu_ble: Enabling the BLE stack.
     0> <debug> nrf_dfu_ble: No advertising name found
     0> <debug> nrf_dfu_ble: Using default advertising name
     0> <debug> nrf_dfu_ble: Advertising...
     0> <debug> nrf_dfu_ble: BLE DFU transport initialized.
     0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
     0> <debug> app: Enter main loop

    sd_app_boot_setting_complete_52840.hex

  • Hi.

    Could you please provide only the bootloader settings .hex file?

    - Andreas

  • Hi.

    In step 4:
    nrfutil settings generate --family NRF52 --application nrf52840_app.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings_52840.hex

    Try:

    step4:
    nrfutil settings generate --family NRF52840 --application nrf52840_app.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings_52840.hex

    - Andreas

Related