mirror of https://github.com/ARMmbed/mbed-os.git
Unify the cores/Cortex-A.cmake
parent
6feca90589
commit
a57b892cb8
|
@ -8,21 +8,21 @@ if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
|||
"-mfpu=vfpv3"
|
||||
"-mfloat-abi=softfp"
|
||||
"-mno-unaligned-access"
|
||||
"-mcpu=cortex-a9"
|
||||
"-mcpu=${CMAKE_SYSTEM_PROCESSOR}"
|
||||
)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||
list(APPEND common_options
|
||||
"-mfpu=vfpv3"
|
||||
"-mfloat-abi=hard"
|
||||
"-mcpu=cortex-a9"
|
||||
"-mcpu=${CMAKE_SYSTEM_PROCESSOR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
function(mbed_set_cpu_core_definitions target)
|
||||
target_compile_definitions(${target}
|
||||
INTERFACE
|
||||
__CORTEX_A9
|
||||
ARM_MATH_CA9
|
||||
__CORTEX_${MBED_CPU_CORE_CODE}
|
||||
ARM_MATH_C${MBED_CPU_CORE_CODE}
|
||||
__FPU_PRESENT
|
||||
__CMSIS_RTOS
|
||||
__EVAL
|
|
@ -102,7 +102,14 @@ set(c_cxx_compile_options "") # compile options only for C/CXX
|
|||
set(asm_compile_options "") # compile options only for ASM
|
||||
|
||||
include(toolchains/${MBED_TOOLCHAIN})
|
||||
include(cores/${MBED_CPU_CORE})
|
||||
|
||||
set(MBED_CPU_CORE_TAG ${MBED_CPU_CORE})
|
||||
if (MBED_CPU_CORE MATCHES "Cortex-A[0-9]+$")
|
||||
set(MBED_CPU_CORE_TAG "Cortex-A")
|
||||
string(REPLACE "Cortex-" "" MBED_CPU_CORE_CODE "${MBED_CPU_CORE}")
|
||||
endif()
|
||||
|
||||
include(cores/${MBED_CPU_CORE_TAG})
|
||||
|
||||
#converts a list into a string with each of its elements seperated by a space
|
||||
macro(list_to_space_separated OUTPUT_VAR)# 2nd arg: LIST...
|
||||
|
|
Loading…
Reference in New Issue