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