Skip to content

Commit cf138a0

Browse files
pdgendtnordicjm
authored andcommitted
boot: zephyr: config: Introduce MCUBOOT_BOOT_MAX_ALIGN Kconfig symbol
Allow setting CONFIG_MCUBOOT_BOOT_MAX_ALIGN to apply a programmable block in flash. Move the chosen flash write block size logic to Kconfig. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 677f160 commit cf138a0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,8 @@
430430
#endif
431431

432432
/* Support 32-byte aligned flash sizes */
433-
#if DT_HAS_CHOSEN(zephyr_flash)
434-
#if DT_PROP_OR(DT_CHOSEN(zephyr_flash), write_block_size, 0) > 8
435-
#define MCUBOOT_BOOT_MAX_ALIGN \
436-
DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size)
437-
#endif
433+
#if CONFIG_MCUBOOT_BOOT_MAX_ALIGN > 8
434+
#define MCUBOOT_BOOT_MAX_ALIGN CONFIG_MCUBOOT_BOOT_MAX_ALIGN
438435
#endif
439436

440437
#ifdef CONFIG_MCUBOOT_BOOTUTIL_LIB_FOR_DIRECT_XIP

0 commit comments

Comments
 (0)