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

DFU from S110 (V7.1.0) to S130 (V2.0.1)

Hello,

I have a device that use a NRF51822 with softdevice S110 V7.1.0 with the corresponding bootloader.

The new firmware I develop for this device is base on softdevice S130 V2.0.1 with the corresponding bootloader.

Now I would like to perform a DFU from the old software (S110 V7.1.0) currently running in production to the new one (S130 V2.0.1).

I generate a DFU package (zip file) with the new bootloader+firmware+softdevice.

I modify the two .dat files into the package to have only the CRC in 2 bytes (with this I have a CRC error).

I use nRF Toolbox to perform the DFU but I receive a "NOT SUPPORTED" response.

I have put a breakpoint into the booloader at the both places where I found the "NRF_ERROR_NOT_SUPPORTED" (in dfu_image_size_set() when the size is not multiple of 4 and in nrf_error_to_dfu_resp_val()) but I never enter into this case.

So my question is where this error come from? (is it from the softdevice?)

And more generaly is it possible to upgrade everything (bootloader+application+softdevice) with the old S110 V7.1.0 to the new S130 V2.0.1?

Thank you

Best regards

Parents
  • Hi,

    It should be possible to upgrade up to SDK 11 and s130 v2.0.1. (Unfortunately it is not possible to upgrade from the bootloader in SDK 11 to the one in SDK 12, because then the size of the bootloader is increased. See the thread DFU - Updating from Legacy(SDK v11.0.0) Bootloader to SEcure(SDK v12.x.0) Bootloader.)

    What SDK version is the old project based on?

    What SDK version is the new project based on?

    If you go from SDK 7.0 the init packet is required, and you can have a look at How to generate the INIT file for the DFU, which dates from that time.

    I am not sure if a direct upgrade from SDK 7 to SDK 11 is possible, as I have not tried it before. I.e. you may need to do things in a specific order, or in two (or more) consecutive updates. I suggest that you try to:

    1) Upgrade SD+BL+app to an example (or to the same app) based on the same SDK, just to confirm that you do everything correctly.

    2) Upgrade SD + BL to SDK 11. If that works, consider a two-step process where you first upgrade SD and BL to SDK 11, then using the SDK 11 bootloader upgrade to the SDK 11 version of the app.

    We are getting close to christmas, and many have already left for vacation. This means you may get delayed responses from Nordic employees for the next couple of weeks. I am sorry for any inconvenience. (I will leave at the end of this week, and will be back in office January 7.)

    Note that since this is a public thread, other DevZone users may choose to help.

    If at any time you need to share confidential information then you must either open a new private ticket (and refer to this thread) or request for this thread to go private.

    Regards,
    Terje

  • Hi,

    Sorry for the delay, I'm in vacation.

    The OLD use a SoftDevice 110 version 7.1.0 with SDK 7.1.0. The new use SoftDevice 130 version 2.0.1 with SDK 12.3.0.

    Given your comment I see it's not possible to upgrade bootloader from legacy to secure Disappointed. An idea (not tested) to get around the problem, I have the source code of the secure bootloader, I can create a function which contains a call to the real (secure) bootloader start and set the address of this function (with the linker) to the old start of legacy bootloader (the UICR value), what do you thonk about this? (not sure it's compatible with the flashing of the application after).

    1) I have made some tests, with the same bootloader, firmware, SDK and softdevice:

    1.1) Only the application: package generated with nrfutil -> FAIL, I have the start DFU, next display 0% and nothing more. After I edit the .dat file inside the .zip to only have the CRC -> SUCCESS.

    1.2) Only SD+BL: two packages, one generated with nrfutil and the same but with only the CRC in .dat file -> both FAIL with NOT SUPPORTED fail in start_data_process() p_evt->evt.ble_dfu_pkt_write.len = 0x0C.

    Regards,

    Jerome

Reply
  • Hi,

    Sorry for the delay, I'm in vacation.

    The OLD use a SoftDevice 110 version 7.1.0 with SDK 7.1.0. The new use SoftDevice 130 version 2.0.1 with SDK 12.3.0.

    Given your comment I see it's not possible to upgrade bootloader from legacy to secure Disappointed. An idea (not tested) to get around the problem, I have the source code of the secure bootloader, I can create a function which contains a call to the real (secure) bootloader start and set the address of this function (with the linker) to the old start of legacy bootloader (the UICR value), what do you thonk about this? (not sure it's compatible with the flashing of the application after).

    1) I have made some tests, with the same bootloader, firmware, SDK and softdevice:

    1.1) Only the application: package generated with nrfutil -> FAIL, I have the start DFU, next display 0% and nothing more. After I edit the .dat file inside the .zip to only have the CRC -> SUCCESS.

    1.2) Only SD+BL: two packages, one generated with nrfutil and the same but with only the CRC in .dat file -> both FAIL with NOT SUPPORTED fail in start_data_process() p_evt->evt.ble_dfu_pkt_write.len = 0x0C.

    Regards,

    Jerome

Children
Related