Skip to content

Commit 6a6b7a6

Browse files
committed
boot: zephyr: config: Allow custom MCUBOOT_BOOT_MAX_ALIGN
Allow setting CONFIG_MCUBOOT_BOOT_MAX_ALIGN to apply a custom programmable block in flash. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 9942fe1 commit 6a6b7a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@
430430
#endif
431431

432432
/* Support 32-byte aligned flash sizes */
433-
#if DT_HAS_CHOSEN(zephyr_flash)
433+
#if defined(CONFIG_MCUBOOT_BOOT_MAX_ALIGN) && CONFIG_MCUBOOT_BOOT_MAX_ALIGN > 0
434+
#define MCUBOOT_BOOT_MAX_ALIGN CONFIG_MCUBOOT_BOOT_MAX_ALIGN
435+
#elif DT_HAS_CHOSEN(zephyr_flash)
434436
#if DT_PROP_OR(DT_CHOSEN(zephyr_flash), write_block_size, 0) > 8
435437
#define MCUBOOT_BOOT_MAX_ALIGN \
436438
DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size)

0 commit comments

Comments
 (0)