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

Need confirmation that using Nrfutil as serial master must do BL+SD+APP in 2 separate downloads (BL+SD first then APP)

From what I read on DevZone it seems that there is a limitation in nrfutil when needed to update BL+SD+APP.  NRFConnect over BLE manages the 2 separate downloads (BL+SD and then APP) for the user to make it "look like" a single operation.  Nrfutil as a serial master (over UART or USB) can only do the combined update as 2 separate operations from the User's point of view (i.e, first load the BL+SD image and then repeat for the APP image).  In other words, please confirm that nrfutil does not handle the automatic connection reestablishment after the BL+SD update completes to load the APP image, and therefore using a combined BL+SD+APP image with nrfutil over serial is not possible.

Thank You

Parents
  • Hello,

    I can confirm that when you perform a combined BL+SD+APP update with nrfutil over serial it is split into two parts. First BL + SD in one go, and then APP after that.

    Test the attached .bat script. Place it in the SDK16.0.0\examples\dfu\secure_bootloader\pca10056_uart\armgcc folder, and run it from a terminal.

    You can see that once the DFU progress reaches about 80%, the LEDs on the DK will turn off. This is when it shuffles around the new bootloader and softdevice, before it will reset, and nrfutil will connect again, and perform the application DFU.

    mkdir files
    make -j9
    make -j9 -C ..\..\..\..\peripheral\blinky\pca10056\mbr\armgcc
    make -j9 -C ..\..\..\..\ble_peripheral\ble_app_uart\pca10056\s140\armgcc 
    del files\ble_app_uart.hex
    copy ..\..\..\..\ble_peripheral\ble_app_uart\pca10056\s140\armgcc\_build\nrf52840_xxaa.hex files\ble_app_uart.hex
    
    nrfjprog -e --snr 111111111
    nrfjprog --program ..\..\..\..\..\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex --verify  --snr 111111111
    nrfjprog --program _build\nrf52840_xxaa_mbr.hex --verify --snr 111111111
    nrfjprog --reset --snr 111111111
    
    nrfutil pkg generate --application files\ble_app_uart.hex --application-version 2 --hw-version 52 --sd-req 0xCA --key-file ..\..\..\private.key --bootloader _build\nrf52840_xxaa_mbr.hex --bootloader-version 2 --softdevice ..\..\..\..\..\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex --sd-id 0xCA files\dfu_test2.zip
    TIMEOUT 5
    nrfutil dfu serial -pkg files\dfu_test2.zip -p COM52 -fc 1 -b 115200 -snr 111111111

    (change all the occurances of "111111111" with the Segger ID of your DK).

    Best regards,
    Edvin

Reply
  • Hello,

    I can confirm that when you perform a combined BL+SD+APP update with nrfutil over serial it is split into two parts. First BL + SD in one go, and then APP after that.

    Test the attached .bat script. Place it in the SDK16.0.0\examples\dfu\secure_bootloader\pca10056_uart\armgcc folder, and run it from a terminal.

    You can see that once the DFU progress reaches about 80%, the LEDs on the DK will turn off. This is when it shuffles around the new bootloader and softdevice, before it will reset, and nrfutil will connect again, and perform the application DFU.

    mkdir files
    make -j9
    make -j9 -C ..\..\..\..\peripheral\blinky\pca10056\mbr\armgcc
    make -j9 -C ..\..\..\..\ble_peripheral\ble_app_uart\pca10056\s140\armgcc 
    del files\ble_app_uart.hex
    copy ..\..\..\..\ble_peripheral\ble_app_uart\pca10056\s140\armgcc\_build\nrf52840_xxaa.hex files\ble_app_uart.hex
    
    nrfjprog -e --snr 111111111
    nrfjprog --program ..\..\..\..\..\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex --verify  --snr 111111111
    nrfjprog --program _build\nrf52840_xxaa_mbr.hex --verify --snr 111111111
    nrfjprog --reset --snr 111111111
    
    nrfutil pkg generate --application files\ble_app_uart.hex --application-version 2 --hw-version 52 --sd-req 0xCA --key-file ..\..\..\private.key --bootloader _build\nrf52840_xxaa_mbr.hex --bootloader-version 2 --softdevice ..\..\..\..\..\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex --sd-id 0xCA files\dfu_test2.zip
    TIMEOUT 5
    nrfutil dfu serial -pkg files\dfu_test2.zip -p COM52 -fc 1 -b 115200 -snr 111111111

    (change all the occurances of "111111111" with the Segger ID of your DK).

    Best regards,
    Edvin

Children
No Data
Related