mirror of https://github.com/ARMmbed/mbed-os.git
CMake: add mbed-os and mbed-baremetal targets
mbed-os consists of mbed-core and mbed-rtos mbed-baremetal consists of mbed-core The main change is for mbed-core. Changing from object library to be interface. This way it allows us to do the above to have 2 main targets for users to use. This should be backward compatible change as mbed-os target we used contains the same files/options as previously set.pull/13566/head
parent
d2be577b01
commit
e7c0d93ad4
|
@ -13,10 +13,22 @@ endif()
|
|||
include(${MBED_ROOT}/tools/cmake/core.cmake)
|
||||
include(${MBED_ROOT}/tools/cmake/profile.cmake)
|
||||
|
||||
add_library(mbed-core OBJECT)
|
||||
# TODO CMAKE: Replace mbed-os by a new one that will include mbed-core and mbed-rtos
|
||||
add_library(mbed-os ALIAS mbed-core)
|
||||
add_library(mbed-core INTERFACE)
|
||||
|
||||
add_library(mbed-os INTERFACE)
|
||||
|
||||
target_link_libraries(mbed-os
|
||||
INTERFACE
|
||||
mbed-rtos
|
||||
mbed-core
|
||||
)
|
||||
|
||||
add_library(mbed-baremetal INTERFACE)
|
||||
|
||||
target_link_libraries(mbed-baremetal
|
||||
INTERFACE
|
||||
mbed-core
|
||||
)
|
||||
|
||||
# Validate selected C library type
|
||||
# The C library type selected has to match the library that the target can support
|
||||
|
@ -50,23 +62,21 @@ mbed_set_cpu_core_options(mbed-core ${MBED_TOOLCHAIN})
|
|||
mbed_set_toolchain_options(mbed-core)
|
||||
mbed_set_c_lib(mbed-core ${MBED_C_LIB})
|
||||
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB})
|
||||
mbed_set_language_standard(mbed-core)
|
||||
mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN})
|
||||
|
||||
set_target_properties(mbed-core
|
||||
PROPERTIES
|
||||
MBED_TARGET_LABELS "${MBED_TARGET_LABELS}"
|
||||
set(MBED_TARGET_LABELS
|
||||
${MBED_TARGET_LABELS} CACHE INTERNAL ""
|
||||
)
|
||||
|
||||
target_compile_definitions(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${MBED_TARGET_DEFINITIONS}
|
||||
${MBED_CONFIG_DEFINITIONS}
|
||||
)
|
||||
|
||||
# Include mbed.h and config from generate folder
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
add_subdirectory(RTX)
|
||||
|
||||
target_include_directories(mbed-rtos
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
Include
|
||||
)
|
||||
|
||||
target_sources(mbed-rtos
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
Source/os_systick.c
|
||||
Source/os_tick_ptim.c
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ function(_mbed_get_cortex_m_exception_handlers toolchain_dir)
|
|||
endif()
|
||||
|
||||
target_sources(mbed-rtos
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
Source/${toolchain_dir}/${STARTUP_RTX_FILE}
|
||||
)
|
||||
endforeach()
|
||||
|
@ -29,7 +29,7 @@ endfunction()
|
|||
function(_mbed_get_cortex_a_exception_handlers)
|
||||
foreach(key ${MBED_TARGET_LABELS})
|
||||
if(${key} STREQUAL CORTEX_A)
|
||||
target_sources(mbed-rtos PRIVATE Config/TARGET_CORTEX_A/handlers.c)
|
||||
target_sources(mbed-rtos INTERFACE Config/TARGET_CORTEX_A/handlers.c)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
@ -45,7 +45,7 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-rtos
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
Config
|
||||
Include
|
||||
Include1
|
||||
|
@ -53,7 +53,7 @@ target_include_directories(mbed-rtos
|
|||
)
|
||||
|
||||
target_sources(mbed-rtos
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
Config/RTX_Config.c
|
||||
|
||||
Library/cmsis_os1.c
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
Include
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
Source/irq_ctrl_gic.c
|
||||
)
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
Include
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
Source/mbed_tz_context.c
|
||||
)
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
add_subdirectory(RTE)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
include
|
||||
)
|
||||
|
|
|
@ -3,34 +3,35 @@
|
|||
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||
target_sources(mbed-rtos
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
TOOLCHAIN_GCC_ARM/mbed_boot_gcc_arm.c
|
||||
)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||
target_sources(mbed-rtos
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
TOOLCHAIN_ARM_STD/mbed_boot_arm_std.c
|
||||
)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
target_sources(mbed-rtos
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
TOOLCHAIN_IAR/mbed_boot_iar.c
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(mbed-rtos
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
include
|
||||
)
|
||||
|
||||
target_sources(mbed-rtos PRIVATE
|
||||
source/mbed_boot.c
|
||||
source/mbed_rtos_rtx.c
|
||||
source/mbed_rtx_handlers.c
|
||||
source/mbed_rtx_idle.cpp
|
||||
target_sources(mbed-rtos
|
||||
INTERFACE
|
||||
source/mbed_boot.c
|
||||
source/mbed_rtos_rtx.c
|
||||
source/mbed_rtx_handlers.c
|
||||
source/mbed_rtx_idle.cpp
|
||||
)
|
||||
|
||||
target_compile_definitions(mbed-rtos
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_CONF_RTOS_PRESENT=1
|
||||
)
|
||||
|
|
|
@ -22,16 +22,16 @@ target_sources(mbed-nanostack-libservice
|
|||
# The definition, source files and include directories below
|
||||
# are needed by mbed-trace which is part of the mbed-core CMake target
|
||||
target_compile_definitions(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_CONF_NANOSTACK_LIBSERVICE_PRESENT=1
|
||||
)
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
./mbed-client-libservice
|
||||
)
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
source/libBits/common_functions.c
|
||||
source/libip6string/ip6tos.c
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
./include
|
||||
./include/drivers
|
||||
|
@ -10,7 +10,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
source/AnalogIn.cpp
|
||||
source/AnalogOut.cpp
|
||||
source/BufferedSerial.cpp
|
||||
|
|
|
@ -8,13 +8,13 @@ endif()
|
|||
add_subdirectory(usb)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
include
|
||||
include/hal
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
source/LowPowerTickerWrapper.cpp
|
||||
source/mbed_compat.c
|
||||
source/mbed_critical_section_api.c
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
flash_common_algo.c
|
||||
)
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
include
|
||||
include/usb
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
source/mbed_usb_phy.cpp
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@ add_subdirectory(randlib)
|
|||
add_subdirectory(source)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
include
|
||||
include/platform
|
||||
include/platform/internal
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
mstd_mutex.cpp
|
||||
)
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
add_subdirectory(source)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
include
|
||||
include/mbed-trace
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
source/mbed_trace.c
|
||||
)
|
||||
|
|
|
@ -10,12 +10,12 @@ endif()
|
|||
add_subdirectory(minimal-printf)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
ATCmdParser.cpp
|
||||
CThunkBase.cpp
|
||||
CriticalSectionLock.cpp
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
|
||||
function(_mbed_set_assembly_source)
|
||||
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
|
||||
target_sources(mbed-core PRIVATE TOOLCHAIN_GCC/except.S)
|
||||
target_sources(mbed-core INTERFACE TOOLCHAIN_GCC/except.S)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
|
||||
target_sources(mbed-core PRIVATE TOOLCHAIN_ARM/except.S)
|
||||
target_sources(mbed-core INTERFACE TOOLCHAIN_ARM/except.S)
|
||||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
TOOLCHAIN_IAR/except.S
|
||||
TOOLCHAIN_IAR/cmain.S
|
||||
)
|
||||
|
@ -19,6 +19,6 @@ endfunction()
|
|||
_mbed_set_assembly_source()
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
mbed_fault_handler.c
|
||||
)
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
mbed_printf_armlink_overrides.c
|
||||
mbed_printf_implementation.c
|
||||
mbed_printf_wrapper.c
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/rtos
|
||||
|
@ -11,7 +11,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
source/EventFlags.cpp
|
||||
source/Kernel.cpp
|
||||
source/Mutex.cpp
|
||||
|
@ -19,13 +19,14 @@ target_sources(mbed-core
|
|||
source/ThisThread.cpp
|
||||
)
|
||||
|
||||
target_sources(mbed-os
|
||||
PRIVATE
|
||||
target_sources(mbed-core
|
||||
INTERFACE
|
||||
source/ConditionVariable.cpp
|
||||
source/Thread.cpp
|
||||
)
|
||||
|
||||
|
||||
target_compile_definitions(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_CONF_RTOS_API_PRESENT=1
|
||||
)
|
||||
|
|
|
@ -6,11 +6,11 @@ if("MCUXpresso_MCUS" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
USBPhy_Kinetis.cpp
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ elseif("MCU_K64F" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
fsl_common.c
|
||||
|
||||
api/analogin_api.c
|
||||
|
@ -27,6 +27,6 @@ target_sources(mbed-core
|
|||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
api
|
||||
)
|
||||
|
|
|
@ -8,13 +8,13 @@ endif()
|
|||
add_subdirectory(device)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
drivers
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
pwmout_api.c
|
||||
serial_api.c
|
||||
spi_api.c
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
PeripheralPins.c
|
||||
crc.c
|
||||
fsl_clock_config.c
|
||||
|
|
|
@ -9,7 +9,7 @@ function(_mbed_get_assembly_mk66f18)
|
|||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
set(STARTUP_FILE TOOLCHAIN_IAR/startup_MK66F18.S)
|
||||
endif()
|
||||
target_sources(mbed-core PRIVATE ${STARTUP_FILE})
|
||||
target_sources(mbed-core INTERFACE ${STARTUP_FILE})
|
||||
endfunction()
|
||||
|
||||
function(_mbed_set_mk66f18_linker_file)
|
||||
|
@ -27,11 +27,11 @@ _mbed_get_assembly_mk66f18()
|
|||
_mbed_set_mk66f18_linker_file()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
system_MK66F18.c
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@ elseif("SDT64B" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
mbed_crc_api.c
|
||||
pwmout_api.c
|
||||
reset_reason.c
|
||||
|
@ -61,7 +61,7 @@ target_sources(mbed-core
|
|||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
drivers
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
crc.c
|
||||
fsl_clock_config.c
|
||||
fsl_phy.c
|
||||
|
@ -10,6 +10,6 @@ target_sources(mbed-core
|
|||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ function(_mbed_get_assembly_k64f)
|
|||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
set(STARTUP_FILE TOOLCHAIN_IAR/startup_MK64F12.S)
|
||||
endif()
|
||||
target_sources(mbed-core PRIVATE ${STARTUP_FILE})
|
||||
target_sources(mbed-core INTERFACE ${STARTUP_FILE})
|
||||
endfunction()
|
||||
|
||||
function(_mbed_set_linker_file)
|
||||
|
@ -26,11 +26,11 @@ _mbed_get_assembly_k64f()
|
|||
_mbed_set_linker_file()
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
system_MK64F12.c
|
||||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -6,6 +6,6 @@ if("NRF5x" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -12,12 +12,12 @@ elseif("SDK_15_0" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
lp_ticker.c
|
||||
pinmap.c
|
||||
port_api.c
|
||||
|
|
|
@ -6,12 +6,12 @@ if("MCU_NRF52840" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
PeripheralPinsDefault.c
|
||||
analogin_api.c
|
||||
common_rtc.c
|
||||
|
|
|
@ -6,13 +6,13 @@ if("NRF52840_DK" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/config
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
PeripheralPins.c
|
||||
USBPhy_Nordic.cpp
|
||||
)
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ function(_mbed_get_assembly_nrf52840_dk)
|
|||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
set(STARTUP_FILE TOOLCHAIN_IAR/startup_NRF52840_IAR.S)
|
||||
endif()
|
||||
target_sources(mbed-core PRIVATE ${STARTUP_FILE})
|
||||
target_sources(mbed-core INTERFACE ${STARTUP_FILE})
|
||||
endfunction()
|
||||
|
||||
function(_mbed_set_linker_file)
|
||||
|
@ -27,12 +27,12 @@ _mbed_get_assembly_nrf52840_dk()
|
|||
_mbed_set_linker_file()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
cmsis_nvic.c
|
||||
system_nrf52840.c
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ble
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ble/ble_radio_notification
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries/bootloader
|
||||
|
@ -12,7 +12,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
ble/ble_radio_notification/ble_radio_notification.c
|
||||
|
||||
libraries/bootloader/dfu/nrf_dfu_mbr.c
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nrf_soc_nosd/
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
libraries/fstorage/nrf_fstorage_nvmc.c
|
||||
|
||||
nrf_soc_nosd/nrf_nvic.c
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage
|
||||
|
@ -11,7 +11,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
libraries/fstorage/nrf_fstorage_nvmc.c
|
||||
nrf_soc_nosd/nrf_nvic.c
|
||||
nrf_soc_nosd/nrf_soc.c
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage
|
||||
|
@ -11,7 +11,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
libraries/fstorage/nrf_fstorage_nvmc.c
|
||||
nrf_soc_nosd/nrf_nvic.c
|
||||
nrf_soc_nosd/nrf_soc.c
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries/fstorage
|
||||
|
@ -11,7 +11,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
libraries/fstorage/nrf_fstorage_nvmc.c
|
||||
nrf_soc_nosd/nrf_nvic.c
|
||||
nrf_soc_nosd/nrf_soc.c
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/headers/nrf52
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries/atomic
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libraries/atomic_fifo
|
||||
|
@ -23,7 +23,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
libraries/atomic/nrf_atomic.c
|
||||
|
||||
libraries/atomic_fifo/nrf_atfifo.c
|
||||
|
@ -62,4 +62,4 @@ target_sources(mbed-core
|
|||
libraries/util/app_util_platform.c
|
||||
libraries/util/nrf_assert.c
|
||||
libraries/util/sdk_mapped_flags.c
|
||||
)
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nrfx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nrfx/legacy
|
||||
|
@ -10,7 +10,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
nrfx/legacy/nrf_drv_rng.c
|
||||
nrfx/legacy/nrf_drv_usbd.c
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nrfx
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nrfx/drivers
|
||||
|
@ -17,7 +17,7 @@ target_include_directories(mbed-core
|
|||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
nrfx/drivers/src/nrfx_adc.c
|
||||
nrfx/drivers/src/nrfx_clock.c
|
||||
nrfx/drivers/src/nrfx_comp.c
|
||||
|
|
|
@ -8,12 +8,12 @@ elseif("STM32L4" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
USBPhy_STM32.cpp
|
||||
analogin_api.c
|
||||
analogout_api.c
|
||||
|
|
|
@ -8,7 +8,7 @@ elseif("STM32F439xI" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
analogin_device.c
|
||||
analogout_device.c
|
||||
flash_api.c
|
||||
|
@ -23,7 +23,7 @@ target_sources(mbed-core
|
|||
add_subdirectory(STM32Cube_FW)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/STM32Cube_FW
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/STM32Cube_FW/CMSIS
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
add_subdirectory(STM32F4xx_HAL_Driver)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
system_stm32f4xx.c
|
||||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMSIS
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
add_subdirectory(Legacy)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
stm32f4xx_hal.c
|
||||
stm32f4xx_hal_adc.c
|
||||
stm32f4xx_hal_adc_ex.c
|
||||
|
@ -97,6 +97,6 @@ target_sources(mbed-core
|
|||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
stm32f4xx_hal_can_legacy.c
|
||||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ function(_mbed_get_assembly_stm32f401xe)
|
|||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
set(STARTUP_FILE TOOLCHAIN_IAR/startup_stm32f401xe.S)
|
||||
endif()
|
||||
target_sources(mbed-core PRIVATE ${STARTUP_FILE})
|
||||
target_sources(mbed-core INTERFACE ${STARTUP_FILE})
|
||||
endfunction()
|
||||
|
||||
function(_mbed_set_linker_file)
|
||||
|
@ -31,6 +31,6 @@ if("NUCLEO_F401RE" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
PeripheralPins.c
|
||||
system_clock.c
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ function(_mbed_get_assembly_stm32f439xi)
|
|||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
set(STARTUP_FILE TOOLCHAIN_IAR/startup_stm32f439xx.S)
|
||||
endif()
|
||||
target_sources(mbed-core PRIVATE ${STARTUP_FILE})
|
||||
target_sources(mbed-core INTERFACE ${STARTUP_FILE})
|
||||
endfunction()
|
||||
|
||||
function(_mbed_set_linker_file)
|
||||
|
@ -33,6 +33,6 @@ elseif("WIO_3G" IN_LIST MBED_TARGET_LABELS)
|
|||
endif()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
ONBOARD_QUECTEL_UG96.cpp
|
||||
PeripheralPins.c
|
||||
PinNames.h
|
||||
system_clock.c
|
||||
INTERFACE
|
||||
ONBOARD_QUECTEL_UG96.cpp
|
||||
PeripheralPins.c
|
||||
PinNames.h
|
||||
system_clock.c
|
||||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ endif()
|
|||
add_subdirectory(STM32Cube_FW)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
analogin_device.c
|
||||
analogout_device.c
|
||||
flash_api.c
|
||||
|
@ -19,6 +19,6 @@ target_sources(mbed-core
|
|||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
add_subdirectory(STM32L4xx_HAL_Driver)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
system_stm32l4xx.c
|
||||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
CMSIS
|
||||
)
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
add_subdirectory(Legacy)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
stm32l4xx_hal_adc.c
|
||||
stm32l4xx_hal_adc_ex.c
|
||||
stm32l4xx_hal.c
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
stm32l4xx_hal_can_legacy.c
|
||||
)
|
||||
|
|
|
@ -13,7 +13,7 @@ function(_mbed_get_assembly_stm32l475xg)
|
|||
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
|
||||
set(STARTUP_FILE TOOLCHAIN_IAR/startup_stm32l475xx.S)
|
||||
endif()
|
||||
target_sources(mbed-core PRIVATE ${STARTUP_FILE})
|
||||
target_sources(mbed-core INTERFACE ${STARTUP_FILE})
|
||||
endfunction()
|
||||
|
||||
function(_mbed_set_linker_file_stm32l475xg)
|
||||
|
@ -31,11 +31,11 @@ _mbed_get_assembly_stm32l475xg()
|
|||
_mbed_set_linker_file_stm32l475xg()
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
.
|
||||
)
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
system_clock.c
|
||||
)
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
target_sources(mbed-core
|
||||
PRIVATE
|
||||
INTERFACE
|
||||
PeripheralPins.c
|
||||
)
|
||||
|
||||
target_include_directories(mbed-core
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Sets cpu core options
|
||||
function(mbed_set_cpu_core_options target mbed_toolchain)
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
__CORTEX_M4
|
||||
ARM_MATH_CM4
|
||||
__FPU_PRESENT=1
|
||||
|
@ -21,12 +21,12 @@ function(mbed_set_cpu_core_options target mbed_toolchain)
|
|||
)
|
||||
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${common_toolchain_options}
|
||||
)
|
||||
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${common_toolchain_options}
|
||||
)
|
||||
elseif(${mbed_toolchain} STREQUAL "ARM")
|
||||
|
@ -37,14 +37,14 @@ function(mbed_set_cpu_core_options target mbed_toolchain)
|
|||
)
|
||||
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:${compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${compile_options}>
|
||||
$<$<COMPILE_LANGUAGE:ASM>:-mcpu=Cortex-M4>
|
||||
)
|
||||
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
"--cpu=Cortex-M4"
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -11,7 +11,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Og"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Og"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -31,7 +31,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-x" "assembler-with-cpp"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -52,7 +52,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-O1"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -62,7 +62,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-O1"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -76,20 +76,20 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
)
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
__ASSERT_MSG
|
||||
MULADDC_CANNOT_USE_R7
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_DEBUG
|
||||
MBED_TRAP_ERRORS_ENABLED=1
|
||||
)
|
||||
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${link_options}
|
||||
)
|
||||
endfunction()
|
||||
|
|
|
@ -11,7 +11,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -21,7 +21,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -29,7 +29,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-x" "assembler-with-cpp"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -50,7 +50,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -60,7 +60,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -73,18 +73,18 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
)
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
__ASSERT_MSG
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_TRAP_ERRORS_ENABLED=1
|
||||
)
|
||||
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${link_options}
|
||||
)
|
||||
endfunction()
|
||||
|
|
|
@ -11,7 +11,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -22,7 +22,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Os"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -31,7 +31,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-x" "assembler-with-cpp"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:ASM>:${asm_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -52,7 +52,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Oz"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C>:${c_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -62,7 +62,7 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
"-Oz"
|
||||
)
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:CXX>:${cxx_compile_options}>
|
||||
)
|
||||
|
||||
|
@ -75,18 +75,18 @@ function(mbed_set_profile_options target mbed_toolchain)
|
|||
)
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
__ASSERT_MSG
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
NDEBUG
|
||||
)
|
||||
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${link_options}
|
||||
)
|
||||
endfunction()
|
||||
|
|
|
@ -48,19 +48,19 @@ function(mbed_set_toolchain_options target)
|
|||
)
|
||||
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${common_options}
|
||||
)
|
||||
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
TOOLCHAIN_GCC_ARM
|
||||
TOOLCHAIN_GCC
|
||||
)
|
||||
|
||||
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${common_options}
|
||||
${link_options}
|
||||
)
|
||||
|
@ -92,13 +92,13 @@ endfunction()
|
|||
function(mbed_set_c_lib target lib_type)
|
||||
if (${lib_type} STREQUAL "small")
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_RTOS_SINGLE_THREAD
|
||||
__NEWLIB_NANO
|
||||
)
|
||||
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
"--specs=nano.specs"
|
||||
)
|
||||
endif()
|
||||
|
@ -108,7 +108,7 @@ endfunction()
|
|||
function(mbed_set_printf_lib target lib_type)
|
||||
if (${lib_type} STREQUAL "minimal-printf")
|
||||
target_compile_definitions(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
MBED_MINIMAL_PRINTF
|
||||
)
|
||||
|
||||
|
@ -123,7 +123,7 @@ function(mbed_set_printf_lib target lib_type)
|
|||
"-Wl,--wrap,vfprintf"
|
||||
)
|
||||
target_link_options(${target}
|
||||
PUBLIC
|
||||
INTERFACE
|
||||
${link_options}
|
||||
)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue