diff --git a/platform/source/TARGET_CORTEX_M/CMakeLists.txt b/platform/source/TARGET_CORTEX_M/CMakeLists.txt index 481d09bd21..298fa20a28 100644 --- a/platform/source/TARGET_CORTEX_M/CMakeLists.txt +++ b/platform/source/TARGET_CORTEX_M/CMakeLists.txt @@ -1,11 +1,7 @@ # Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") - target_sources(mbed-core INTERFACE TOOLCHAIN_GCC/except.S) -elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") - target_sources(mbed-core INTERFACE TOOLCHAIN_ARM/except.S) -endif() +target_sources(mbed-core INTERFACE TOOLCHAIN_GCC/except.S) target_sources(mbed-core INTERFACE diff --git a/platform/source/TARGET_CORTEX_M/TOOLCHAIN_GCC/except.S b/platform/source/TARGET_CORTEX_M/TOOLCHAIN_GCC/except.S index a40e743cf1..ac95155fd4 100644 --- a/platform/source/TARGET_CORTEX_M/TOOLCHAIN_GCC/except.S +++ b/platform/source/TARGET_CORTEX_M/TOOLCHAIN_GCC/except.S @@ -105,7 +105,11 @@ UsageFault_Handler: Fault_Handler: #if (DOMAIN_NS == 1) #if MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED +#if defined(__ARMCC_VERSION) +#define mbed_fault_context Image$$RW_m_crash_data$$ZI$$Base +#else #define mbed_fault_context __CRASH_DATA_RAM_START__ +#endif #endif MOV R12,R3