diff --git a/hal/CMakeLists.txt b/hal/CMakeLists.txt index 21b16d3..e0a6930 100644 --- a/hal/CMakeLists.txt +++ b/hal/CMakeLists.txt @@ -1,9 +1,7 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. +# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if("FLASH_CMSIS_ALGO" IN_LIST MBED_TARGET_LABELS) - add_subdirectory(TARGET_FLASH_CMSIS_ALGO) -endif() +add_subdirectory(TARGET_FLASH_CMSIS_ALGO EXCLUDE_FROM_ALL) add_subdirectory(usb) diff --git a/hal/TARGET_FLASH_CMSIS_ALGO/CMakeLists.txt b/hal/TARGET_FLASH_CMSIS_ALGO/CMakeLists.txt index 8a9fc13..c305f01 100644 --- a/hal/TARGET_FLASH_CMSIS_ALGO/CMakeLists.txt +++ b/hal/TARGET_FLASH_CMSIS_ALGO/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-flash-cmsis-algo INTERFACE) + +target_include_directories(mbed-flash-cmsis-algo INTERFACE . ) -target_sources(mbed-core +target_sources(mbed-flash-cmsis-algo INTERFACE flash_common_algo.c ) diff --git a/targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/CMakeLists.txt b/targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/CMakeLists.txt index 25647ee..f4806b1 100644 --- a/targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/CMakeLists.txt +++ b/targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/CMakeLists.txt @@ -15,4 +15,4 @@ device/startup_ADuCM3029.c ) -target_link_libraries(mbed-ev-cog-ad3029lz INTERFACE mbed-aducm3029) +target_link_libraries(mbed-ev-cog-ad3029lz INTERFACE mbed-aducm3029 mbed-flash-cmsis-algo) diff --git a/targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/CMakeLists.txt b/targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/CMakeLists.txt index 45f00e6..d2f2927 100644 --- a/targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/CMakeLists.txt +++ b/targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/CMakeLists.txt @@ -15,4 +15,4 @@ device/startup_ADuCM4050.c ) -target_link_libraries(mbed-ev-cog-ad4050lz INTERFACE mbed-aducm4050) +target_link_libraries(mbed-ev-cog-ad4050lz INTERFACE mbed-aducm4050 mbed-flash-cmsis-algo) diff --git a/targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/CMakeLists.txt b/targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/CMakeLists.txt index c147b7f..bcc94bc 100644 --- a/targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/CMakeLists.txt +++ b/targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/CMakeLists.txt @@ -32,4 +32,4 @@ mbed_set_linker_script(mbed-kl46z ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) -target_link_libraries(mbed-kl46z INTERFACE mbed-klxx) +target_link_libraries(mbed-kl46z INTERFACE mbed-klxx mbed-flash-cmsis-algo) diff --git a/targets/TARGET_NUVOTON/TARGET_M251/CMakeLists.txt b/targets/TARGET_NUVOTON/TARGET_M251/CMakeLists.txt index 518c667..c9d624b 100644 --- a/targets/TARGET_NUVOTON/TARGET_M251/CMakeLists.txt +++ b/targets/TARGET_NUVOTON/TARGET_M251/CMakeLists.txt @@ -70,7 +70,7 @@ device/StdDriver/inc ) -target_link_libraries(mbed-m251 INTERFACE mbed-nuvoton) +target_link_libraries(mbed-m251 INTERFACE mbed-nuvoton mbed-flash-cmsis-algo) mbed_set_linker_script(mbed-m251 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) diff --git a/targets/TARGET_NUVOTON/TARGET_M261/CMakeLists.txt b/targets/TARGET_NUVOTON/TARGET_M261/CMakeLists.txt index eff0d54..abd641d 100644 --- a/targets/TARGET_NUVOTON/TARGET_M261/CMakeLists.txt +++ b/targets/TARGET_NUVOTON/TARGET_M261/CMakeLists.txt @@ -81,7 +81,7 @@ device/StdDriver/inc ) -target_link_libraries(mbed-m261 INTERFACE mbed-nuvoton) +target_link_libraries(mbed-m261 INTERFACE mbed-nuvoton mbed-flash-cmsis-algo) mbed_set_linker_script(mbed-m261 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) diff --git a/targets/TARGET_NUVOTON/TARGET_M451/CMakeLists.txt b/targets/TARGET_NUVOTON/TARGET_M451/CMakeLists.txt index 19c4d0b..dd7fd33 100644 --- a/targets/TARGET_NUVOTON/TARGET_M451/CMakeLists.txt +++ b/targets/TARGET_NUVOTON/TARGET_M451/CMakeLists.txt @@ -75,4 +75,4 @@ add_library(mbed-numaker-pfm-m453 INTERFACE) -target_link_libraries(mbed-numaker-pfm-m453 INTERFACE mbed-m451) +target_link_libraries(mbed-numaker-pfm-m453 INTERFACE mbed-m451 mbed-flash-cmsis-algo) diff --git a/targets/TARGET_NUVOTON/TARGET_M480/CMakeLists.txt b/targets/TARGET_NUVOTON/TARGET_M480/CMakeLists.txt index 18b88a0..c3fa083 100644 --- a/targets/TARGET_NUVOTON/TARGET_M480/CMakeLists.txt +++ b/targets/TARGET_NUVOTON/TARGET_M480/CMakeLists.txt @@ -86,7 +86,7 @@ device/StdDriver/inc ) -target_link_libraries(mbed-m480 INTERFACE mbed-nuvoton) +target_link_libraries(mbed-m480 INTERFACE mbed-nuvoton mbed-flash-cmsis-algo) mbed_set_linker_script(mbed-m480 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) diff --git a/targets/TARGET_NUVOTON/TARGET_NUC472/CMakeLists.txt b/targets/TARGET_NUVOTON/TARGET_NUC472/CMakeLists.txt index c64a4c2..02ae50f 100644 --- a/targets/TARGET_NUVOTON/TARGET_NUC472/CMakeLists.txt +++ b/targets/TARGET_NUVOTON/TARGET_NUC472/CMakeLists.txt @@ -94,4 +94,4 @@ add_library(mbed-numaker-pfm-nuc472 INTERFACE) -target_link_libraries(mbed-numaker-pfm-nuc472 INTERFACE mbed-nuc472 mbed-nu-xram-supported) +target_link_libraries(mbed-numaker-pfm-nuc472 INTERFACE mbed-nuc472 mbed-nu-xram-supported mbed-flash-cmsis-algo)