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

nRF5 SDK possible to OTA update to nRF Connect SDK?

Hi,

Just need a quick checking on this.

Currently we using nRF5 SDK, after production, is it possible we OTA update the firmware which using nRF Connect SDK?

This very important for us to decide our roadmap of development.

Thank you

Best Regards,

Alan

Parents Reply Children
  • I cannot seem to find the documentation I referred to, and I'm sure someone from Nordic will provide a definitive answer, but I do remember reading that DFU from the nRF SDK to NCS is not possible. It makes sense given that the bootloaders function quite differently.

  • Hi @KLLiew I reviewed your link, but could not see clear reference if we can migrate from nRF5 to NCS.

    Did you see something specific in there ?


    We have units in the field, that get upgrade via smartphone app, using the nRF5 Secure Bootloader.

    I know that it can presumably update Application, and Bootloader and SoftDevice.

    But to date, we have only performed Application updates.

    Would be great if someone from Nordic could chime in here ...

    It would really help in our planning of migration to NCS.

  • Hi Martin, 

    Are you looking to support OTA DFU to NCS on existing devices in the field? The MCUboot is placed at address 0x0 by default, the same place as where the MBR used to reside. It's however possible to relocate it with the partition manager. My colleague actually did this as an experiment a little while ago to see if it's possible to do DFU from nRF5 SDK 17 to NCS v.1.4.0. Attached below are the projects he made if you want to review them. 

    Memory layout (defined by pm_static.yml)

    $ west build -b nrf52840dk_nrf52840 // West command to build peripheral_uart sample (MCUboot is automatically built as a child image, see Multi-image builds

    $ west build -t rom_report // Ninja build target to display flash layout as shown below

    FOTA from nRF5 SDK to NCS test

    dfu_nRF5_NCS.zip

    Some quick notes about the test:

    1. Here we update MCUboot and the zephyr application image in one go by calling it a Softdevice+bootloader (SoftDevice and bootloader) update. So, this is able to overwrite the softdevice with the zephyr app. However, it did require some minor modifications to the existing bootloader to make it accept zephyr application as a Softdevice image. 

    2. The flash protection mechanism in MCUboot assumes that the mcuboot_primary slot is always placed after the mcuboot partition. We disabled flash protection to get around this limitation.

    --

    I haven't tried it on v1.6.0, but I will take time to do it later. Hope this can help. 

    -Amanda H. 

  • Hi Amanda,

    Thank you for your reply.

    Yes we are looking at OTA DFU to NCS for units in the field for nRF52832 devices.

    I'll explore your notes above. 

    For Softdevice+bootloader (SoftDevice and bootloader) update, I'll have to dig deeper to understand if our system would be doing single or dual bank updates. (if that matters)

    You mentioned some minor modifications to the existing bootloader to make it accept zephyr application as a Softdevice image

    Does that mean the nRF Secure Bootloader had a specific code modification before it was progammed/shipped to customer ?

    For We disabled flash protection to get around this limitation.  ... I am not deep into understanding the inner workings in there, but is that a DFU image setting, or related to Bootloader code modification ?

    Thanks again, Martin

  • I do see a very small change in nrf_bootloader_fw_activation.c, in function sd_activate()

    Commented out the return value ...

     

    if (SD_MAGIC_NUMBER_GET(src_addr) != SD_MAGIC_NUMBER)
    {
        NRF_LOG_ERROR("Source address does not contain a valid SoftDevice.")
        //return NRF_ERROR_INTERNAL;     << commented out this line
    }

Related