DFU failing with nRF Secure Immutable Bootloader(NSIB) as the first stage bootloader

Hi,

We are using the nRF Secure Immutable Bootloader(NSIB) as the first stage bootloader along with MCUboot as the second stage bootloader in our nrf5340 project. We have observed that the BLE (SMP based) DFU fails when we add the immutable bootloader to the project. The firmware get's downloaded to the device, but after reset it doesn't boot into the new application and gets stuck somewhere. There are no logs that get printed to indicate any issue. I am using the 'nRF Connect' mobile application in Android for our testing. The SDK is  NCSv2.1.0.

I have made the bare minimum changes needed to reproduce this in the example projects(machine learning and matter lock) provided by Nordic. I have added the CONFIG_SECURE_BOOT=y in the prj.conf of both examples and made sure to use the same memory partitions in both the the projects(pm_static.yml). Below are the zip files of the two projects:

1. Machine learning

  machine_learning.zip

2. Matter lock:

lock.zip

Please try performing the DFU from the first project to the second project or vice-a-versa on nrf5340DK board. It is failing for us.

This same upgrade works fine if we don't use the first stage immutable bootloader(NSIB) in the project.

Please help us in resolving this issue.

Also, I would like to know how we could upgrade the MCUboot image. Which is the binary that needs to be used? Is it the 'signed_by_b0_s0_image.bin'? Can we use the 'nRF Connect' mobile application itself for updating the MCUboot image?

Regards,

Devanshu Agarwal

  • Hello,

     I tried to replicate as per your suggestion, yes I don't see a DFU update after uploading and nrf connect app is not showing any response. But I am bit confused because when I checked your build folder  I don't see any image for the MCUboot. when we enable two stage bootloader there will be firmware update for MCUboot also. Something like dfu_mcuboot.zip should be present.

    When you swipe from left to right in the nrf connect app you can see the log. Did you try looking at this? Sorry for the response time I am taking we are less in numbers due to Christmas  vacation.

    Kind Regards,

    Abhijith

  • Hi,

    Thank you for your response.

    But I am bit confused because when I checked your build folder  I don't see any image for the MCUboot. when we enable two stage bootloader there will be firmware update for MCUboot also. Something like dfu_mcuboot.zip should be present.

    I am not aware of the df_mcuboot.zip file for MCUboot. Can you please check why it is not being generated? These are examples projects by Nordic with very minimum changes.

    When you swipe from left to right in the nrf connect app you can see the log. Did you try looking at this?

    Yes, I did check those logs and I couldn't figure out what the issue is.

    Regards,

    Devanshu Agarwal

  • Hello,

    Devanshu5 said:
    I am not aware of the df_mcuboot.zip file for MCUboot. Can you please check why it is not being generated? These are examples projects by Nordic with very minimum changes.

    I haven't checked the whole project file. Are you missing some configuration? Could you recheck with the minimum configuration I shared. I will try to implement Bo and MCUboot in the Machine Learning sample. And are you getting any response from the nrf connect application. Could you give a try using our dedicated DFU application?

    Please expect some delay from my side as I will be away for Christmas vacation and whole Devzone is working understaffed. I will try to update this in the coming week.

    Kind Regards,

    Abhijith

  • Hi,

    I haven't checked the whole project file. Are you missing some configuration?

    Can you please check? I have literally added only one line in prj.conf to the existing Machine Learning and Matter-Lock example so that it would be easier for you to try and re-produce. I have made sure that I don't add any off my custom changes related to the product we are developing. 

    Could you recheck with the minimum configuration I shared

    I have checked it. It is not working for me. I already have all those changes in my project.

    And are you getting any response from the nrf connect application. Could you give a try using our dedicated DFU application?

    No, I am not getting any response. It doesn't even start download when I use the dedicated DFU application.

    Regards,

    Devanshu Agarwal

Related