Skip to content

Commit

Permalink
bootutil: Disable MCUBOOT_BOOT_MAX_ALIGN assert for non-swap modes
Browse files Browse the repository at this point in the history
- 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: Andrej Butok <[email protected]>
  • Loading branch information
butok committed Oct 4, 2023
1 parent 4fe28b3 commit 9016b73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion boot/bootutil/include/bootutil/bootutil_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9016b73

Please sign in to comment.