File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -8,21 +8,21 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
8
8
"-mfpu=vfpv3"
9
9
"-mfloat-abi=softfp"
10
10
"-mno-unaligned-access"
11
- "-mcpu=cortex-a9 "
11
+ "-mcpu=${CMAKE_SYSTEM_PROCESSOR} "
12
12
)
13
13
elseif (${MBED_TOOLCHAIN} STREQUAL "ARM" )
14
14
list (APPEND common_options
15
15
"-mfpu=vfpv3"
16
16
"-mfloat-abi=hard"
17
- "-mcpu=cortex-a9 "
17
+ "-mcpu=${CMAKE_SYSTEM_PROCESSOR} "
18
18
)
19
19
endif ()
20
20
21
21
function (mbed_set_cpu_core_definitions target )
22
22
target_compile_definitions (${target}
23
23
INTERFACE
24
- __CORTEX_A9
25
- ARM_MATH_CA9
24
+ __CORTEX_${MBED_CPU_CORE_CODE}
25
+ ARM_MATH_C${MBED_CPU_CORE_CODE}
26
26
__FPU_PRESENT
27
27
__CMSIS_RTOS
28
28
__EVAL
Original file line number Diff line number Diff line change @@ -102,7 +102,14 @@ set(c_cxx_compile_options "") # compile options only for C/CXX
102
102
set (asm_compile_options "" ) # compile options only for ASM
103
103
104
104
include (toolchains/${MBED_TOOLCHAIN} )
105
- include (cores/${MBED_CPU_CORE} )
105
+
106
+ set (MBED_CPU_CORE_TAG ${MBED_CPU_CORE} )
107
+ if (MBED_CPU_CORE MATCHES "Cortex-A[0-9]+$" )
108
+ set (MBED_CPU_CORE_TAG "Cortex-A" )
109
+ string (REPLACE "Cortex-" "" MBED_CPU_CORE_CODE "${MBED_CPU_CORE} " )
110
+ endif ()
111
+
112
+ include (cores/${MBED_CPU_CORE_TAG} )
106
113
107
114
#converts a list into a string with each of its elements seperated by a space
108
115
macro (list_to_space_separated OUTPUT_VAR )# 2nd arg: LIST...
You can’t perform that action at this time.
0 commit comments