DFU / Bootloader Issues

Hi there,

I'm currently using SDK 17.1.0 with the NRF52832 Development Board.  This is pretty new to me, but the examples helped me get an application going pretty quickly.  I am now at the point where I'd like to start testing with a bootloader.  I've built the micro-ecc library and generated keys.  That seems to all be working fine.  After programming the secure_bootloader/pca10040_s132_ble example, I try to use the nRF connect app and I don't see anything.  I've confirmed there is a softdevice using the Programmer v3.0.0 tool.  If I hold the IF BOOT/RESET button on power up, it pulls up the bootloader file system.  I get stuck in this state and need to drop a working binary in for it to restart and launch said binary.  However, if I program the ble_peripheral\ble_app_blinky example, I can use the nRF Blinky app and it seems to work just fine.  I just started using the Nordic board a little over a week ago so forgive me if I'm missing something.  I mainly have a couple of questions here:

1. How do I get the secure_bootloader/pca10040_s132_ble example working so I can perform DFU over BLE.

2. At minimum, I'd like to use the bootloader file system to drop my own binary image for booting.  Does this need to be signed?  I programmed the bootloader example with my own generated key, then reset with the button pressed and dropped this j-link-ob-sam3u128-v2-nordicsemi-170724.bin I found on the internet.  It seemed to boot into the application without requiring a signature.

3. If my current application doesn't require BLE, but I plan to add it down the line, should I be using the softdevice and update app later to use the BLE stack or can I just merge the softdevice with my app later and load that?

Thank you,

Kenny

Parents
  • Hi,

    1. How do I get the secure_bootloader/pca10040_s132_ble example working so I can perform DFU over BLE.

    Following the Testing section of the example documentation should do the trick.

    Please note that holding the IF BOOT/RESET button is for programming the interface MCU (the programmer chip) on the board. It is not for programming the nRF SoC.

    2. At minimum, I'd like to use the bootloader file system to drop my own binary image for booting.  Does this need to be signed?

    You could set NRF_DFU_REQUIRE_SIGNED_APP_UPDATE to 0 to disable signing for the applicaiton (DFU of the bootloader itself and for the BLE stack (the SoftDevice) would then still require signing.) See also the Open Bootloader with DFU. However, signing is always a good idea, especially for over the air DFU. The

    I programmed the bootloader example with my own generated key, then reset with the button pressed and dropped this j-link-ob-sam3u128-v2-nordicsemi-170724.bin I found on the internet.  It seemed to boot into the application without requiring a signature.

    What you did there, was programming the on-board programmer/interface MCU, over USB.

    3. If my current application doesn't require BLE, but I plan to add it down the line, should I be using the softdevice and update app later to use the BLE stack or can I just merge the softdevice with my app later and load that?

    The SoftDevice, which is our BLE stack used in nRF5 SDK, is a separate binary that is not combined with the application. Each one of Bootloader, SoftDevice and application are separate binaries, and using our DFU solution they can be upgraded independently. Please note however that the bootloader cannot change in size, and you cannot change between e.g. a serial bootloader and a BLE bootloader.

    Please also note that we have a new SDK, the nRF Connect SDK, which is the main recommendation for new projects - also on the nRF52 series. See our nRF Connect SDK and nRF5 SDK statement for details. For a new project, it may be better to start with the nRF Connect SDK.

    Regards,
    Terje

  • Following the example, it looks like I am failing here in nrf_bootloader.c every time with a ret_val of 9.

    nrf_bootloader_dfu_inactivity_timer_restart(initial_timeout, inactivity_timeout);
    
            ret_val = nrf_dfu_init(dfu_observer);
            if (ret_val != NRF_SUCCESS)
            {
                return NRF_ERROR_INTERNAL;
            }

    Any ideas?

    Thanks,

    Kenny

Reply Children
No Data
Related