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

How to load an application with bootloader (NRF82540)

Hi,

I loaded bootloader, SoftDevice, and Application using nRFConnect - Programmer. But it doesn't launch the application. It fails at

nrf_bootloader_fw_activate()
with s_dfu_settings.bank_1 = 0;

How do I combine all three, and load with nRFConnnect - Programmer?

Thanks,

David

  • What SDK are you using? I just assume that you have a set of public and private keys, where you used the public key in your bootloader project, right?

    If so, you must add the command "--key-file private.key" when you generate your settings:

    ..\ble_app_beacon\..\Exe > nrfutil settings generate --family NRF52840 --application xapp
    .hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --key-file private.key xsettings1.hex

    This is the signature that you use to tell your bootloader that the FW is actually coming from you. "private.key" should be the name you used when you generated the private key:

    nrfutil keys generate private.key
    or
    nrfutil keys generate private.pem

    Best regards,

    Edvin

  • I added private.key into the bl_settings, but some how it sill not running:

    c:\_Projects\_Sources\AssetTracking\Drill\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_beac
    on\pca10056\s140\ses\Output\Release\Exe>nrfutil settings generate --family NRF52840 --application xapp
    .hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --key-file private.key xse
    ttingsx.hex

    Note: Generating a DFU settings page with backup page included.
    This is only required for bootloaders from nRF5 SDK 15.1 and newer.
    If you want to skip backup page generation, use --no-backup option.

    Generated Bootloader DFU settings .hex file and stored it in: xsettingsx.hex

    Bootloader DFU Settings:
    * File:                     xsettingsx.hex
    * Family:                   NRF52840
    * Start Address:            0x000FF000
    * CRC:                      0xB454210E
    * Settings Version:         0x00000001 (1)
    * App Version:              0x00000001 (1)
    * Bootloader Version:       0x00000001 (1)
    * Bank Layout:              0x00000000
    * Current Bank:             0x00000000
    * Application Size:         0x000051F4 (20980 bytes)
    * Application CRC:          0x099FCDD3
    * Bank0 Bank Code:          0x00000001
    * Softdevice Size:          0x00000000 (0 bytes)
    * Boot Validation CRC:      0x00000000
    * SD Boot Validation Type:  0x00000000 (0)
    * App Boot Validation Type: 0x00000000 (0)

    Other thing may related:

    When I compiled beacon project, I added uECC.c into Library as source, the uECC.c is compiled without error. I didn't not uECC as a compiled static library. But for some reason, With or without uECC.c or uECC.a static library, the beacon project is compiled anyway. I was wandering where is how uECC is used or its function is called? Will that be a problem is the validation of firmware code?

    David

Related