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).

  • Hello,

    I tried the BLE peripheral_uart example but the partition layout seems to be reasonable with example. So there must be something wrong in my application.

    Here's my application flash partitions (when 

    CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n)

    And here's the normal(?) partition table (based on BLE peripheral_uart example).


    My project has following at sysbuild.cmake

    if(SB_CONFIG_BOARD_NRF52840DONGLE)
      set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_LIST_DIR}/boards/nrf52840dongle_nrf52840_pm_static.yml CACHE INTERNAL "")
    endif()
    The BLE peripheral_uart does not have such file at all.

    My project has boards/nrf52840dongle_nrf52840_pm_static.yml
    nrf5_bootloader:
      address: 0xE0000
      end_address: 0x100000
      placement:
        align:
          start: 0x1000
        before:
        - end
      region: flash_primary
      size: 0x20000

    The BLE peripheral_uart does not have such file at all.

    So is it so that above "boards/nrf52840dongle_nrf52840_pm_static.yml" is reason for this flash partition entry that does not disappear when settings CONFIG_BOARD_HAS_NRF5_BOOTLOADER=n?
    I think above files are added when migrating to SDK v2.9.0 (see nRF52840 dongle, BLE peripheral_uart example, SDK migration from 2.6.0 to 2.9.0 ).

    So when using MCUboot (@0x0), then above pm_static.yml can be cleared/removed and flash partitioning would be correct for non-nrf5-bootloader/mbr?

    BR,
    Sami
  • Hi Sami,

    I see. So you have specifically addded nrf5_bootloader to your project by this partition file. If you are going to use the dongle without the bootloader (which means removing it via SWD), then this seves no purpose and should be removed.

Related