From e8ce553ce8224bb0d93b4cb5cf5befac36e6302a Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 15 Mar 2024 11:50:42 -0700 Subject: [PATCH] Change the STM32U5 default image header size to resolve vector table alignment issues with the Cortex-M33. ZD 17661 --- config/examples/stm32u5-nonsecure-dualbank.config | 3 +++ config/examples/stm32u5.config | 3 +++ docs/Targets.md | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/config/examples/stm32u5-nonsecure-dualbank.config b/config/examples/stm32u5-nonsecure-dualbank.config index aa7ffeda1..9f0f1780a 100644 --- a/config/examples/stm32u5-nonsecure-dualbank.config +++ b/config/examples/stm32u5-nonsecure-dualbank.config @@ -23,3 +23,6 @@ WOLFBOOT_SECTOR_SIZE?=0x2000 WOLFBOOT_PARTITION_BOOT_ADDRESS?=0x08010000 WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x08110000 WOLFBOOT_PARTITION_SWAP_ADDRESS?=0xFFFFFFFF + +# Use a larger image header size to enforce alignment requirements for the interrupt vector table +IMAGE_HEADER_SIZE?=1024 diff --git a/config/examples/stm32u5.config b/config/examples/stm32u5.config index bd8459f78..74d6ba77d 100644 --- a/config/examples/stm32u5.config +++ b/config/examples/stm32u5.config @@ -25,3 +25,6 @@ WOLFBOOT_PARTITION_UPDATE_ADDRESS?=0x817F000 WOLFBOOT_PARTITION_SWAP_ADDRESS?=0x81FE000 FLAGS_HOME=0 DISABLE_BACKUP=0 + +# Use a larger image header size to enforce alignment requirements for the interrupt vector table +IMAGE_HEADER_SIZE?=1024 diff --git a/docs/Targets.md b/docs/Targets.md index 28457a11d..0185f87ea 100644 --- a/docs/Targets.md +++ b/docs/Targets.md @@ -229,6 +229,10 @@ mon reset init ## STM32U5 +The STM32U5 is a Cortex-M33 (ARMv8-M). + +Note: We have seen issues with vector table alignment, so the default image header size (IMAGE_HEADER_SIZE) has been increased to 1024 bytes to avoid potential issues. + ### Scenario 1: TrustZone Enabled #### Example Description