From 13d697fa5a042107bbc02768d833b504ae39850c Mon Sep 17 00:00:00 2001 From: Mattia Moffa Date: Mon, 7 Jul 2025 20:24:52 +0200 Subject: [PATCH] Increase IMAGE_HEADER_SIZE on stm32h5 This is needed to accommodate for the ARM Cortex-M33 interrupt vector alignment requirements. The number of interrupts on the STM32H5 is 149; the next power of 2 is 256; in bytes, that is 1024. --- config/examples/stm32h5-dualbank.config | 1 + config/examples/stm32h5-tz-dualbank-otp.config | 3 ++- config/examples/stm32h5-tz.config | 1 + config/examples/stm32h5.config | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/examples/stm32h5-dualbank.config b/config/examples/stm32h5-dualbank.config index f99c0651..ebd4e55d 100644 --- a/config/examples/stm32h5-dualbank.config +++ b/config/examples/stm32h5-dualbank.config @@ -25,3 +25,4 @@ WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x8140000 WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xFFFFFFFF FLAGS_HOME=0 DISABLE_BACKUP=0 +IMAGE_HEADER_SIZE?=1024 diff --git a/config/examples/stm32h5-tz-dualbank-otp.config b/config/examples/stm32h5-tz-dualbank-otp.config index 0b881c67..5f7cd1c2 100644 --- a/config/examples/stm32h5-tz-dualbank-otp.config +++ b/config/examples/stm32h5-tz-dualbank-otp.config @@ -28,4 +28,5 @@ DISABLE_BACKUP=0 FLASH_OTP_KEYSTORE=1 WOLFCRYPT_TZ=1 WOLFCRYPT_TZ_PKCS11=1 -ARMORED=1 \ No newline at end of file +ARMORED=1 +IMAGE_HEADER_SIZE?=1024 diff --git a/config/examples/stm32h5-tz.config b/config/examples/stm32h5-tz.config index 500a5d54..a446942a 100644 --- a/config/examples/stm32h5-tz.config +++ b/config/examples/stm32h5-tz.config @@ -27,3 +27,4 @@ FLAGS_HOME=0 DISABLE_BACKUP=0 WOLFCRYPT_TZ=1 WOLFCRYPT_TZ_PKCS11=1 +IMAGE_HEADER_SIZE?=1024 diff --git a/config/examples/stm32h5.config b/config/examples/stm32h5.config index 489d29ce..ab141fe6 100644 --- a/config/examples/stm32h5.config +++ b/config/examples/stm32h5.config @@ -25,3 +25,4 @@ WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x8140000 WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x08010000 FLAGS_HOME=0 DISABLE_BACKUP=0 +IMAGE_HEADER_SIZE?=1024