Skip to content

Commit 0aa5092

Browse files
committed
espressif: mcuboot: get MCUBOOT_BOOT_MAX_ALIGN value from DT
This change affects only MCUboot Zephyr Port for ESP chips or Zephyr application with MCUboot compatibilty (which builds the bootutil lib). In these cases, MCUBOOT_BOOT_MAX_ALIGN value must be taken from DT flash write-block-size. Signed-off-by: Almir Okato <[email protected]>
1 parent 2d91d35 commit 0aa5092

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

zephyr/port/include/boot/mcuboot_config/mcuboot_config.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
#ifndef __MCUBOOT_CONFIG_H__
88
#define __MCUBOOT_CONFIG_H__
99

10+
#include <zephyr/devicetree.h>
11+
1012
/*
1113
* Signature types
1214
*
@@ -29,9 +31,12 @@
2931
#define MCUBOOT_SIGN_ED25519
3032
#endif
3133

32-
#if defined(CONFIG_SECURE_FLASH_ENC_ENABLED)
33-
#define MCUBOOT_BOOT_MAX_ALIGN 32
34-
#endif
34+
/* This mcuboot_config.h is used only by Zephyr builds, such as MCUboot
35+
* Zephyr Port for ESP chips or a Zephyr application with MCUboot
36+
* compatibilty (that builds the bootutil lib).
37+
* In these cases, MCUBOOT_BOOT_MAX_ALIGN value must be taken from DT */
38+
#define MCUBOOT_BOOT_MAX_ALIGN DT_PROP(DT_CHOSEN(zephyr_flash), write_block_size)
39+
3540

3641
/*
3742
* Upgrade mode

0 commit comments

Comments
 (0)