boards: frdm_mcxn947: Fix MCUBoot support.

- Set MCUBoot "upgrade only" method,
  as the program size is 128B (>32B).
- Set slot sizes to the same value,
  required by the MCUBoot "upgrade only" method.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
This commit is contained in:
Andrej Butok 2024-05-23 16:04:16 +02:00 committed by Carles Cufí
commit 16470adf83
2 changed files with 11 additions and 4 deletions

View file

@ -14,4 +14,11 @@ config MAIN_STACK_SIZE
endif endif
if BOOTLOADER_MCUBOOT
choice MCUBOOT_BOOTLOADER_MODE
# Board only supports MCUBoot via "upgrade only" method:
default MCUBOOT_BOOTLOADER_MODE_OVERWRITE_ONLY
endchoice
endif #BOOTLOADER_MCUBOOT
endif endif

View file

@ -96,16 +96,16 @@
label = "mcuboot"; label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>; reg = <0x00000000 DT_SIZE_K(64)>;
}; };
/* Note slot 0 has one additional sector, /* For the MCUBoot "upgrade only" method,
* this is intended for use with the swap move algorithm * the slot sizes must be equal.
*/ */
slot0_partition: partition@10000 { slot0_partition: partition@10000 {
label = "image-0"; label = "image-0";
reg = <0x00010000 DT_SIZE_K(992)>; reg = <0x00010000 DT_SIZE_K(992)>;
}; };
slot1_partition: partition@100000 { slot1_partition: partition@108000 {
label = "image-1"; label = "image-1";
reg = <0x00108000 DT_SIZE_K(984)>; reg = <0x00108000 DT_SIZE_K(992)>;
}; };
/* storage_partition is placed in WINBOND flash memory*/ /* storage_partition is placed in WINBOND flash memory*/
}; };