Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions targets/TARGET_NUVOTON/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("M2351" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_M2351)
elseif("M251" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_M251)
elseif("M261" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_M261)
elseif("M451" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_M451)
elseif("M480" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_M480)
elseif("NANO100" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NANO100)
elseif("NUC472" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NUC472)
endif()
add_library(mbed-nuvoton INTERFACE)

target_include_directories(mbed-core
add_subdirectory(TARGET_M2351 EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_M251 EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_M261 EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_M451 EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_M480 EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_NANO100 EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_NUC472 EXCLUDE_FROM_ALL)

target_include_directories(mbed-nuvoton
INTERFACE
.
)

target_sources(mbed-core
target_sources(mbed-nuvoton
INTERFACE
nu_miscutil.c
nu_modutil.c
Expand Down
20 changes: 10 additions & 10 deletions targets/TARGET_NUVOTON/TARGET_M2351/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("M23_NS" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_M23_NS)
elseif("M23_S" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_M23_S)
elseif("NU_PFM_M2351" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NU_PFM_M2351)
endif()
add_subdirectory(TARGET_M23_NS EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_M23_S EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_NU_PFM_M2351 EXCLUDE_FROM_ALL)

target_sources(mbed-core
add_library(mbed-m2351 INTERFACE)

target_sources(mbed-m2351
INTERFACE
dma_api.c
flash_api.c
Expand Down Expand Up @@ -80,11 +78,13 @@ target_sources(mbed-core
device/startup_M2351.c
)

target_include_directories(mbed-core
target_include_directories(mbed-m2351
INTERFACE
.
device
device/Reg
device/StdDriver/inc
crypto
)

target_link_libraries(mbed-m2351 INTERFACE mbed-nuvoton)
46 changes: 36 additions & 10 deletions targets/TARGET_NUVOTON/TARGET_M2351/TARGET_M23_NS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,43 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("NU_PFM_M2351_NPSA_NS" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NU_PFM_M2351_NPSA_NS)
elseif("NU_PFM_M2351_NS" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NU_PFM_M2351_NS)
elseif("TFM" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_TFM)
endif()
add_library(mbed-nu-pfm-m2351-npsa-ns INTERFACE)
target_link_libraries(mbed-nu-pfm-m2351-npsa-ns
INTERFACE
TARGET_NU_PFM_M2351_NPSA_NS/TARGET_NU_PREBUILD_SECURE/cmse_lib.o
)

add_library(mbed-nu-pfm-m2351-ns INTERFACE)
target_link_libraries(mbed-nu-pfm-m2351-ns
INTERFACE
TARGET_NU_PFM_M2351_NS/TARGET_NU_PREBUILD_SECURE/cmse_lib.o
)

add_library(mbed-nu-m23-ns-tfm INTERFACE)
target_include_directories(mbed-nu-m23-ns-tfm
INTERFACE
device/TARGET_TFM
)
target_sources(mbed-nu-m23-ns-tfm
INTERFACE
TARGET_TFM/tfm_ns_lock_rtx.c
device/TARGET_TFM/cmsis_nvic_virtual.c
)


add_subdirectory(device)
add_library(mbed-m23-ns INTERFACE)

target_sources(mbed-core
target_sources(mbed-m23-ns
INTERFACE
wait_ns.c
)

if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/M2351.ld)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARMC6/M2351.sct)
endif()

mbed_set_linker_script(mbed-m23-ns ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})

target_link_libraries(mbed-m23-ns INTERFACE mbed-2351)

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 16 additions & 5 deletions targets/TARGET_NUVOTON/TARGET_M2351/TARGET_M23_S/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("TFM" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_TFM)
endif()
add_library(mbed-nu-m23-s-tfm INTERFACE)
target_include_directories(mbed-nu-m23-s-tfm
INTERFACE
TARGET_TFM
)
target_sources(mbed-nu-m23-s-tfm
INTERFACE
TARGET_TFM/spm_hal.c
TARGET_TFM/target_cfg.cpp
)

add_library(mbed-m23-s INTERFACE)

if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/M2351.ld)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/M2351.sct)
endif()

set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
mbed_set_linker_script(mbed-m23-s ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})

target_link_libraries(mbed-m23-s INTERFACE mbed-2351)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# 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-nu-pfm-m2351 INTERFACE)

target_include_directories(mbed-nu-pfm-m2351
INTERFACE
.
)
25 changes: 17 additions & 8 deletions targets/TARGET_NUVOTON/TARGET_M251/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("NUMAKER_IOT_M252" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NUMAKER_IOT_M252)
endif()

if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/M251.ld)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/M251.sct)
endif()

set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
add_library(mbed-m251 INTERFACE)

target_sources(mbed-core
target_sources(mbed-m251
INTERFACE
analogin_api.c
analogout_api.c
Expand Down Expand Up @@ -66,10 +62,23 @@ target_sources(mbed-core
us_ticker.c
)

target_include_directories(mbed-core
target_include_directories(mbed-m251
INTERFACE
.
device
device/Reg
device/StdDriver/inc
)

target_link_libraries(mbed-m251 INTERFACE mbed-nuvoton)

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

add_library(mbed-numaker-iot-m252 INTERFACE)

target_include_directories(mbed-numaker-iot-m252
INTERFACE
TARGET_NUMAKER_IOT_M252
)

target_link_libraries(mbed-numaker-iot-m252 INTERFACE mbed-m251)

This file was deleted.

25 changes: 17 additions & 8 deletions targets/TARGET_NUVOTON/TARGET_M261/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if("NUMAKER_IOT_M263A" IN_LIST MBED_TARGET_LABELS)
add_subdirectory(TARGET_NUMAKER_IOT_M263A)
endif()

if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/M261.ld)
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/M261.sct)
endif()

set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
add_library(mbed-m261 INTERFACE)

target_sources(mbed-core
target_sources(mbed-m261
INTERFACE
analogin_api.c
analogout_api.c
Expand Down Expand Up @@ -76,11 +72,24 @@ target_sources(mbed-core
crypto/crypto-misc.cpp
)

target_include_directories(mbed-core
target_include_directories(mbed-m261
INTERFACE
.
crypto
device
device/Reg
device/StdDriver/inc
)

target_link_libraries(mbed-m261 INTERFACE mbed-nuvoton)

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

add_library(mbed-numaker-iot-m263a INTERFACE)

target_include_directories(mbed-numaker-iot-m263a
INTERFACE
TARGET_NUMAKER_IOT_M263A
)

target_link_libraries(mbed-numaker-iot-m263a INTERFACE mbed-m261)

This file was deleted.

17 changes: 13 additions & 4 deletions targets/TARGET_NUVOTON/TARGET_M451/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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 "GCC_ARM")
Expand All @@ -7,9 +7,9 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM/M453.sct)
endif()

set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
add_library(mbed-m451 INTERFACE)

target_sources(mbed-core
target_sources(mbed-m451
INTERFACE
analogin_api.c
analogout_api.c
Expand Down Expand Up @@ -61,9 +61,18 @@ target_sources(mbed-core
watchdog_api.c
)

target_include_directories(mbed-core
target_include_directories(mbed-m451
INTERFACE
.
device
device/StdDriver
)

target_link_libraries(mbed-m451 INTERFACE mbed-nuvoton)

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)
Loading