mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #14308 from hugueskamba/hk_cmake_create_flash_cmsis_algo
Create FLASH CMSIS ALGO target to remove dependency on MBED_TARGET_LABELSpull/14321/head
commit
3bb8de6ea3
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
||||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
|
||||
|
@ -10,15 +10,15 @@ include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
|
|||
|
||||
project(${TEST_TARGET})
|
||||
|
||||
if("EP_AGORA" IN_LIST MBED_TARGET_LABELS)
|
||||
if(TARGET mbed-ep-agora)
|
||||
set(FLASH_TARGET_CONFIG_HEADER NORDIC/EP_AGORA)
|
||||
elseif("NRF52840_DK" IN_LIST MBED_TARGET_LABELS)
|
||||
elseif(TARGET mbed-nrf52840-dk)
|
||||
set(FLASH_TARGET_CONFIG_HEADER NORDIC/NRF52840_DK)
|
||||
elseif("K82F" IN_LIST MBED_TARGET_LABELS)
|
||||
elseif(TARGET mbed-k82f)
|
||||
set(FLASH_TARGET_CONFIG_HEADER NXP/K82F)
|
||||
elseif("LPC546XX" IN_LIST MBED_TARGET_LABELS)
|
||||
elseif(TARGET mbed-lpc546xx)
|
||||
set(FLASH_TARGET_CONFIG_HEADER NXP/LPC546XX)
|
||||
elseif("EFM32GG11_STK3701" IN_LIST MBED_TARGET_LABELS)
|
||||
elseif(TARGET mbed-efm32gg11-stk3701)
|
||||
set(FLASH_TARGET_CONFIG_HEADER SiliconLabs/EFM32GG11_STK3701)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -15,4 +15,4 @@ target_sources(mbed-ev-cog-ad3029lz
|
|||
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)
|
||||
|
|
|
@ -15,4 +15,4 @@ target_sources(mbed-ev-cog-ad4050lz
|
|||
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)
|
||||
|
|
|
@ -32,4 +32,4 @@ target_sources(mbed-kl46z
|
|||
|
||||
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)
|
||||
|
|
|
@ -70,7 +70,7 @@ target_include_directories(mbed-m251
|
|||
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})
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ target_include_directories(mbed-m261
|
|||
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})
|
||||
|
||||
|
|
|
@ -75,4 +75,4 @@ mbed_set_linker_script(mbed-m451 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
|
|||
|
||||
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)
|
||||
|
|
|
@ -86,7 +86,7 @@ target_include_directories(mbed-m480
|
|||
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})
|
||||
|
||||
|
|
|
@ -94,4 +94,4 @@ target_link_libraries(mbed-nuc472 INTERFACE mbed-nuvoton)
|
|||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue