diff --git a/cmsis/CMSIS_5/CMSIS/CMakeLists.txt b/cmsis/CMSIS_5/CMSIS/CMakeLists.txt index 6d0f9bb..64b0784 100644 --- a/cmsis/CMSIS_5/CMSIS/CMakeLists.txt +++ b/cmsis/CMSIS_5/CMSIS/CMakeLists.txt @@ -1,9 +1,5 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if("CORTEX_A" IN_LIST MBED_TARGET_LABELS) - add_subdirectory(TARGET_CORTEX_A) -elseif("CORTEX_M" IN_LIST MBED_TARGET_LABELS) - add_subdirectory(TARGET_CORTEX_M) -endif() - +add_subdirectory(TARGET_CORTEX_A EXCLUDE_FROM_ALL) +add_subdirectory(TARGET_CORTEX_M EXCLUDE_FROM_ALL) diff --git a/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/CMakeLists.txt b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/CMakeLists.txt index d31ef5d..cdd29d7 100644 --- a/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/CMakeLists.txt +++ b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_A/CMakeLists.txt @@ -1,12 +1,14 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -target_include_directories(mbed-core +add_library(mbed-cmsis-cortex-a INTERFACE) + +target_include_directories(mbed-cmsis-cortex-a INTERFACE Include ) -target_sources(mbed-core +target_sources(mbed-cmsis-cortex-a INTERFACE Source/irq_ctrl_gic.c ) diff --git a/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/CMakeLists.txt b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/CMakeLists.txt index f13c8c6..b944fe4 100644 --- a/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/CMakeLists.txt +++ b/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/CMakeLists.txt @@ -1,12 +1,14 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -target_include_directories(mbed-core +add_library(mbed-cmsis-cortex-m INTERFACE) + +target_include_directories(mbed-cmsis-cortex-m INTERFACE Include ) -target_sources(mbed-core +target_sources(mbed-cmsis-cortex-m INTERFACE Source/mbed_tz_context.c ) diff --git a/targets/TARGET_ARM_FM/CMakeLists.txt b/targets/TARGET_ARM_FM/CMakeLists.txt index 2743e28..9cb306b 100644 --- a/targets/TARGET_ARM_FM/CMakeLists.txt +++ b/targets/TARGET_ARM_FM/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 add_library(mbed-arm-fm INTERFACE) @@ -9,3 +9,5 @@ INTERFACE . ) + +target_link_libraries(mbed-arm-fm INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_ARM_SSG/CMakeLists.txt b/targets/TARGET_ARM_SSG/CMakeLists.txt index 7c022c2..e81a3f2 100644 --- a/targets/TARGET_ARM_SSG/CMakeLists.txt +++ b/targets/TARGET_ARM_SSG/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 add_library(mbed-arm-ssg INTERFACE) @@ -12,3 +12,5 @@ INTERFACE . ) + +target_link_libraries(mbed-arm-ssg INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_Ambiq_Micro/CMakeLists.txt b/targets/TARGET_Ambiq_Micro/CMakeLists.txt index cf58927..b4dcbe0 100644 --- a/targets/TARGET_Ambiq_Micro/CMakeLists.txt +++ b/targets/TARGET_Ambiq_Micro/CMakeLists.txt @@ -24,3 +24,5 @@ sdk/utils/am_util_string.c sdk/utils/am_util_time.c ) + +target_link_libraries(mbed-ambiq-micro INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_Analog_Devices/CMakeLists.txt b/targets/TARGET_Analog_Devices/CMakeLists.txt index 49645d8..a768dea 100644 --- a/targets/TARGET_Analog_Devices/CMakeLists.txt +++ b/targets/TARGET_Analog_Devices/CMakeLists.txt @@ -10,3 +10,5 @@ INTERFACE . ) + +target_link_libraries(mbed-analog-devices INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt b/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt index eccb596..7fe1b4c 100644 --- a/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt +++ b/targets/TARGET_Cypress/TARGET_PSOC6/CMakeLists.txt @@ -280,6 +280,8 @@ ${ASSEMBLY_ROUTINES} ) +target_link_libraries(mbed-psoc6 INTERFACE mbed-cmsis-cortex-m) + # TODO: Include only if mbed-baremetal is not used if("CY_RTOS_AWARE" IN_LIST MBED_CONFIG_DEFINITIONS) target_link_libraries(mbed-psoc6 INTERFACE mbed-cy-rtos mbed-cy-rtx) diff --git a/targets/TARGET_Freescale/CMakeLists.txt b/targets/TARGET_Freescale/CMakeLists.txt index 86d3133..0d5f256 100644 --- a/targets/TARGET_Freescale/CMakeLists.txt +++ b/targets/TARGET_Freescale/CMakeLists.txt @@ -15,3 +15,5 @@ INTERFACE USBPhy_Kinetis.cpp ) + +target_link_libraries(mbed-freescale INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_GigaDevice/CMakeLists.txt b/targets/TARGET_GigaDevice/CMakeLists.txt index dcaa0af..4748be1 100644 --- a/targets/TARGET_GigaDevice/CMakeLists.txt +++ b/targets/TARGET_GigaDevice/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 add_subdirectory(TARGET_GD32F30X EXCLUDE_FROM_ALL) @@ -10,3 +10,5 @@ INTERFACE . ) + +target_link_libraries(mbed-gigadevice INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_Maxim/CMakeLists.txt b/targets/TARGET_Maxim/CMakeLists.txt index aa1e2ca..3b4402d 100644 --- a/targets/TARGET_Maxim/CMakeLists.txt +++ b/targets/TARGET_Maxim/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 @@ -17,3 +17,5 @@ INTERFACE USBPhy_Maxim.cpp ) + +target_link_libraries(mbed-maxim INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_NORDIC/CMakeLists.txt b/targets/TARGET_NORDIC/CMakeLists.txt index f3c0c56..ab8009b 100644 --- a/targets/TARGET_NORDIC/CMakeLists.txt +++ b/targets/TARGET_NORDIC/CMakeLists.txt @@ -9,3 +9,5 @@ INTERFACE . ) + +target_link_libraries(mbed-nordic INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_NXP/CMakeLists.txt b/targets/TARGET_NXP/CMakeLists.txt index e42f86e..e519a44 100644 --- a/targets/TARGET_NXP/CMakeLists.txt +++ b/targets/TARGET_NXP/CMakeLists.txt @@ -16,3 +16,5 @@ INTERFACE USBHAL_LPC17.cpp ) + +target_link_libraries(mbed-nxp INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_RENESAS/CMakeLists.txt b/targets/TARGET_RENESAS/CMakeLists.txt index b526fd3..9ee79c9 100644 --- a/targets/TARGET_RENESAS/CMakeLists.txt +++ b/targets/TARGET_RENESAS/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 add_subdirectory(TARGET_RZ_A1XX EXCLUDE_FROM_ALL) @@ -10,3 +10,5 @@ INTERFACE . ) + +target_link_libraries(mbed-renesas INTERFACE mbed-cmsis-cortex-a) diff --git a/targets/TARGET_STM/CMakeLists.txt b/targets/TARGET_STM/CMakeLists.txt index 09780eb..5d9609f 100644 --- a/targets/TARGET_STM/CMakeLists.txt +++ b/targets/TARGET_STM/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 add_subdirectory(TARGET_STM32F0 EXCLUDE_FROM_ALL) @@ -51,3 +51,5 @@ us_ticker.c watchdog_api.c ) + +target_link_libraries(mbed-stm INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/CMakeLists.txt b/targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/CMakeLists.txt index feeac95..bb247d8 100644 --- a/targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/CMakeLists.txt +++ b/targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 if(${MBED_TOOLCHAIN} STREQUAL "ARM") @@ -44,3 +44,5 @@ ) mbed_set_linker_script(mbed-s1sbp6a ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_link_libraries(mbed-s1sbp6a INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/CMakeLists.txt b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/CMakeLists.txt index 67b64c1..00ff238 100644 --- a/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/CMakeLists.txt +++ b/targets/TARGET_Samsung/TARGET_SIDK_S5JS100/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 if(${MBED_TOOLCHAIN} STREQUAL "ARM") @@ -64,4 +64,4 @@ mbed_set_linker_script(mbed-s5js100 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) -target_link_libraries(mbed-s5js100) +target_link_libraries(mbed-s5js100 INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_Silicon_Labs/CMakeLists.txt b/targets/TARGET_Silicon_Labs/CMakeLists.txt index 6e4ca12..fc12068 100644 --- a/targets/TARGET_Silicon_Labs/CMakeLists.txt +++ b/targets/TARGET_Silicon_Labs/CMakeLists.txt @@ -10,3 +10,5 @@ INTERFACE . ) + +target_link_libraries(mbed-silicon-labs INTERFACE mbed-cmsis-cortex-m) diff --git a/targets/TARGET_TOSHIBA/CMakeLists.txt b/targets/TARGET_TOSHIBA/CMakeLists.txt index 482c975..bbad8b5 100644 --- a/targets/TARGET_TOSHIBA/CMakeLists.txt +++ b/targets/TARGET_TOSHIBA/CMakeLists.txt @@ -10,3 +10,5 @@ INTERFACE . ) + +target_link_libraries(mbed-toshiba INTERFACE mbed-cmsis-cortex-m)