nRF52840, flash partitions: MCUboot vs. nRF5 MBR+Bootloader

Hello,

I use SDK v2.9.0 with nRF52840 and my application is based on peripheral_uart example.

Have I understood correctly that nRF52840dongle has preloaded (by Nordic) nRF5_MBR (@0x00000000) and nRF5_bootloader (@0x000fffff) and if I just add MCUboot to this peripheral_uart example, then MCUboot is second stage bootlader (@0x00001000)?

I assume that due that project is based on nRF52840dongle, that adds those nrf5_mbr and nrf5_bootloader partitions.

So my question is, if I want to use just single slot application with MCUboot as bootloader and I need only MCUboot:SerialRecovery (over USB; activated with push button during bootup) and no FOTA etc. what/how I should modify the project to get rid off nrf5_mbr and nrf5_bootloader and locate MCUboot to 0x00000000?
Or is it so that nrf5_mbr and nrf5_bootloader must exists always?

Is there any harm, if I get rid off nrf5_mbr and nrf5_bootloader? Yes, I understand that they are lost forever and I must make MCUboot to work and I must load MCUboot e.g with Segger J-Link (and application I can load either using J-Link or MCUboot:SerialRecovery).

Parents
  • Hi,

    You are right that the Dongle use the MBR and nRF5 SDK serial bootloder, and thiis cannot be removed without SWD. You can still use MCUboot if you like though, as expalined here.

    If you connect a debugger you can do a full erase, to remove the MBR and nRF5 SDK bootloader. The only thing you need to keep in mind is that the default VDD our of the high voltage regulator after an erase all opeation on the nRF52840 (when the hardweare is configured for high voltage mode, which it is in the dongle), is 1.8 V. And depending on the debugger, this may cause problems. You can refer to the last part of the old nRF52840 dongle programming tutorial for more on this.

  • Hello!

    Thanks for very quick reply!

    Just wondering that is it the only way to edit those boards files etc. which seems a little inconvenient due that it affect other projects too (if such exists/is in use) and when SDK is updated, then these changes needs to be redone.

    So is it possible to do such changes only using project dependent files (like prj.conf, sysbuild.conf, mcuboot.conf or some overlay file etc.)? If yes, what files should be changed/created and how to change them?

    If I understood correctly above links, when J-Link is used and fstab-stock.dtsi is changed to fstab-debugger.dtsi then MCUboot will be located to 0x0 and no nrf5 MBR or nrf5 bootloader exists.
    Is it possible to change/affect this flash0 layout using just project files/layout files?

    Not tested yet, but above .dtsi files says "compatible = "fixed-partitions";" and if I recall correctly, peripheral_uart project says something else than "fixed partitions". Is there some conflict that prevents above .dtsi file change to work at all?

Reply
  • Hello!

    Thanks for very quick reply!

    Just wondering that is it the only way to edit those boards files etc. which seems a little inconvenient due that it affect other projects too (if such exists/is in use) and when SDK is updated, then these changes needs to be redone.

    So is it possible to do such changes only using project dependent files (like prj.conf, sysbuild.conf, mcuboot.conf or some overlay file etc.)? If yes, what files should be changed/created and how to change them?

    If I understood correctly above links, when J-Link is used and fstab-stock.dtsi is changed to fstab-debugger.dtsi then MCUboot will be located to 0x0 and no nrf5 MBR or nrf5 bootloader exists.
    Is it possible to change/affect this flash0 layout using just project files/layout files?

    Not tested yet, but above .dtsi files says "compatible = "fixed-partitions";" and if I recall correctly, peripheral_uart project says something else than "fixed partitions". Is there some conflict that prevents above .dtsi file change to work at all?

Children
No Data
Related