From d81bf04501cb83de4586f431ae91123e4965d86a Mon Sep 17 00:00:00 2001 From: Karel Gardas Date: Fri, 9 Aug 2024 15:39:11 +0200 Subject: [PATCH] bsps/stm32h7: Workaround STM32 H7 errata by enforcing aligned access only The patch changes compiler ABI flags option and adds -mno-unaligned-access there. Usage of this option is also officially recommended way by the errata document how to work around the issue. For more details about the errata please see referenced issue number. Closes #5110. --- spec/build/bsps/arm/stm32h7/abi.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/build/bsps/arm/stm32h7/abi.yml b/spec/build/bsps/arm/stm32h7/abi.yml index 708bb7b0e7..bd7922caea 100644 --- a/spec/build/bsps/arm/stm32h7/abi.yml +++ b/spec/build/bsps/arm/stm32h7/abi.yml @@ -15,12 +15,14 @@ default: - -mcpu=cortex-m4 - -mfpu=fpv4-sp-d16 - -mfloat-abi=hard + - -mno-unaligned-access - enabled-by: true value: - -mthumb - -mcpu=cortex-m7 - -mfpu=fpv5-d16 - -mfloat-abi=hard + - -mno-unaligned-access description: | ABI flags enabled-by: true