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

Is it possible upgrading from nrf52 sdk 14.0 to sdk 16.0?

Hi,we had finished application development on nrf52832 long ago, based on nrf52 sdk 14.0(with softdevice 5.0). But now we get feedback which is a bug has been fixed on sdk 16.0(with softdevice 7.0). We want to solve this problem by DFU since a lot of productions have appeared on the market. We did the test, but not work(see attatchment). Is this possible technically?

  • hi Edvin 

    i add the bl to the zip ;command line is,

    nrfutil pkg generate --application app.hex --application-version 2 --softdevice s132_nrf52_7.0.1_softdevice.hex --sd-id 0xCB --hw-version 32 --sd-req 0x9D --key-file private.pem --bootloader bootloader.hex --bootloader-version 2 blsdapp.zip
    pause

    fault is,

    Can anyone successfully upgrade from sdk 14.0 to sdk 16.0?

    Can I upgrade across versions?

    because

    the sdk 14.0 sd size 0-0x23000; bootloadersetting is 1page 

    and the sdk 16.0 sd size 0-0x26000,bootloadersetting is 2 pages 

    thanks

  • The softdevice upgrade is possible, and so is the bootloader upgrade. I just did a test with the unmodified bootloader from SDK14.0.0 to SDK16.0.0, with their corresponding softdevices.

    The softdevice size doesn't matter, as long as the bootloader size doesn't change.

    Bootloader settings page hasn't changed between the two SDKs.

    To test, I used the following .bat script in SDK14.0.0\examples\dfu\bootloader_secure_ble\pca10040\armgcc

    mkdir files
    make -j9
    make -j9 -C ..\..\..\..\ble_peripheral\ble_app_buttonless_dfu\pca10040\s132\armgcc
    
    ::del files\buttonless.hex
    copy ..\..\..\..\ble_peripheral\ble_app_buttonless_dfu\pca10040\s132\armgcc\_build\nrf52832_xxaa.hex files\buttonless.hex
    
    nrfutil settings generate --family NRF52 --application files\buttonless.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --key-file ..\..\..\dfu_req_handling\private.key files\bl_settings.hex
    
    nrfjprog -e --snr 682654319
    nrfjprog --program ..\..\..\..\..\components\softdevice\s132\hex\s132_nrf52_5.0.0_softdevice.hex --verify --snr 682654319
    nrfjprog --program _build\nrf52832_xxaa_s132.hex --verify --snr 682654319
    nrfjprog --program files\buttonless.hex --verify --snr 682654319
    nrfjprog --program files\bl_settings.hex --verify --snr 682654319
    nrfjprog --reset --snr 682654319

    (remember to generate a private and public keyset for both the SDK14 and SDK16 bootloaders, and these keys needs to be identical)

    And then I ran the following bat script, which I placed in SDK16\examples\dfu\secure_bootloader\pca10040_s132_ble\armgcc:

    mkdir files
    make -j9
    make -j9 -C ..\..\..\..\ble_peripheral\ble_app_buttonless_dfu\pca10040\s132\armgcc
    
    ::del files\buttonless.hex
    copy ..\..\..\..\ble_peripheral\ble_app_buttonless_dfu\pca10040\s132\armgcc\_build\nrf52832_xxaa.hex files\buttonless.hex
    
    
    ::call ..\..\..\..\..\..\14.0.0\examples\dfu\bootloader_secure_ble\pca10040\armgcc\test.bat
    
    
    nrfutil pkg generate --application files\buttonless.hex --application-version 1 --bootloader _build\nrf52832_xxaa_s132.hex --bootloader-version 2 --hw-version 52 --sd-req 0x9D --softdevice ..\..\..\..\..\components\softdevice\s132\hex\s132_nrf52_7.0.1_softdevice.hex --sd-id 0xCB --key-file ..\..\..\private.key files\dfu_bl_sd_app.zip
    
    nrfutil dfu ble -pkg files\dfu_bl_sd_app.zip -p COM5 -ic NRF52 -n "Nordic_Buttonless" -f

    The last line in the test_bl_update.bat is the line that performs the update using another DK. Please update this to use the correct COM port. If you don't have a spare DK or dongle, then use the zip file generated in files\dfu_bl_sd_app.zip.

  • hi Edvin,

    thanks for all your help!

    I found the issue, the old program  ( sdk14 old bootloadersetting )is

    nrfutil.exe settings generate --family NRF52 --application app.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 bls.hex and hw-version 32;

    the new sdk16.0 should modify as follow,

    nrfutil pkg generate --application app.hex --application-version 4 --softdevice s132_nrf52_7.0.1_softdevice.hex --sd-id 0xCB --hw-version 32 --sd-req 0x9D --key-file private.pem --bootloader bootloader.hex --bootloader-version 3 bl_sd_app.zip
    pause

    in the sdk16`s bootloader example sdk_config.h

    need modify #define NRF_DFU_HW_VERSION 32 

    now it`s work !

Related