From 98e48828b105d2910310445f92d5b7079ccdadb3 Mon Sep 17 00:00:00 2001 From: Tauno Magnusson Date: Fri, 27 Nov 2020 23:25:37 +0100 Subject: [PATCH] Fix: Added ALIGN(8) for __etext section. This existed in mbed-6.3.0 version. I have not verified if it is truly needed, but it is better to err on the safe side. --- .../TARGET_STM32G431xB/TOOLCHAIN_GCC_ARM/stm32g431xb.ld | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/TOOLCHAIN_GCC_ARM/stm32g431xb.ld b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/TOOLCHAIN_GCC_ARM/stm32g431xb.ld index 5f479936c8..19f50b7ec7 100644 --- a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/TOOLCHAIN_GCC_ARM/stm32g431xb.ld +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/TOOLCHAIN_GCC_ARM/stm32g431xb.ld @@ -111,6 +111,11 @@ SECTIONS } > FLASH __exidx_end = .; + /* Location counter can end up 2byte aligned with narrow Thumb code but + __etext is assumed by startup code to be the LMA of a section in RAM + which must be 8-byte aligned */ + . = ALIGN(8); + __etext = .; _sidata = .;