Commit 13767d0b authored by Andrej Butok's avatar Andrej Butok Committed by Jamie
Browse files

bootutil: Disable MCUBOOT_BOOT_MAX_ALIGN assert for non-swap modes



- Assert should be checked only for SWAP update modes.
- Allow platforms with page size >32 Bytes (e.g. LPC) to use
  MCUBoot, at least for non-SWAP update modes.

Signed-off-by: default avatarAndrej Butok <andrey.butok@nxp.com>
parent 4fe28b3c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -85,8 +85,10 @@ extern "C" {

#ifdef MCUBOOT_BOOT_MAX_ALIGN

#if defined(MCUBOOT_SWAP_USING_MOVE) || defined(MCUBOOT_SWAP_USING_SCRATCH)
_Static_assert(MCUBOOT_BOOT_MAX_ALIGN >= 8 && MCUBOOT_BOOT_MAX_ALIGN <= 32,
               "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN");
               "Unsupported value for MCUBOOT_BOOT_MAX_ALIGN for SWAP upgrade modes");
#endif

#define BOOT_MAX_ALIGN          MCUBOOT_BOOT_MAX_ALIGN
#define BOOT_MAGIC_ALIGN_SIZE   ALIGN_UP(BOOT_MAGIC_SZ, BOOT_MAX_ALIGN)