diff --git a/boot/zephyr/include/sysflash/sysflash.h b/boot/zephyr/include/sysflash/sysflash.h index 8cbd4869c..500a9d3a0 100644 --- a/boot/zephyr/include/sysflash/sysflash.h +++ b/boot/zephyr/include/sysflash/sysflash.h @@ -6,8 +6,8 @@ #if USE_PARTITION_MANAGER #include -#define FLASH_AREA_IMAGE_PRIMARY PM_MCUBOOT_PARTITIONS_PRIMARY_ID -#define FLASH_AREA_IMAGE_SECONDARY PM_MCUBOOT_PARTITIONS_SECONDARY_ID +#define FLASH_AREA_IMAGE_PRIMARY PM_MCUBOOT_PRIMARY_ID +#define FLASH_AREA_IMAGE_SECONDARY PM_MCUBOOT_SECONDARY_ID #define FLASH_AREA_IMAGE_SCRATCH PM_MCUBOOT_SCRATCH_ID #else diff --git a/boot/zephyr/pm.yml b/boot/zephyr/pm.yml index dad68bf12..8788652bf 100644 --- a/boot/zephyr/pm.yml +++ b/boot/zephyr/pm.yml @@ -1,27 +1,31 @@ -# The size of this partition is defined by the kconfig symbol -# CONFIG_PM_PARTITION_SIZE_MCUBOOT +#include + mcuboot: + size: CONFIG_PM_PARTITION_SIZE_MCUBOOT placement: - # MCUboot must be placed in front of 'mcuboot_pad'. - before: [mcuboot_pad] + before: [mcuboot_primary] + +mcuboot_primary_app: + # All images to be placed in MCUboot's slot 0 should be placed in this + # partition + span: [app] -mcuboot_partitions: - # Define a set of sub-partitions which spans over 'mcuboot_pad', 'spm' and - # 'app' if both are present. If only 'app' is present, then these partitions - # will only span across that partition. - # The sub partitions share the size of the parent partition(s) equally. - sub_partitions: [primary, secondary] - span: [mcuboot_pad, spm, app] +mcuboot_primary: + span: [mcuboot_pad, mcuboot_primary_app] + +mcuboot_secondary: + share_size: [mcuboot_primary] + placement: + after: + [mcuboot_primary] -# The size of this partition is defined by the kconfig symbol -# CONFIG_PM_PARTITION_SIZE_MCUBOOT_SCRATCH mcuboot_scratch: + size: CONFIG_PM_PARTITION_SIZE_MCUBOOT_SCRATCH placement: after: [app] -# The size of this partition is defined by the kconfig symbol -# CONFIG_PM_PARTITION_SIZE_MCUBOOT_STORAGE mcuboot_storage: + size: CONFIG_PM_PARTITION_SIZE_MCUBOOT_STORAGE placement: after: [mcuboot_scratch] @@ -29,5 +33,6 @@ mcuboot_storage: mcuboot_pad: # MCUboot pad must be placed before the 'spm' partition if that is present. # If 'spm' partition is not present, it must be placed before the 'app'. + size: CONFIG_PM_PARTITION_SIZE_MCUBOOT_PAD placement: - before: [spm, app] + before: [mcuboot_primary_app]