Skip to content

Commit 7d49d4b

Browse files
committed
Create FLASH CMSIS ALGO target to remove dependency on MBED_TARGET_LABELS
This goes towards eventually removing reliance on targets.json to specify the requirements of Mbed targets.
1 parent 2660621 commit 7d49d4b

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

hal/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# Copyright (c) 2020 ARM Limited. All rights reserved.
1+
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if("FLASH_CMSIS_ALGO" IN_LIST MBED_TARGET_LABELS)
5-
add_subdirectory(TARGET_FLASH_CMSIS_ALGO)
6-
endif()
4+
add_subdirectory(TARGET_FLASH_CMSIS_ALGO EXCLUDE_FROM_ALL)
75

86
add_subdirectory(usb)
97

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
# Copyright (c) 2020 ARM Limited. All rights reserved.
1+
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
target_include_directories(mbed-core
4+
add_library(mbed-flash-cmsis-algo INTERFACE)
5+
6+
target_include_directories(mbed-flash-cmsis-algo
57
INTERFACE
68
.
79
)
810

9-
target_sources(mbed-core
11+
target_sources(mbed-flash-cmsis-algo
1012
INTERFACE
1113
flash_common_algo.c
1214
)

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ target_sources(mbed-ev-cog-ad3029lz
1515
device/startup_ADuCM3029.c
1616
)
1717

18-
target_link_libraries(mbed-ev-cog-ad3029lz INTERFACE mbed-aducm3029)
18+
target_link_libraries(mbed-ev-cog-ad3029lz INTERFACE mbed-aducm3029 mbed-flash-cmsis-algo)

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ target_sources(mbed-ev-cog-ad4050lz
1515
device/startup_ADuCM4050.c
1616
)
1717

18-
target_link_libraries(mbed-ev-cog-ad4050lz INTERFACE mbed-aducm4050)
18+
target_link_libraries(mbed-ev-cog-ad4050lz INTERFACE mbed-aducm4050 mbed-flash-cmsis-algo)

targets/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ target_sources(mbed-kl46z
3232

3333
mbed_set_linker_script(mbed-kl46z ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
3434

35-
target_link_libraries(mbed-kl46z INTERFACE mbed-klxx)
35+
target_link_libraries(mbed-kl46z INTERFACE mbed-klxx mbed-flash-cmsis-algo)

targets/TARGET_NUVOTON/TARGET_M251/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ target_include_directories(mbed-m251
7070
device/StdDriver/inc
7171
)
7272

73-
target_link_libraries(mbed-m251 INTERFACE mbed-nuvoton)
73+
target_link_libraries(mbed-m251 INTERFACE mbed-nuvoton mbed-flash-cmsis-algo)
7474

7575
mbed_set_linker_script(mbed-m251 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
7676

targets/TARGET_NUVOTON/TARGET_M261/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ target_include_directories(mbed-m261
8181
device/StdDriver/inc
8282
)
8383

84-
target_link_libraries(mbed-m261 INTERFACE mbed-nuvoton)
84+
target_link_libraries(mbed-m261 INTERFACE mbed-nuvoton mbed-flash-cmsis-algo)
8585

8686
mbed_set_linker_script(mbed-m261 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
8787

targets/TARGET_NUVOTON/TARGET_M451/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ mbed_set_linker_script(mbed-m451 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
7575

7676
add_library(mbed-numaker-pfm-m453 INTERFACE)
7777

78-
target_link_libraries(mbed-numaker-pfm-m453 INTERFACE mbed-m451)
78+
target_link_libraries(mbed-numaker-pfm-m453 INTERFACE mbed-m451 mbed-flash-cmsis-algo)

targets/TARGET_NUVOTON/TARGET_M480/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ target_include_directories(mbed-m480
8686
device/StdDriver/inc
8787
)
8888

89-
target_link_libraries(mbed-m480 INTERFACE mbed-nuvoton)
89+
target_link_libraries(mbed-m480 INTERFACE mbed-nuvoton mbed-flash-cmsis-algo)
9090

9191
mbed_set_linker_script(mbed-m480 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
9292

targets/TARGET_NUVOTON/TARGET_NUC472/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ target_link_libraries(mbed-nuc472 INTERFACE mbed-nuvoton)
9494

9595
add_library(mbed-numaker-pfm-nuc472 INTERFACE)
9696

97-
target_link_libraries(mbed-numaker-pfm-nuc472 INTERFACE mbed-nuc472 mbed-nu-xram-supported)
97+
target_link_libraries(mbed-numaker-pfm-nuc472 INTERFACE mbed-nuc472 mbed-nu-xram-supported mbed-flash-cmsis-algo)

0 commit comments

Comments
 (0)