MCUBoot relocation and execution update

Hello,

I am using NCS 3.0.2 on nRF52840. I have been using MCUBoot for a long time on my device, and it is working fine. Recently, I went through a requirement where I needed to match the flash structure with my other devices, which are running on the nRF52840 with the legacy nRF5 SDK. 

In the legacy nRF5 SDK, if we see the flash sectors, the nRF bootloader is placed at the end of the flash, mostly at 0xF8000. However, in Zephyr, which uses MCUBoot, it is placed at 0x00 at the start of the flash sectors. I attempted to change the MCUBoot location using pm_static.yml, but when I flashed the code, the application failed to start. Most probably, the vector table did not find the updated MCUBoot address through the pm_static.yml, and hence it starts from 0x00; there is a bootloader.

So, my question is, is it really necessary to stick the MCUBoot at the start of the flash at 0x00? Is there any way to update this structure?. 

I've gone through this ticket of devzone where it is mentioned that we can do it, and practically it's possible, but the suggested sample was on the old NCS. Did we update anything related to this in the newer NCS?
Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application

Can someone explain this scenario?

Thank you 
Ankit.

Parents
  • Hello Ankit,

    Sorry for getting back to you a bit late. Have you made any progress in the meantime?

    I am not very familiar with our older nRF5 SDK, and we do not officially support OTA updates from nRF5 SDK to nRF Connect SDK. Although there are some blogs and community guides describing how to do this, none of them are official.

    If you are still facing issues, please let me know, and I will ask one of my colleagues who is more familiar with the nRF5 SDK to take a look.

    Kind regards,
    Abhijith

  • Thanks Abhijith,

    With the above approach, I am still not clear how to modify the MCUBoot starting address other than 0 in Zephyr. From my investigation and research, I found that technically it is possible to relocate the MCUboot other than the 0th location of flash(as far as we are setting all the details in the pm_static.yml), but practically it's not possible, and I do not know the reason.

    About my approach from switching from nRF5 SDK to NCS, I know we do not have any official support on that, and hence I followed a couple of blogs, and I made it work for me.

    My only question was, is it possible to launch the MCUBoot from any location of flash, as mentioned in this ticket? I have tried this, and I was not able to see the expected output. If you could help me with any sample application that does so, it would be helpful.

    Thank you,
    Ankit.

Reply
  • Thanks Abhijith,

    With the above approach, I am still not clear how to modify the MCUBoot starting address other than 0 in Zephyr. From my investigation and research, I found that technically it is possible to relocate the MCUboot other than the 0th location of flash(as far as we are setting all the details in the pm_static.yml), but practically it's not possible, and I do not know the reason.

    About my approach from switching from nRF5 SDK to NCS, I know we do not have any official support on that, and hence I followed a couple of blogs, and I made it work for me.

    My only question was, is it possible to launch the MCUBoot from any location of flash, as mentioned in this ticket? I have tried this, and I was not able to see the expected output. If you could help me with any sample application that does so, it would be helpful.

    Thank you,
    Ankit.

Children
No Data
Related