diff --git a/boot/zephyr/include/mcuboot_config/mcuboot_config.h b/boot/zephyr/include/mcuboot_config/mcuboot_config.h index 8df98ede64..b35a11f97e 100644 --- a/boot/zephyr/include/mcuboot_config/mcuboot_config.h +++ b/boot/zephyr/include/mcuboot_config/mcuboot_config.h @@ -430,11 +430,8 @@ #endif /* Support 32-byte aligned flash sizes */ -#if DT_HAS_CHOSEN(zephyr_flash) - #if DT_PROP_OR(DT_CHOSEN(zephyr_flash), write_block_size, 0) > 8 - #define MCUBOOT_BOOT_MAX_ALIGN \ - DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size) - #endif +#if CONFIG_MCUBOOT_BOOT_MAX_ALIGN > 8 +#define MCUBOOT_BOOT_MAX_ALIGN CONFIG_MCUBOOT_BOOT_MAX_ALIGN #endif #ifdef CONFIG_MCUBOOT_BOOTUTIL_LIB_FOR_DIRECT_XIP