mirror of https://github.com/ARMmbed/mbed-os.git
45 lines
979 B
CMake
45 lines
979 B
CMake
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR cortex-m1)
|
|
|
|
if(MBED_TOOLCHAIN STREQUAL "GCC_ARM")
|
|
list(APPEND common_toolchain_options
|
|
"-mthumb"
|
|
)
|
|
|
|
target_compile_options(mbed-os
|
|
PUBLIC
|
|
${common_toolchain_options}
|
|
)
|
|
|
|
target_link_options(mbed-os
|
|
PUBLIC
|
|
${common_toolchain_options}
|
|
)
|
|
elseif(MBED_TOOLCHAIN STREQUAL "ARM")
|
|
list(APPEND options
|
|
"-mcpu=cortex-m1"
|
|
)
|
|
|
|
target_compile_options(mbed-os
|
|
PUBLIC
|
|
$<$<COMPILE_LANGUAGE:C>:${compile_options}>
|
|
$<$<COMPILE_LANGUAGE:CXX>:${compile_options}>
|
|
$<$<COMPILE_LANGUAGE:ASM>:--cpu=Cortex-M1>
|
|
)
|
|
|
|
target_link_options(mbed-os
|
|
PUBLIC
|
|
"--cpu=Cortex-M1"
|
|
)
|
|
endif()
|
|
|
|
target_compile_definitions(mbed-os
|
|
PUBLIC
|
|
__CORTEX_M3
|
|
ARM_MATH_CM1
|
|
__CMSIS_RTOS
|
|
__MBED_CMSIS_RTOS_CM
|
|
)
|