MCUBoot flash offset


I'm working on the bootloader part of a project. Using nrf Connect, the integrated MCUBoot bootloader, trying to figure out how all the parts fit together. Running into something I can't quite find back in the documentation.

For me FLASH_AREA_OFFSET(image_1) returns 0x70000. Makes sense, because that's how I've defined image 1 in the dts:

slot1_partition: partition@70000 {
    label = "image-1";
    reg = <0x00070000 0x00064000>;

However, when I enable the bootloader (CONFIG_BOOTLOADER_MCUBOOT=y), FLASH_AREA_OFFSET(image_1) returns 0x83000. That's an offset of 0x13000 bytes; makes sense that MCUBoot needs space, but I can't quite figure out how this value is defined, and how it relates to the values in my dts.

Would like to know how this works, because I have a storage partition defined, and i don't want to risk overwriting it with a future upgrade because of a changing offset (and thus location of that storage partition).

Parents Reply
  • Hi Shaney,

    Thanks again! You're totally right, this is not the first time I'm lost in the documentation. There's a lot of it, but a lot doesn't apply (because it outdated, or doesn't apply due to some configuration which isn't mentioned), and an overall 'how everything fits together' document seems to be missing.

    Anyway, trick seems to be to use a static layout; now the build picks up my pm_static.yml, yay Slight smile

No Data