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")
88 "-mfpu=vfpv3"
99 "-mfloat-abi=softfp"
1010 "-mno-unaligned-access"
11- "-mcpu=cortex-a9 "
11+ "-mcpu=${CMAKE_SYSTEM_PROCESSOR} "
1212 )
1313elseif (${MBED_TOOLCHAIN} STREQUAL "ARM" )
1414 list (APPEND common_options
1515 "-mfpu=vfpv3"
1616 "-mfloat-abi=hard"
17- "-mcpu=cortex-a9 "
17+ "-mcpu=${CMAKE_SYSTEM_PROCESSOR} "
1818 )
1919endif ()
2020
2121function (mbed_set_cpu_core_definitions target )
2222 target_compile_definitions (${target}
2323 INTERFACE
24- __CORTEX_A9
25- ARM_MATH_CA9
24+ __CORTEX_ ${MBED_CPU_CORE_CODE}
25+ ARM_MATH_C ${MBED_CPU_CORE_CODE}
2626 __FPU_PRESENT
2727 __CMSIS_RTOS
2828 __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
102102set (asm_compile_options "" ) # compile options only for ASM
103103
104104include (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} )
106113
107114#converts a list into a string with each of its elements seperated by a space
108115macro (list_to_space_separated OUTPUT_VAR)# 2nd arg: LIST...
You can’t perform that action at this time.
0 commit comments