Skip to content

Commit 046fa78

Browse files
committed
Update GCC except.S to support ARMC6
ARM Compiler 6 supports GNU-style assembly with armclang. Instead of relying on armasm with the legacy syntax, GCC except.S is updated so that it can be used with ARM as well as GCC_ARM toolchains. CMake is updated to use this version.
1 parent 77927d0 commit 046fa78

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

platform/source/TARGET_CORTEX_M/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5-
target_sources(mbed-core INTERFACE TOOLCHAIN_GCC/except.S)
6-
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
7-
target_sources(mbed-core INTERFACE TOOLCHAIN_ARM/except.S)
8-
endif()
4+
target_sources(mbed-core INTERFACE TOOLCHAIN_GCC/except.S)
95

106
target_sources(mbed-core
117
INTERFACE

platform/source/TARGET_CORTEX_M/TOOLCHAIN_GCC/except.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ UsageFault_Handler:
105105
Fault_Handler:
106106
#if (DOMAIN_NS == 1)
107107
#if MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
108+
#if defined(__ARMCC_VERSION)
109+
#define mbed_fault_context Image$$RW_m_crash_data$$ZI$$Base
110+
#else
108111
#define mbed_fault_context __CRASH_DATA_RAM_START__
112+
#endif
109113
#endif
110114

111115
MOV R12,R3

0 commit comments

Comments
 (0)