pull/15526/merge
Vishwanath Martur 2024-10-31 11:53:11 +05:30 committed by GitHub
commit 7c70b08266
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 119 additions and 118 deletions

View File

@ -40,20 +40,20 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
endif() endif()
endif() endif()
add_library(mbed-core INTERFACE) add_library(mbed-core ${CMAKE_LIBRARY_TYPE})
add_library(mbed-os INTERFACE) add_library(mbed-os ${CMAKE_LIBRARY_TYPE})
target_link_libraries(mbed-os target_link_libraries(mbed-os
INTERFACE ${CMAKE_LIBRARY_TYPE}
mbed-rtos mbed-rtos
mbed-core mbed-core
) )
add_library(mbed-baremetal INTERFACE) add_library(mbed-baremetal ${CMAKE_LIBRARY_TYPE})
target_link_libraries(mbed-baremetal target_link_libraries(mbed-baremetal
INTERFACE ${CMAKE_LIBRARY_TYPE}
mbed-core mbed-core
) )
# Validate selected C library type # Validate selected C library type
@ -92,7 +92,7 @@ if(${CMAKE_CROSSCOMPILING})
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB}) mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB})
target_compile_features(mbed-core target_compile_features(mbed-core
INTERFACE ${CMAKE_LIBRARY_TYPE}
c_std_11 c_std_11
cxx_std_14 cxx_std_14
) )
@ -100,7 +100,7 @@ if(${CMAKE_CROSSCOMPILING})
endif() endif()
target_compile_definitions(mbed-core target_compile_definitions(mbed-core
INTERFACE ${CMAKE_LIBRARY_TYPE}
TARGET_NAME=${MBED_TARGET} TARGET_NAME=${MBED_TARGET}
${MBED_TARGET_DEFINITIONS} ${MBED_TARGET_DEFINITIONS}
${MBED_CONFIG_DEFINITIONS} ${MBED_CONFIG_DEFINITIONS}
@ -110,7 +110,7 @@ if(${CMAKE_CROSSCOMPILING})
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
if(NOT BUILD_GREENTEA_TESTS) if(NOT BUILD_GREENTEA_TESTS)
target_compile_definitions(${PROJECT_NAME} target_compile_definitions(${PROJECT_NAME}
INTERFACE ${CMAKE_LIBRARY_TYPE}
MBED_TEST_MODE MBED_TEST_MODE
) )
endif() endif()
@ -135,13 +135,13 @@ if(${CMAKE_CROSSCOMPILING})
# for the GCC_ARM and ARM toolchains respectively. # for the GCC_ARM and ARM toolchains respectively.
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
target_compile_definitions(mbed-core target_compile_definitions(mbed-core
INTERFACE ${CMAKE_LIBRARY_TYPE}
TOOLCHAIN_GCC_ARM TOOLCHAIN_GCC_ARM
TOOLCHAIN_GCC TOOLCHAIN_GCC
) )
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
target_compile_definitions(mbed-core target_compile_definitions(mbed-core
INTERFACE ${CMAKE_LIBRARY_TYPE}
TOOLCHAIN_ARM TOOLCHAIN_ARM
) )
endif() endif()
@ -149,7 +149,7 @@ endif()
# Include mbed.h and config from generate folder # Include mbed.h and config from generate folder
target_include_directories(mbed-core target_include_directories(mbed-core
INTERFACE ${CMAKE_LIBRARY_TYPE}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
@ -157,8 +157,8 @@ target_include_directories(mbed-core
# are spread in different directories can be referenced and can be linked against # are spread in different directories can be referenced and can be linked against
# by libraries that depend on them. # by libraries that depend on them.
# TODO CMake: Should the source files be moved? # TODO CMake: Should the source files be moved?
add_library(mbed-device_key INTERFACE) add_library(mbed-device_key ${CMAKE_LIBRARY_TYPE})
add_library(mbed-rtos INTERFACE) add_library(mbed-rtos ${CMAKE_LIBRARY_TYPE})
# Include targets/ first, because any post-build hook needs to be defined # Include targets/ first, because any post-build hook needs to be defined
# before other parts of Mbed OS can add greentea tests which require # before other parts of Mbed OS can add greentea tests which require
@ -188,7 +188,7 @@ if(${CMAKE_CROSSCOMPILING})
string(REPLACE "_" "-" MBED_TARGET_CONVERTED ${MBED_TARGET_CONVERTED}) string(REPLACE "_" "-" MBED_TARGET_CONVERTED ${MBED_TARGET_CONVERTED})
string(PREPEND MBED_TARGET_CONVERTED "mbed-") string(PREPEND MBED_TARGET_CONVERTED "mbed-")
target_link_libraries(mbed-core INTERFACE ${MBED_TARGET_CONVERTED}) target_link_libraries(mbed-core ${CMAKE_LIBRARY_TYPE} ${MBED_TARGET_CONVERTED})
endif() endif()
# Ninja requires to be forced for response files # Ninja requires to be forced for response files

View File

@ -1,14 +1,14 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
add_library(mbed-cmsis-cortex-a INTERFACE) add_library(mbed-cmsis-cortex-a ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-cmsis-cortex-a target_include_directories(mbed-cmsis-cortex-a
INTERFACE ${CMAKE_LIBRARY_TYPE}
Include Include
) )
target_sources(mbed-cmsis-cortex-a target_sources(mbed-cmsis-cortex-a
INTERFACE ${CMAKE_LIBRARY_TYPE}
Source/irq_ctrl_gic.c Source/irq_ctrl_gic.c
) )

View File

@ -1,14 +1,14 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
add_library(mbed-cmsis-cortex-m INTERFACE) add_library(mbed-cmsis-cortex-m ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-cmsis-cortex-m target_include_directories(mbed-cmsis-cortex-m
INTERFACE ${CMAKE_LIBRARY_TYPE}
Include Include
) )
target_sources(mbed-cmsis-cortex-m target_sources(mbed-cmsis-cortex-m
INTERFACE ${CMAKE_LIBRARY_TYPE}
Source/mbed_tz_context.c Source/mbed_tz_context.c
) )

View File

@ -2,27 +2,27 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# List of all connectivity libraries available. # List of all connectivity libraries available.
add_library(mbed-802.15.4-rf INTERFACE) add_library(mbed-802.15.4-rf ${CMAKE_LIBRARY_TYPE})
add_library(mbed-ble INTERFACE) add_library(mbed-ble ${CMAKE_LIBRARY_TYPE})
add_library(mbed-ble-cordio INTERFACE) add_library(mbed-ble-cordio ${CMAKE_LIBRARY_TYPE})
add_library(mbed-ble-cordio_ll INTERFACE) add_library(mbed-ble-cordio_ll ${CMAKE_LIBRARY_TYPE})
add_library(mbed-cellular INTERFACE) add_library(mbed-cellular ${CMAKE_LIBRARY_TYPE})
add_library(mbed-coap INTERFACE) add_library(mbed-coap ${CMAKE_LIBRARY_TYPE})
add_library(mbed-emac INTERFACE) add_library(mbed-emac ${CMAKE_LIBRARY_TYPE})
add_library(mbed-lorawan INTERFACE) add_library(mbed-lorawan ${CMAKE_LIBRARY_TYPE})
add_library(mbed-lwipstack INTERFACE) add_library(mbed-lwipstack ${CMAKE_LIBRARY_TYPE})
add_library(mbed-mbedtls INTERFACE) add_library(mbed-mbedtls ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nanostack INTERFACE) add_library(mbed-nanostack ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nanostack-coap_service INTERFACE) add_library(mbed-nanostack-coap_service ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nanostack-mbed_mesh_api INTERFACE) add_library(mbed-nanostack-mbed_mesh_api ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nanostack-hal_mbed_cmsis_rtos INTERFACE) add_library(mbed-nanostack-hal_mbed_cmsis_rtos ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nanostack-sal_stack INTERFACE) add_library(mbed-nanostack-sal_stack ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nanostack-sal_stack-event_loop INTERFACE) add_library(mbed-nanostack-sal_stack-event_loop ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nanostack-libservice INTERFACE) add_library(mbed-nanostack-libservice ${CMAKE_LIBRARY_TYPE})
add_library(mbed-netsocket INTERFACE) add_library(mbed-netsocket ${CMAKE_LIBRARY_TYPE})
add_library(mbed-nfc INTERFACE) add_library(mbed-nfc ${CMAKE_LIBRARY_TYPE})
add_library(mbed-ppp INTERFACE) add_library(mbed-ppp ${CMAKE_LIBRARY_TYPE})
add_library(mbed-wifi INTERFACE) add_library(mbed-wifi ${CMAKE_LIBRARY_TYPE})
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
# Add these subdirectories for tests # Add these subdirectories for tests

View File

@ -18,15 +18,15 @@ add_subdirectory(TARGET_STM32U5 EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32WB EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32WB EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32WL EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32WL EXCLUDE_FROM_ALL)
add_library(mbed-stm INTERFACE) add_library(mbed-stm ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-stm target_include_directories(mbed-stm
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_sources(mbed-stm target_sources(mbed-stm
INTERFACE ${CMAKE_LIBRARY_TYPE}
USBPhy_STM32.cpp USBPhy_STM32.cpp
analogin_api.c analogin_api.c
analogout_api.c analogout_api.c
@ -53,4 +53,4 @@ target_sources(mbed-stm
watchdog_api.c watchdog_api.c
) )
target_link_libraries(mbed-stm INTERFACE mbed-cmsis-cortex-m) target_link_libraries(mbed-stm ${CMAKE_LIBRARY_TYPE} mbed-cmsis-cortex-m)

View File

@ -7,15 +7,15 @@ add_subdirectory(TARGET_STM32F070xB EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32F030x8 EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F030x8 EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32f0 INTERFACE) add_library(mbed-stm32f0 ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-stm32f0 target_include_directories(mbed-stm32f0
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_sources(mbed-stm32f0 target_sources(mbed-stm32f0
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
cmsis_nvic.c cmsis_nvic.c
@ -27,4 +27,4 @@ target_sources(mbed-stm32f0
spi_api.c spi_api.c
) )
target_link_libraries(mbed-stm32f0 INTERFACE mbed-stm mbed-stm32f0cube-fw) target_link_libraries(mbed-stm32f0 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32f0cube-fw)

View File

@ -9,10 +9,10 @@ add_subdirectory(TARGET_STM32F103xE EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32F103xG EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F103xG EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32f1 INTERFACE) add_library(mbed-stm32f1 ${CMAKE_LIBRARY_TYPE})
target_sources(mbed-stm32f1 target_sources(mbed-stm32f1
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -23,8 +23,8 @@ target_sources(mbed-stm32f1
) )
target_include_directories(mbed-stm32f1 target_include_directories(mbed-stm32f1
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_link_libraries(mbed-stm32f1 INTERFACE mbed-stm mbed-stm32f1cube-fw) target_link_libraries(mbed-stm32f1 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32f1cube-fw)

View File

@ -4,10 +4,10 @@
add_subdirectory(TARGET_STM32F207xG EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F207xG EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32f2 INTERFACE) add_library(mbed-stm32f2 ${CMAKE_LIBRARY_TYPE})
target_sources(mbed-stm32f2 target_sources(mbed-stm32f2
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -18,7 +18,7 @@ target_sources(mbed-stm32f2
) )
target_include_directories(mbed-stm32f2 target_include_directories(mbed-stm32f2
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
./STM32Cube_FW ./STM32Cube_FW
./STM32Cube_FW/CMSIS ./STM32Cube_FW/CMSIS
@ -26,4 +26,4 @@ target_include_directories(mbed-stm32f2
./STM32Cube_FW/STM32F2xx_HAL_Driver/Legacy ./STM32Cube_FW/STM32F2xx_HAL_Driver/Legacy
) )
target_link_libraries(mbed-stm32f2 INTERFACE mbed-stm mbed-stm32f2cube-fw) target_link_libraries(mbed-stm32f2 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32f2cube-fw)

View File

@ -8,15 +8,15 @@ add_subdirectory(TARGET_STM32F303xE EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32F334x8 EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F334x8 EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32f3 INTERFACE) add_library(mbed-stm32f3 ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-stm32f3 target_include_directories(mbed-stm32f3
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_sources(mbed-stm32f3 target_sources(mbed-stm32f3
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -27,4 +27,4 @@ target_sources(mbed-stm32f3
spi_api.c spi_api.c
) )
target_link_libraries(mbed-stm32f3 INTERFACE mbed-stm mbed-stm32f3cube-fw) target_link_libraries(mbed-stm32f3 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32f3cube-fw)

View File

@ -39,15 +39,15 @@ add_subdirectory(TARGET_STM32F479xG EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32f4 INTERFACE) add_library(mbed-stm32f4 ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-stm32f4 target_include_directories(mbed-stm32f4
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_sources(mbed-stm32f4 target_sources(mbed-stm32f4
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -57,4 +57,4 @@ target_sources(mbed-stm32f4
spi_api.c spi_api.c
) )
target_link_libraries(mbed-stm32f4 INTERFACE mbed-stm mbed-stm32f4cube-fw) target_link_libraries(mbed-stm32f4 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32f4cube-fw)

View File

@ -11,19 +11,19 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE TOOLCHAIN_ARM/stm32f407xe.sct) set(LINKER_FILE TOOLCHAIN_ARM/stm32f407xe.sct)
endif() endif()
add_library(mbed-stm32f407xe INTERFACE) add_library(mbed-stm32f407xe ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-stm32f407xe target_include_directories(mbed-stm32f407xe
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_sources(mbed-stm32f407xe target_sources(mbed-stm32f407xe
INTERFACE ${CMAKE_LIBRARY_TYPE}
${STARTUP_FILE} ${STARTUP_FILE}
system_clock.c system_clock.c
) )
mbed_set_linker_script(mbed-stm32f407xe ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) mbed_set_linker_script(mbed-stm32f407xe ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
target_link_libraries(mbed-stm32f407xe INTERFACE mbed-stm32f4) target_link_libraries(mbed-stm32f407xe ${CMAKE_LIBRARY_TYPE} mbed-stm32f4)

View File

@ -9,18 +9,20 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE TOOLCHAIN_ARM/stm32f429xg.sct) set(LINKER_FILE TOOLCHAIN_ARM/stm32f429xg.sct)
endif() endif()
add_library(mbed-stm32f429xg INTERFACE) add_library(mbed-stm32f429xg ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-stm32f429xg target_include_directories(mbed-stm32f429xg
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_sources(mbed-stm32f429xg target_sources(mbed-stm32f429xg
INTERFACE ${CMAKE_LIBRARY_TYPE}
${STARTUP_FILE} ${STARTUP_FILE}
) )
mbed_set_linker_script(mbed-stm32f429xg ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) mbed_set_linker_script(mbed-stm32f429xg ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
target_link_libraries(mbed-stm32f429xg INTERFACE mbed-stm32f4) target_link_libraries(mbed-stm32f429xg
${CMAKE_LIBRARY_TYPE}
INTERFACE mbed-stm32f4)

View File

@ -8,10 +8,10 @@ add_subdirectory(TARGET_STM32F767xI EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32F769xI EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32F769xI EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32f7 INTERFACE) add_library(mbed-stm32f7 ${CMAKE_LIBRARY_TYPE})
target_sources(mbed-stm32f7 target_sources(mbed-stm32f7
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -24,8 +24,8 @@ target_sources(mbed-stm32f7
target_include_directories(mbed-stm32f7 target_include_directories(mbed-stm32f7
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_link_libraries(mbed-stm32f7 INTERFACE mbed-stm mbed-stm32f7cube-fw) target_link_libraries(mbed-stm32f7 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32f7cube-fw)

View File

@ -17,15 +17,15 @@ add_subdirectory(TARGET_STM32G0C1xE EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32g0 INTERFACE) add_library(mbed-stm32g0 ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-stm32g0 target_include_directories(mbed-stm32g0
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_sources(mbed-stm32g0 target_sources(mbed-stm32g0
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -36,4 +36,4 @@ target_sources(mbed-stm32g0
spi_api.c spi_api.c
) )
target_link_libraries(mbed-stm32g0 INTERFACE mbed-stm mbed-stm32g0cube-fw) target_link_libraries(mbed-stm32g0 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32g0cube-fw)

View File

@ -12,10 +12,10 @@ add_subdirectory(TARGET_STM32G491xE EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32G4A1xE EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32G4A1xE EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32g4 INTERFACE) add_library(mbed-stm32g4 ${CMAKE_LIBRARY_TYPE})
target_sources(mbed-stm32g4 target_sources(mbed-stm32g4
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -27,8 +27,8 @@ target_sources(mbed-stm32g4
) )
target_include_directories(mbed-stm32g4 target_include_directories(mbed-stm32g4
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_link_libraries(mbed-stm32g4 INTERFACE mbed-stm mbed-stm32g4cube-fw) target_link_libraries(mbed-stm32g4 ${CMAKE_LIBRARY_TYPE} mbed-stm mbed-stm32g4cube-fw)

View File

@ -13,10 +13,10 @@ add_subdirectory(TARGET_STM32H7A3xIQ EXCLUDE_FROM_ALL)
add_subdirectory(TARGET_STM32H7B3xIQ EXCLUDE_FROM_ALL) add_subdirectory(TARGET_STM32H7B3xIQ EXCLUDE_FROM_ALL)
add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL) add_subdirectory(STM32Cube_FW EXCLUDE_FROM_ALL)
add_library(mbed-stm32h7 INTERFACE) add_library(mbed-stm32h7 ${CMAKE_LIBRARY_TYPE})
target_sources(mbed-stm32h7 target_sources(mbed-stm32h7
INTERFACE ${CMAKE_LIBRARY_TYPE}
analogin_device.c analogin_device.c
analogout_device.c analogout_device.c
flash_api.c flash_api.c
@ -28,18 +28,18 @@ target_sources(mbed-stm32h7
) )
target_include_directories(mbed-stm32h7 target_include_directories(mbed-stm32h7
INTERFACE ${CMAKE_LIBRARY_TYPE}
. .
) )
target_link_libraries(mbed-stm32h7 INTERFACE mbed-stm mbed-stm32h7cube-fw) target_link_libraries(mbed-stm32h7 ${CMAKE_LIBRARY_TYPE} INTERFACE mbed-stm mbed-stm32h7cube-fw)
# Add clock file depending on the frequency # Add clock file depending on the frequency
if("STM32H7_480MHZ" IN_LIST MBED_TARGET_LABELS) if("STM32H7_480MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_480MHZ/system_clock.c) target_sources(mbed-stm32h7 ${CMAKE_LIBRARY_TYPE} INTERFACE clock_cfg/TARGET_STM32H7_480MHZ/system_clock.c)
elseif("STM32H7_550MHZ" IN_LIST MBED_TARGET_LABELS) elseif("STM32H7_550MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_550MHZ/system_clock.c) target_sources(mbed-stm32h7 ${CMAKE_LIBRARY_TYPE} INTERFACE clock_cfg/TARGET_STM32H7_550MHZ/system_clock.c)
elseif("STM32H7_280MHZ" IN_LIST MBED_TARGET_LABELS) elseif("STM32H7_280MHZ" IN_LIST MBED_TARGET_LABELS)
target_sources(mbed-stm32h7 INTERFACE clock_cfg/TARGET_STM32H7_280MHZ/system_clock.c) target_sources(mbed-stm32h7 ${CMAKE_LIBRARY_TYPE} INTERFACE clock_cfg/TARGET_STM32H7_280MHZ/system_clock.c)
endif() endif()

View File

@ -1,7 +1,7 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
add_library(mbed-1024k INTERFACE) add_library(mbed-1024k ${CMAKE_LIBRARY_TYPE})
if(${MBED_TOOLCHAIN} STREQUAL "ARM") if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TARGET_1024K/TOOLCHAIN_ARM_STD/efm32gg.sct) set(LINKER_FILE device/TARGET_1024K/TOOLCHAIN_ARM_STD/efm32gg.sct)
@ -12,12 +12,12 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
endif() endif()
target_include_directories(mbed-1024k target_include_directories(mbed-1024k
INTERFACE ${CMAKE_LIBRARY_TYPE}
device device
) )
target_sources(mbed-1024k target_sources(mbed-1024k
INTERFACE ${CMAKE_LIBRARY_TYPE}
PeripheralPins.c PeripheralPins.c
device/system_efm32gg.c device/system_efm32gg.c
@ -26,15 +26,15 @@ target_sources(mbed-1024k
mbed_set_linker_script(mbed-1024k ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) mbed_set_linker_script(mbed-1024k ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
add_library(mbed-efm32gg990f1024 INTERFACE) add_library(mbed-efm32gg990f1024 ${CMAKE_LIBRARY_TYPE})
target_link_libraries(mbed-efm32gg990f1024 INTERFACE mbed-efm32 mbed-1024k) target_link_libraries(mbed-efm32gg990f1024 ${CMAKE_LIBRARY_TYPE} mbed-efm32 mbed-1024k)
add_library(mbed-efm32gg-stk3700 INTERFACE) add_library(mbed-efm32gg-stk3700 ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-efm32gg-stk3700 target_include_directories(mbed-efm32gg-stk3700
INTERFACE ${CMAKE_LIBRARY_TYPE}
TARGET_EFM32GG_STK3700 TARGET_EFM32GG_STK3700
) )
target_link_libraries(mbed-efm32gg-stk3700 INTERFACE mbed-efm32gg990f1024) target_link_libraries(mbed-efm32gg-stk3700 ${CMAKE_LIBRARY_TYPE} mbed-efm32gg990f1024)

View File

@ -1,7 +1,7 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
add_library(mbed-efm32gg11 INTERFACE) add_library(mbed-efm32gg11 ${CMAKE_LIBRARY_TYPE})
if(${MBED_TOOLCHAIN} STREQUAL "ARM") if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/efm32gg11.sct) set(LINKER_FILE device/TOOLCHAIN_ARM_STD/efm32gg11.sct)
@ -12,27 +12,27 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
endif() endif()
target_include_directories(mbed-efm32gg11 target_include_directories(mbed-efm32gg11
INTERFACE ${CMAKE_LIBRARY_TYPE}
device device
) )
target_sources(mbed-efm32gg11 target_sources(mbed-efm32gg11
INTERFACE ${CMAKE_LIBRARY_TYPE}
PeripheralPins.c PeripheralPins.c
device/system_efm32gg11b.c device/system_efm32gg11b.c
${STARTUP_FILE} ${STARTUP_FILE}
) )
target_link_libraries(mbed-efm32gg11 INTERFACE mbed-efm32) target_link_libraries(mbed-efm32gg11 ${CMAKE_LIBRARY_TYPE} mbed-efm32)
mbed_set_linker_script(mbed-efm32gg11 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) mbed_set_linker_script(mbed-efm32gg11 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
add_library(mbed-efm32gg11-stk3701 INTERFACE) add_library(mbed-efm32gg11-stk3701 ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-efm32gg11-stk3701 target_include_directories(mbed-efm32gg11-stk3701
INTERFACE ${CMAKE_LIBRARY_TYPE}
TARGET_EFM32GG11_STK3701 TARGET_EFM32GG11_STK3701
) )
target_link_libraries(mbed-efm32gg11-stk3701 INTERFACE mbed-efm32gg11) target_link_libraries(mbed-efm32gg11-stk3701 ${CMAKE_LIBRARY_TYPE} mbed-efm32gg11)

View File

@ -1,7 +1,7 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
add_library(mbed-efm32mg12 INTERFACE) add_library(mbed-efm32mg12 ${CMAKE_LIBRARY_TYPE})
if(${MBED_TOOLCHAIN} STREQUAL "ARM") if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LINKER_FILE device/TOOLCHAIN_ARM_STD/efr32mg12p.sct) set(LINKER_FILE device/TOOLCHAIN_ARM_STD/efr32mg12p.sct)
@ -12,27 +12,27 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
endif() endif()
target_include_directories(mbed-efm32mg12 target_include_directories(mbed-efm32mg12
INTERFACE ${CMAKE_LIBRARY_TYPE}
device device
) )
target_sources(mbed-efm32mg12 target_sources(mbed-efm32mg12
INTERFACE ${CMAKE_LIBRARY_TYPE}
PeripheralPins.c PeripheralPins.c
device/system_efr32mg12p.c device/system_efr32mg12p.c
${STARTUP_FILE} ${STARTUP_FILE}
) )
target_link_libraries(mbed-efm32mg12 INTERFACE mbed-efm32) target_link_libraries(mbed-efm32mg12 ${CMAKE_LIBRARY_TYPE} mbed-efm32)
mbed_set_linker_script(mbed-efm32mg12 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) mbed_set_linker_script(mbed-efm32mg12 ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE})
add_library(mbed-tb-sense-12 INTERFACE) add_library(mbed-tb-sense-12 ${CMAKE_LIBRARY_TYPE})
target_include_directories(mbed-tb-sense-12 target_include_directories(mbed-tb-sense-12
INTERFACE ${CMAKE_LIBRARY_TYPE}
TARGET_TB_SENSE_12 TARGET_TB_SENSE_12
) )
target_link_libraries(mbed-tb-sense-12 INTERFACE mbed-efm32mg12 mbed-sl-rail-efr32-12) target_link_libraries(mbed-tb-sense-12 ${CMAKE_LIBRARY_TYPE} mbed-efm32mg12 mbed-sl-rail-efr32-12)

View File

@ -1,7 +1,7 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. # Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
add_library(mbed-sl-rail-efr32-12 INTERFACE) add_library(mbed-sl-rail-efr32-12 ${CMAKE_LIBRARY_TYPE})
if(${MBED_TOOLCHAIN} STREQUAL "ARM") if(${MBED_TOOLCHAIN} STREQUAL "ARM")
set(LIB_RAIL efr32-rf-driver/rail/TARGET_EFR32_12/librail_efr32xg12_release.ar) set(LIB_RAIL efr32-rf-driver/rail/TARGET_EFR32_12/librail_efr32xg12_release.ar)
@ -9,11 +9,10 @@ elseif(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
set(LIB_RAIL efr32-rf-driver/rail/TARGET_EFR32_12/librail_efr32xg12_release.a) set(LIB_RAIL efr32-rf-driver/rail/TARGET_EFR32_12/librail_efr32xg12_release.a)
endif() endif()
target_link_libraries(mbed-sl-rail-efr32-12 INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/${LIB_RAIL}) target_link_libraries(mbed-sl-rail-efr32-12 ${CMAKE_LIBRARY_TYPE} ${CMAKE_CURRENT_SOURCE_DIR}/${LIB_RAIL})
target_include_directories(mbed-sl-rail-efr32-12 target_include_directories(mbed-sl-rail-efr32-12
INTERFACE ${CMAKE_LIBRARY_TYPE}
efr32-rf-driver/rail efr32-rf-driver/rail
efr32-rf-driver/rail/ble efr32-rf-driver/rail/ble
efr32-rf-driver/rail/ieee802154 efr32-rf-driver/rail/ieee802154