diff --git a/targets/TARGET_STM/CMakeLists.txt b/targets/TARGET_STM/CMakeLists.txt index 40916f69b91..ca0cda9c555 100644 --- a/targets/TARGET_STM/CMakeLists.txt +++ b/targets/TARGET_STM/CMakeLists.txt @@ -1,12 +1,34 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if("STM32F3" IN_LIST MBED_TARGET_LABELS) +if("STM32F0" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F0) +elseif("STM32F1" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F1) +elseif("STM32F2" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F2) +elseif("STM32F3" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_STM32F3) elseif("STM32F4" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_STM32F4) +elseif("STM32F7" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F7) +elseif("STM32G0" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G0) +elseif("STM32G4" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G4) +elseif("STM32H7" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H7) +elseif("STM32L0" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L0) +elseif("STM32L1" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L1) elseif("STM32L4" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_STM32L4) +elseif("STM32L5" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L5) +elseif("STM32WB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32WB) endif() target_include_directories(mbed-core diff --git a/targets/TARGET_STM/TARGET_STM32F0/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F0/CMakeLists.txt new file mode 100644 index 00000000000..58d9b928c23 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F0/CMakeLists.txt @@ -0,0 +1,85 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32F091xC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F091xC) +elseif("NUCLEO_F070RB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F070RB) +elseif("NUCLEO_F072RB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F072RB) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c + + device/stm32f0xx_hal.c + device/stm32f0xx_hal_adc.c + device/stm32f0xx_hal_adc_ex.c + device/stm32f0xx_hal_can.c + device/stm32f0xx_hal_cec.c + device/stm32f0xx_hal_comp.c + device/stm32f0xx_hal_cortex.c + device/stm32f0xx_hal_crc.c + device/stm32f0xx_hal_crc_ex.c + device/stm32f0xx_hal_dac.c + device/stm32f0xx_hal_dac_ex.c + device/stm32f0xx_hal_dma.c + device/stm32f0xx_hal_flash.c + device/stm32f0xx_hal_flash_ex.c + device/stm32f0xx_hal_gpio.c + device/stm32f0xx_hal_i2c.c + device/stm32f0xx_hal_i2c_ex.c + device/stm32f0xx_hal_i2s.c + device/stm32f0xx_hal_irda.c + device/stm32f0xx_hal_iwdg.c + device/stm32f0xx_hal_pcd.c + device/stm32f0xx_hal_pcd_ex.c + device/stm32f0xx_hal_pwr.c + device/stm32f0xx_hal_pwr_ex.c + device/stm32f0xx_hal_rcc.c + device/stm32f0xx_hal_rcc_ex.c + device/stm32f0xx_hal_rtc.c + device/stm32f0xx_hal_rtc_ex.c + device/stm32f0xx_hal_smartcard.c + device/stm32f0xx_hal_smartcard_ex.c + device/stm32f0xx_hal_smbus.c + device/stm32f0xx_hal_spi.c + device/stm32f0xx_hal_spi_ex.c + device/stm32f0xx_hal_tim.c + device/stm32f0xx_hal_tim_ex.c + device/stm32f0xx_hal_tsc.c + device/stm32f0xx_hal_uart.c + device/stm32f0xx_hal_uart_ex.c + device/stm32f0xx_hal_usart.c + device/stm32f0xx_hal_wwdg.c + device/stm32f0xx_ll_adc.c + device/stm32f0xx_ll_comp.c + device/stm32f0xx_ll_crc.c + device/stm32f0xx_ll_crs.c + device/stm32f0xx_ll_dac.c + device/stm32f0xx_ll_dma.c + device/stm32f0xx_ll_exti.c + device/stm32f0xx_ll_gpio.c + device/stm32f0xx_ll_i2c.c + device/stm32f0xx_ll_pwr.c + device/stm32f0xx_ll_rcc.c + device/stm32f0xx_ll_rtc.c + device/stm32f0xx_ll_spi.c + device/stm32f0xx_ll_tim.c + device/stm32f0xx_ll_usart.c + device/stm32f0xx_ll_utils.c + device/system_stm32f0xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/CMakeLists.txt new file mode 100644 index 00000000000..7f82a1a2a90 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_stm32f070xb.S) + set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/STM32F070XB.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE device/TOOLCHAIN_ARM/startup_stm32f070xb.S) + set(LINKER_FILE device/TOOLCHAIN_ARM/stm32f070xb.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + device/system_clock.c + device/cmsis_nvic.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/CMakeLists.txt new file mode 100644 index 00000000000..0bb99ed4d4e --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_stm32f072xb.S) + set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/STM32F072XB.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE device/TOOLCHAIN_ARM/startup_stm32f072xb.S) + set(LINKER_FILE device/TOOLCHAIN_ARM/stm32f072xb.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + device/system_clock.c + device/cmsis_nvic.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F091xC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F091xC/CMakeLists.txt new file mode 100644 index 00000000000..a5a701dd82d --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F091xC/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F091RC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F091RC) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_stm32f091xc.S) + set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/STM32F091XC.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE device/TOOLCHAIN_ARM/startup_stm32f091xc.S) + set(LINKER_FILE device/TOOLCHAIN_ARM/stm32f091rc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + device/cmsis_nvic.c + device/system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F091xC/TARGET_NUCLEO_F091RC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F091xC/TARGET_NUCLEO_F091RC/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F091xC/TARGET_NUCLEO_F091RC/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt new file mode 100644 index 00000000000..2dfc6dc8636 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F1/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32F103x8" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F103x8) +elseif("STM32F103xB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F103xB) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +add_subdirectory(STM32Cube_FW) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F1/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F1/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..dbcb3ac17b0 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F1/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,74 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + STM32F1xx_HAL_Driver/Legacy/stm32f1xx_hal_can_legacy.c + STM32F1xx_HAL_Driver/stm32f1xx_hal.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_adc.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_adc_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_can.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_cec.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_cortex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_crc.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_dac.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_dac_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_dma.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_eth.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_exti.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_flash.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_flash_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_gpio.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_gpio_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_hcd.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_i2c.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_i2s.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_irda.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_iwdg.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_mmc.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_nand.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_nor.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_pccard.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_pcd.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_pcd_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_pwr.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_rcc.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_rcc_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_rtc.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_rtc_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_sd.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_smartcard.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_spi.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_sram.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_tim.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_tim_ex.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_uart.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_usart.c + STM32F1xx_HAL_Driver/stm32f1xx_hal_wwdg.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_adc.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_crc.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_dac.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_dma.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_exti.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_fsmc.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_gpio.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_i2c.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_pwr.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_rcc.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_rtc.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_sdmmc.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_spi.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_tim.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_usart.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_usb.c + STM32F1xx_HAL_Driver/stm32f1xx_ll_utils.c + system_stm32f1xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32F1xx_HAL_Driver + STM32F1xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103x8/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103x8/CMakeLists.txt new file mode 100644 index 00000000000..516ad90e2f8 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103x8/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f103xb.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32f103x8.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f103xb.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f103x8.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103xB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103xB/CMakeLists.txt new file mode 100644 index 00000000000..a3a339e0e80 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F1/TARGET_STM32F103xB/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f103xb.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32f103xb.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f103xb.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f103xb.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F2/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F2/CMakeLists.txt new file mode 100644 index 00000000000..31a6c1ad822 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F2/CMakeLists.txt @@ -0,0 +1,87 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F207ZG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F207ZG) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c + + device/stm32f2xx_hal.c + device/stm32f2xx_hal_adc.c + device/stm32f2xx_hal_adc_ex.c + device/stm32f2xx_hal_can.c + device/stm32f2xx_hal_cortex.c + device/stm32f2xx_hal_crc.c + device/stm32f2xx_hal_cryp.c + device/stm32f2xx_hal_dac.c + device/stm32f2xx_hal_dac_ex.c + device/stm32f2xx_hal_dcmi.c + device/stm32f2xx_hal_dma.c + device/stm32f2xx_hal_dma_ex.c + device/stm32f2xx_hal_eth.c + device/stm32f2xx_hal_flash.c + device/stm32f2xx_hal_flash_ex.c + device/stm32f2xx_hal_gpio.c + device/stm32f2xx_hal_hash.c + device/stm32f2xx_hal_hcd.c + device/stm32f2xx_hal_i2c.c + device/stm32f2xx_hal_i2s.c + device/stm32f2xx_hal_irda.c + device/stm32f2xx_hal_iwdg.c + device/stm32f2xx_hal_mmc.c + device/stm32f2xx_hal_nand.c + device/stm32f2xx_hal_nor.c + device/stm32f2xx_hal_pccard.c + device/stm32f2xx_hal_pcd.c + device/stm32f2xx_hal_pcd_ex.c + device/stm32f2xx_hal_pwr.c + device/stm32f2xx_hal_pwr_ex.c + device/stm32f2xx_hal_rcc.c + device/stm32f2xx_hal_rcc_ex.c + device/stm32f2xx_hal_rng.c + device/stm32f2xx_hal_rtc.c + device/stm32f2xx_hal_rtc_ex.c + device/stm32f2xx_hal_sd.c + device/stm32f2xx_hal_smartcard.c + device/stm32f2xx_hal_spi.c + device/stm32f2xx_hal_sram.c + device/stm32f2xx_hal_tim.c + device/stm32f2xx_hal_tim_ex.c + device/stm32f2xx_hal_uart.c + device/stm32f2xx_hal_usart.c + device/stm32f2xx_hal_wwdg.c + device/stm32f2xx_ll_adc.c + device/stm32f2xx_ll_crc.c + device/stm32f2xx_ll_dac.c + device/stm32f2xx_ll_dma.c + device/stm32f2xx_ll_exti.c + device/stm32f2xx_ll_fsmc.c + device/stm32f2xx_ll_gpio.c + device/stm32f2xx_ll_i2c.c + device/stm32f2xx_ll_pwr.c + device/stm32f2xx_ll_rcc.c + device/stm32f2xx_ll_rng.c + device/stm32f2xx_ll_rtc.c + device/stm32f2xx_ll_sdmmc.c + device/stm32f2xx_ll_spi.c + device/stm32f2xx_ll_tim.c + device/stm32f2xx_ll_usart.c + device/stm32f2xx_ll_usb.c + device/stm32f2xx_ll_utils.c + device/system_stm32f2xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/CMakeLists.txt new file mode 100644 index 00000000000..d8713bf487a --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f207xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F207ZGTx_FLASH.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f207xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f207xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + device/system_clock.c + ${STARTUP_FILE} +) + +add_subdirectory(STM32Cube_FW) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32F3/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/CMakeLists.txt index 0b9545d4f53..05e24300ca0 100644 --- a/targets/TARGET_STM/TARGET_STM32F3/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F3/CMakeLists.txt @@ -1,11 +1,19 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if("STM32F303x8" IN_LIST MBED_TARGET_LABELS) - add_subdirectory(TARGET_STM32F303x8) +if("STM32F302x8" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F302x8) +elseif("STM32F303x8" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_TARGET_STM32F303x8) +elseif("STM32F303xC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F303xC) +elseif("STM32F303xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F303xE) +elseif("STM32F334x8" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F334x8) endif() -add_subdirectory(device) +add_subdirectory(STM32Cube_FW) target_include_directories(mbed-core INTERFACE diff --git a/targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..46f24da3cc5 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F3/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,86 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + STM32F3xx_HAL_Driver/Legacy/stm32f3xx_hal_can_legacy.c + STM32F3xx_HAL_Driver/stm32f3xx_hal.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_adc.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_adc_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_can.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_cec.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_comp.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_cortex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_crc.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_crc_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_dac.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_dac_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_dma.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_exti.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_flash.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_flash_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_gpio.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_hrtim.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_i2c.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_i2c_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_i2s.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_i2s_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_irda.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_iwdg.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_nand.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_nor.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_opamp.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_opamp_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_pccard.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_pcd.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_pcd_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_pwr.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_pwr_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_rcc.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_rcc_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_rtc.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_rtc_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_sdadc.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_smartcard.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_smartcard_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_smbus.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_spi.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_spi_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_sram.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_tim.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_tim_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_tsc.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_uart.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_uart_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_usart.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_usart_ex.c + STM32F3xx_HAL_Driver/stm32f3xx_hal_wwdg.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_adc.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_comp.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_crc.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_dac.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_dma.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_exti.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_fmc.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_gpio.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_hrtim.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_i2c.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_opamp.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_pwr.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_rcc.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_rtc.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_spi.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_tim.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_usart.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_usb.c + STM32F3xx_HAL_Driver/stm32f3xx_ll_utils.c + system_stm32f3xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32F3xx_HAL_Driver + STM32F3xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/CMakeLists.txt index 0cdeb5f0e32..b17734b2280 100644 --- a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/CMakeLists.txt @@ -5,7 +5,21 @@ if("NUCLEO_F303K8" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_NUCLEO_F303K8) endif() -add_subdirectory(device) +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f303x8.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F303X8.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f303x8.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f303x8.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) target_include_directories(mbed-core INTERFACE diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/TARGET_NUCLEO_F303K8/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/TARGET_NUCLEO_F303K8/CMakeLists.txt index c4d3e2a096c..3978dec3fed 100644 --- a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/TARGET_NUCLEO_F303K8/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/TARGET_NUCLEO_F303K8/CMakeLists.txt @@ -9,5 +9,4 @@ target_include_directories(mbed-core target_sources(mbed-core INTERFACE PeripheralPins.c - system_clock.c ) diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/CMakeLists.txt deleted file mode 100644 index 0a9ae7546df..00000000000 --- a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/device/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -function(_mbed_get_assembly_stm32f303x8) - if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") - set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f303x8.S) - elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") - set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f303x8.S) - elseif(${MBED_TOOLCHAIN} STREQUAL "IAR") - set(STARTUP_FILE TOOLCHAIN_IAR/startup_stm32f303x8.S) - endif() - target_sources(mbed-core INTERFACE ${STARTUP_FILE}) -endfunction() - -function(_mbed_set_linker_file) - if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") - set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_GCC_ARM/STM32F303X8.ld) - elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") - set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_ARM/stm32f303x8.sct) - elseif(${MBED_TOOLCHAIN} STREQUAL "IAR") - set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_IAR/stm32f303x8.icf) - endif() - set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${LINKER_FILE}) -endfunction() - -_mbed_get_assembly_stm32f303x8() -_mbed_set_linker_file() - -target_include_directories(mbed-core - INTERFACE - . -) diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/CMakeLists.txt new file mode 100644 index 00000000000..866fc7ee67b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xC/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F303K8" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F303K8) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f303xc.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F303XC.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f303xc.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f303xc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/CMakeLists.txt new file mode 100644 index 00000000000..c72616fa8b8 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F303RE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F303RE) +elseif("NUCLEO_F303ZE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F303ZE) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f303xe.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F303XE.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f303xe.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f303xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303RE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303RE/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303RE/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303ZE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303ZE/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303xE/TARGET_NUCLEO_F303ZE/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F334x8/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F334x8/CMakeLists.txt new file mode 100644 index 00000000000..f30f6203b4c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F334x8/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f334x8.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F334X8.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f334x8.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f334x8.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F3/device/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F3/device/CMakeLists.txt deleted file mode 100644 index 1e2dc34e8cc..00000000000 --- a/targets/TARGET_STM/TARGET_STM32F3/device/CMakeLists.txt +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (c) 2020 ARM Limited. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -target_include_directories(mbed-core - INTERFACE - . -) - -target_sources(mbed-core - INTERFACE - stm32f3xx_hal.c - stm32f3xx_hal_adc.c - stm32f3xx_hal_adc_ex.c - stm32f3xx_hal_can.c - stm32f3xx_hal_cec.c - stm32f3xx_hal_comp.c - stm32f3xx_hal_cortex.c - stm32f3xx_hal_crc.c - stm32f3xx_hal_crc_ex.c - stm32f3xx_hal_dac.c - stm32f3xx_hal_dac_ex.c - stm32f3xx_hal_dma.c - stm32f3xx_hal_flash.c - stm32f3xx_hal_flash_ex.c - stm32f3xx_hal_gpio.c - stm32f3xx_hal_hrtim.c - stm32f3xx_hal_i2c.c - stm32f3xx_hal_i2c_ex.c - stm32f3xx_hal_i2s_ex.c - stm32f3xx_hal_irda.c - stm32f3xx_hal_iwdg.c - stm32f3xx_hal_nand.c - stm32f3xx_hal_nor.c - stm32f3xx_hal_opamp.c - stm32f3xx_hal_opamp_ex.c - stm32f3xx_hal_pccard.c - stm32f3xx_hal_pcd.c - stm32f3xx_hal_pcd_ex.c - stm32f3xx_hal_pwr.c - stm32f3xx_hal_pwr_ex.c - stm32f3xx_hal_rcc.c - stm32f3xx_hal_rcc_ex.c - stm32f3xx_hal_rtc.c - stm32f3xx_hal_rtc_ex.c - stm32f3xx_hal_sdadc.c - stm32f3xx_hal_smartcard.c - stm32f3xx_hal_smartcard_ex.c - stm32f3xx_hal_smbus.c - stm32f3xx_hal_spi.c - stm32f3xx_hal_spi_ex.c - stm32f3xx_hal_sram.c - stm32f3xx_hal_tim.c - stm32f3xx_hal_tim_ex.c - stm32f3xx_hal_tsc.c - stm32f3xx_hal_uart.c - stm32f3xx_hal_uart_ex.c - stm32f3xx_hal_usart.c - stm32f3xx_hal_wwdg.c - stm32f3xx_ll_adc.c - stm32f3xx_ll_comp.c - stm32f3xx_ll_crc.c - stm32f3xx_ll_dac.c - stm32f3xx_ll_dma.c - stm32f3xx_ll_exti.c - stm32f3xx_ll_fmc.c - stm32f3xx_ll_gpio.c - stm32f3xx_ll_hrtim.c - stm32f3xx_ll_i2c.c - stm32f3xx_ll_opamp.c - stm32f3xx_ll_pwr.c - stm32f3xx_ll_rcc.c - stm32f3xx_ll_rtc.c - stm32f3xx_ll_spi.c - stm32f3xx_ll_tim.c - stm32f3xx_ll_usart.c - stm32f3xx_ll_utils.c - system_stm32f3xx.c -) diff --git a/targets/TARGET_STM/TARGET_STM32F4/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/CMakeLists.txt index c1333d2edb9..911712e1cfd 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F4/CMakeLists.txt @@ -1,10 +1,36 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if("STM32F401xE" IN_LIST MBED_TARGET_LABELS) +if("MTS_DRAGONFLY_F411RE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_MTS_DRAGONFLY_F411RE) +elseif("MTS_MDOT_F411RE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_MTS_MDOT_F411RE) +elseif("STM32F401xC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F401xC) +elseif("STM32F401xE" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_STM32F401xE) +elseif("STM32F407xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F407xE) +elseif("STM32F407xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F407xG) +elseif("STM32F410xB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F410xB) +elseif("STM32F411xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F411xE) +elseif("STM32F412xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F412xG) +elseif("STM32F413xH" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F413xH) +elseif("STM32F429xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F429xI) +elseif("STM32F437xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F437xG) elseif("STM32F439xI" IN_LIST MBED_TARGET_LABELS) - add_subdirectory(TARGET_STM32F439xI) + add_subdirectory(TARGET_STM32F439xI) +elseif("STM32F446xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F446xE) +elseif("STM32F469xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F469xI) endif() target_sources(mbed-core diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/CMakeLists.txt new file mode 100644 index 00000000000..b55aed63e29 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f411xe.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F411XE.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f411xe.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f411re.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ONBOARD_TELIT_HE910.cpp + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE/CMakeLists.txt new file mode 100644 index 00000000000..6a166642ead --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f411xe.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F411XE.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f411xe.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f411re.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + PeripheralPins.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xC/CMakeLists.txt new file mode 100644 index 00000000000..619040ae7da --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xC/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f401xc.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F401XC.ld) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + PeripheralPins.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/CMakeLists.txt index 343048f39b3..7d890d6f265 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/CMakeLists.txt @@ -1,35 +1,25 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -function(_mbed_get_assembly_stm32f401xe) - if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") - set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f401xe.S) - elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") - set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f401xe.S) - elseif(${MBED_TOOLCHAIN} STREQUAL "IAR") - set(STARTUP_FILE TOOLCHAIN_IAR/startup_stm32f401xe.S) - endif() - target_sources(mbed-core INTERFACE ${STARTUP_FILE}) -endfunction() - -function(_mbed_set_linker_file) - if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") - set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_GCC_ARM/STM32F401XE.ld) - elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") - set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_ARM/stm32f401xe.sct) - elseif(${MBED_TOOLCHAIN} STREQUAL "IAR") - set(LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/TOOLCHAIN_IAR/stm32f401xe.icf) - endif() - set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${LINKER_FILE}) -endfunction() +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f401xe.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F401XE.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f401xe.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f401xe.sct) +endif() -_mbed_get_assembly_stm32f401xe() -_mbed_set_linker_file() +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) if("NUCLEO_F401RE" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_NUCLEO_F401RE) endif() +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + target_include_directories(mbed-core INTERFACE . diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xE/CMakeLists.txt new file mode 100644 index 00000000000..c37680db003 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xE/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("ARCH_MAX" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_ARCH_MAX) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f401xe.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F401XE.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f401xe.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f401xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xE/TARGET_ARCH_MAX/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xE/TARGET_ARCH_MAX/CMakeLists.txt new file mode 100644 index 00000000000..ab87e56f903 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xE/TARGET_ARCH_MAX/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xG/CMakeLists.txt new file mode 100644 index 00000000000..efc0838aaa5 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xG/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f407xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F407XG.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_STM32F407xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/STM32F407xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F410xB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F410xB/CMakeLists.txt new file mode 100644 index 00000000000..97e642be1d1 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F410xB/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f410rx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F410xB.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f410rx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f410xb.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/CMakeLists.txt new file mode 100644 index 00000000000..7ac4fa28fd8 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F411RE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F411RE) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f411xe.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F411XE.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f411xe.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f411re.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/TARGET_NUCLEO_F411RE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/TARGET_NUCLEO_F411RE/CMakeLists.txt new file mode 100644 index 00000000000..ab87e56f903 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/TARGET_NUCLEO_F411RE/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/CMakeLists.txt new file mode 100644 index 00000000000..51478689565 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F412ZG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F412ZG) +elseif("WIO_EMW3166" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_WIO_EMW3166) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f412zx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F412xG.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f412zx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f412xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/TARGET_NUCLEO_F412ZG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/TARGET_NUCLEO_F412ZG/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/TARGET_NUCLEO_F412ZG/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/TARGET_WIO_EMW3166/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/TARGET_WIO_EMW3166/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F412xG/TARGET_WIO_EMW3166/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/CMakeLists.txt new file mode 100644 index 00000000000..66b0f706ba6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_F413ZH" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_F413ZH) +elseif("MTS_DRAGONFLY_F413RH" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_MTS_DRAGONFLY_F413RH) +elseif("NUCLEO_F413ZH" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F413ZH) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f413xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F413xH.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f413xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f413xh.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_MTS_DRAGONFLY_F413RH/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_MTS_DRAGONFLY_F413RH/CMakeLists.txt new file mode 100644 index 00000000000..2119ff0783c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_MTS_DRAGONFLY_F413RH/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + ONBOARD_TELIT_HE910.cpp + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_NUCLEO_F413ZH/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_NUCLEO_F413ZH/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_NUCLEO_F413ZH/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/CMakeLists.txt new file mode 100644 index 00000000000..9f095d04539 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_F429ZI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_F429ZI) +elseif("NUCLEO_F429ZI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F429ZI) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f429xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F429xI.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f429xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f429xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_init_pre.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_DISCO_F429ZI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_DISCO_F429ZI/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_DISCO_F429ZI/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_NUCLEO_F429ZI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_NUCLEO_F429ZI/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F429xI/TARGET_NUCLEO_F429ZI/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/CMakeLists.txt new file mode 100644 index 00000000000..33acba99891 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f437xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F437xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f437xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f437xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/CMakeLists.txt index 3f00061b1f1..c018f3d429f 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/CMakeLists.txt @@ -30,6 +30,8 @@ if("NUCLEO_F439ZI" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_NUCLEO_F439ZI) elseif("WIO_3G" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_WIO_3G) +elseif("WIO_BG96" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_WIO_BG96) endif() target_include_directories(mbed-core diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_NUCLEO_F439ZI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_NUCLEO_F439ZI/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_NUCLEO_F439ZI/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_WIO_3G/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_WIO_3G/CMakeLists.txt index ba07e5195ab..e24389aa754 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_WIO_3G/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_WIO_3G/CMakeLists.txt @@ -5,7 +5,6 @@ target_sources(mbed-core INTERFACE ONBOARD_QUECTEL_UG96.cpp PeripheralPins.c - PinNames.h system_clock.c ) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_WIO_BG96/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_WIO_BG96/CMakeLists.txt new file mode 100644 index 00000000000..25716b2fa43 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_WIO_BG96/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + ONBOARD_QUECTEL_BG96.cpp + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/CMakeLists.txt new file mode 100644 index 00000000000..89f1543089c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F446RE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F446RE) +elseif("NUCLEO_F446ZE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F446ZE) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f446xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F446XE.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f446xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f446xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446RE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446RE/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446RE/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446ZE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446ZE/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/TARGET_NUCLEO_F446ZE/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/CMakeLists.txt new file mode 100644 index 00000000000..cd6df6ae526 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_F469NI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_F469NI) +elseif("SDP_K1" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_SDP_K1) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f469xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F469XI.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f469xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f469xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/TARGET_DISCO_F469NI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/TARGET_DISCO_F469NI/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/TARGET_DISCO_F469NI/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/TARGET_SDP_K1/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/TARGET_SDP_K1/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F469xI/TARGET_SDP_K1/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/CMakeLists.txt new file mode 100644 index 00000000000..befde63ae42 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32F746xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F746xG) +elseif("STM32F756xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F756xG) +elseif("STM32F767xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F767xI) +elseif("STM32F769xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32F769xI) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +add_subdirectory(STM32Cube_FW) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..b0ff05ac155 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,106 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + system_stm32f7xx.c + + STM32F7xx_HAL_Driver/Legacy/stm32f7xx_hal_can_legacy.c + STM32F7xx_HAL_Driver/stm32f7xx_hal.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_adc.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_adc_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_can.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_cec.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_cortex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_crc.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_crc_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_cryp.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_cryp_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dac.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dac_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dcmi.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dcmi_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dfsdm.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dma.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dma2d.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dma_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_dsi.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_eth.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_exti.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_flash.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_flash_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_gpio.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_hash.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_hash_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_hcd.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_i2c.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_i2c_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_i2s.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_irda.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_iwdg.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_jpeg.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_lptim.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_ltdc.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_ltdc_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_mdios.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_mmc.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_nand.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_nor.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_pcd.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_pcd_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_pwr.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_pwr_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_qspi.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_rcc.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_rcc_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_rng.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_rtc.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_rtc_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_sai.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_sai_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_sd.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_sdram.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_smartcard.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_smartcard_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_smbus.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_spdifrx.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_spi.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_spi_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_sram.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_tim.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_tim_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_uart.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_uart_ex.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_usart.c + STM32F7xx_HAL_Driver/stm32f7xx_hal_wwdg.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_adc.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_crc.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_dac.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_dma.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_dma2d.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_exti.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_fmc.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_gpio.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_i2c.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_lptim.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_pwr.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_rcc.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_rng.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_rtc.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_sdmmc.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_spi.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_tim.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_usart.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_usb.c + STM32F7xx_HAL_Driver/stm32f7xx_ll_utils.c + system_stm32f7xx.c + +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32F7xx_HAL_Driver + STM32F7xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/CMakeLists.txt new file mode 100644 index 00000000000..c6be51e7f9d --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_F746NG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_F746NG) +elseif("NUCLEO_F746ZG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F746ZG) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f746xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F746xG.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f746xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f746xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/TARGET_DISCO_F746NG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/TARGET_DISCO_F746NG/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/TARGET_DISCO_F746NG/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/TARGET_NUCLEO_F746ZG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/TARGET_NUCLEO_F746ZG/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F746xG/TARGET_NUCLEO_F746ZG/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/CMakeLists.txt new file mode 100644 index 00000000000..2badd7d9f71 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F756ZG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F756ZG) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f756xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F756xG.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f756xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f756xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/TARGET_NUCLEO_F756ZG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/TARGET_NUCLEO_F756ZG/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F756xG/TARGET_NUCLEO_F756ZG/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/CMakeLists.txt new file mode 100644 index 00000000000..27ea95e3e15 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_F767ZI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_F767ZI) +elseif("UHURU_RAVEN" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_UHURU_RAVEN) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f756xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F756xG.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f756xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f756xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/TARGET_NUCLEO_F767ZI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/TARGET_NUCLEO_F767ZI/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/TARGET_NUCLEO_F767ZI/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/TARGET_UHURU_RAVEN/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/TARGET_UHURU_RAVEN/CMakeLists.txt new file mode 100644 index 00000000000..b66b898506f --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F767xI/TARGET_UHURU_RAVEN/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c + uhuru_raven_init.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/CMakeLists.txt new file mode 100644 index 00000000000..23966f1ba7c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_F769NI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_F769NI) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32f769xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32F769xI.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32f769xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32f769xi.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/TARGET_DISCO_F769NI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/TARGET_DISCO_F769NI/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32F7/TARGET_STM32F769xI/TARGET_DISCO_F769NI/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/CMakeLists.txt new file mode 100644 index 00000000000..0ab6ea6239d --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/CMakeLists.txt @@ -0,0 +1,34 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32G030xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G030xx) +elseif("STM32G031xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G031xx) +elseif("STM32G041xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G041xx) +elseif("STM32G070xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G070xx) +elseif("STM32G071xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G071xx) +elseif("STM32G081xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G081xx) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +add_subdirectory(STM32Cube_FW) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..b8cd8ca0d33 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,78 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + + STM32G0xx_HAL_Driver/stm32g0xx_hal.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_adc.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_adc_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_cec.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_comp.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_cortex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_crc.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_crc_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_cryp.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_cryp_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_dac.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_dac_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_dma.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_dma_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_exti.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_flash.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_flash_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_gpio.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_i2c.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_i2c_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_i2s.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_irda.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_iwdg.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_lptim.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_pwr.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_pwr_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_rcc.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_rcc_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_rng.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_rtc.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_rtc_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_smartcard.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_smartcard_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_smbus.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_spi.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_spi_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_tim.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_tim_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_uart.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_uart_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_usart.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_usart_ex.c + STM32G0xx_HAL_Driver/stm32g0xx_hal_wwdg.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_adc.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_comp.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_crc.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_dac.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_dma.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_exti.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_gpio.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_i2c.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_lptim.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_lpuart.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_pwr.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_rcc.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_rng.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_rtc.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_spi.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_tim.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_ucpd.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_usart.c + STM32G0xx_HAL_Driver/stm32g0xx_ll_utils.c + system_stm32g0xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32G0xx_HAL_Driver + STM32G0xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G030xx/CMakefileLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G030xx/CMakefileLists.txt new file mode 100644 index 00000000000..6171fde01bb --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G030xx/CMakefileLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g030xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g030xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g030xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g030xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/CMakeLists.txt new file mode 100644 index 00000000000..7a284a56a8e --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_G031K8" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_G031K8) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g031xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g031xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g031xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g031xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/TARGET_NUCLEO_G031K8/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/TARGET_NUCLEO_G031K8/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031xx/TARGET_NUCLEO_G031K8/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G041xx/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G041xx/CMakeLists.txt new file mode 100644 index 00000000000..3f06cd01444 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G041xx/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g041xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g041xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g041xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g041xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G070xx/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G070xx/CMakeLists.txt new file mode 100644 index 00000000000..1af56589b36 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G070xx/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g070xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g070xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g070xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g070xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G071xx/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G071xx/CMakeLists.txt new file mode 100644 index 00000000000..a7204cd3756 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G071xx/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_G071RB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_G071RB) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g071xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g071xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g071xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g071xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G071xx/TARGET_NUCLEO_G071RB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G071xx/TARGET_NUCLEO_G071RB/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G071xx/TARGET_NUCLEO_G071RB/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G081xx/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G081xx/CMakeLists.txt new file mode 100644 index 00000000000..fb127744a36 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G081xx/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g081xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g081xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g081xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g081xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/CMakeLists.txt new file mode 100644 index 00000000000..a01c06f36a1 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32G431xB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G431xB) +elseif("STM32G441xB" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G441xB) +elseif("STM32G471xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G471xE) +elseif("STM32G473xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G473xE) +elseif("STM32G474xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G474xE) +elseif("STM32G483xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G483xE) +elseif("STM32G484xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32G484xE) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +add_subdirectory(STM32Cube_FW) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..7b8e0e6cbb9 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,98 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + STM32G4xx_HAL_Driver/stm32g4xx_hal.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_adc.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_adc_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_comp.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_cordic.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_cortex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_crc.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_crc_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_cryp.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_cryp_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_dac.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_dac_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_dma.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_dma_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_exti.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_fdcan.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_flash.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_flash_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_flash_ramfunc.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_fmac.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_gpio.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_hrtim.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_i2c.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_i2c_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_i2s.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_irda.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_iwdg.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_lptim.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_nand.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_nor.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_opamp.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_opamp_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_pcd.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_pcd_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_pwr.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_pwr_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_qspi.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_rcc.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_rcc_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_rng.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_rtc.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_rtc_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_sai.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_sai_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_smartcard.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_smartcard_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_smbus.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_spi.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_spi_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_sram.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_tim.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_tim_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_uart.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_uart_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_usart.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_usart_ex.c + STM32G4xx_HAL_Driver/stm32g4xx_hal_wwdg.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_adc.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_comp.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_cordic.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_crc.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_crs.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_dac.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_dma.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_exti.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_fmac.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_fmc.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_gpio.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_hrtim.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_i2c.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_lptim.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_lpuart.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_opamp.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_pwr.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_rcc.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_rng.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_rtc.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_spi.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_tim.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_ucpd.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_usart.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_usb.c + STM32G4xx_HAL_Driver/stm32g4xx_ll_utils.c + system_stm32g4xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32G4xx_HAL_Driver + STM32G4xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/CMakeLists.txt new file mode 100644 index 00000000000..28ef3ef7df9 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G431xB/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g431xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g431xb.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g431xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g431xb.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G441xB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G441xB/CMakeLists.txt new file mode 100644 index 00000000000..b1dca1b8c79 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G441xB/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g441xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g441xb.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g441xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g441xb.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G471xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G471xE/CMakeLists.txt new file mode 100644 index 00000000000..3b9181211dd --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G471xE/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g471xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g471xe.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g471xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g471xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G473xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G473xE/CMakeLists.txt new file mode 100644 index 00000000000..4b5ae699b2c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G473xE/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g473xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g473xe.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g473xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g473xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G474xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G474xE/CMakeLists.txt new file mode 100644 index 00000000000..cde7b2c552f --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G474xE/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_G474RE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_G474RE) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g474xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g474xe.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g474xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g474xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G474xE/TARGET_NUCLEO_G474RE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G474xE/TARGET_NUCLEO_G474RE/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G474xE/TARGET_NUCLEO_G474RE/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G483xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G483xE/CMakeLists.txt new file mode 100644 index 00000000000..c7688040e04 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G483xE/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g483xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g483xe.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g483xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g483xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G484xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G484xE/CMakeLists.txt new file mode 100644 index 00000000000..381eb62b3f4 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32G4/TARGET_STM32G484xE/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32g484xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32g484xe.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32g484xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32g484xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/CMakeLists.txt new file mode 100644 index 00000000000..6a086ef26e3 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/CMakeLists.txt @@ -0,0 +1,30 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32H743xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H743xI) +elseif("STM32H745xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H745xI) +elseif("STM32H747xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H747xI) +elseif("STM32H7A3xIQ" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H7A3xIQ) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +add_subdirectory(STM32Cube_FW) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..a9673cbae3b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,135 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + STM32H7xx_HAL_Driver/stm32h7xx_hal.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_adc.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_adc_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_cec.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_comp.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_cordic.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_cortex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_crc.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_crc_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_cryp.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_cryp_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dac.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dac_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dcmi.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dfsdm.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dfsdm_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dma.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dma2d.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dma_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dsi.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_dts.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_eth.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_eth_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_exti.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_fdcan.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_flash.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_flash_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_fmac.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_gfxmmu.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_gpio.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_hash.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_hash_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_hcd.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_hrtim.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_hsem.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_i2c.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_i2c_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_i2s.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_i2s_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_irda.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_iwdg.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_jpeg.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_lptim.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_ltdc.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_ltdc_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_mdios.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_mdma.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_mmc.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_mmc_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_nand.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_nor.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_opamp.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_opamp_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_ospi.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_otfdec.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_pcd.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_pcd_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_pssi.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_pwr.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_pwr_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_qspi.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_ramecc.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_rcc.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_rcc_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_rng.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_rng_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_rtc.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_rtc_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_sai.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_sai_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_sd.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_sdram.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_sd_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_smartcard.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_smartcard_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_smbus.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_spdifrx.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_spi.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_spi_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_sram.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_swpmi.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_tim.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_tim_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_uart.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_uart_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_usart.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_usart_ex.c + STM32H7xx_HAL_Driver/stm32h7xx_hal_wwdg.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_adc.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_bdma.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_comp.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_cordic.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_crc.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_crs.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_dac.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_delayblock.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_dma.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_dma2d.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_exti.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_fmac.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_fmc.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_gpio.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_hrtim.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_i2c.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_lptim.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_lpuart.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_mdma.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_opamp.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_pwr.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_rcc.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_rng.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_rtc.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_sdmmc.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_spi.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_swpmi.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_tim.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_usart.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_usb.c + STM32H7xx_HAL_Driver/stm32h7xx_ll_utils.c + system_stm32h7xx_dualcore_boot_cm4_cm7.c + system_stm32h7xx_singlecore.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32H7xx_HAL_Driver + STM32H7xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/CMakeLists.txt new file mode 100644 index 00000000000..a970f6db2b6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_H743ZI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_H743ZI) +elseif("NUCLEO_H743ZI2" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_H743ZI2) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32h743xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32H743xI.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32h743xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32h743xI.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/TARGET_NUCLEO_H743ZI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/TARGET_NUCLEO_H743ZI/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/TARGET_NUCLEO_H743ZI/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/TARGET_NUCLEO_H743ZI2/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/TARGET_NUCLEO_H743ZI2/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H743xI/TARGET_NUCLEO_H743ZI2/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/CMakeLists.txt new file mode 100644 index 00000000000..61585b6f0cb --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32H745xI_CM4" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H745xI_CM4) +elseif("STM32H745xI_CM7" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H745xI_CM7) +endif() + +target_sources(mbed-core + INTERFACE + system_clock.c +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM4/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM4/CMakeLists.txt new file mode 100644 index 00000000000..509b5841c0b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM4/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32h745xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32H745xI_CM4.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32h745xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32h745xI_CM4.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM7/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM7/CMakeLists.txt new file mode 100644 index 00000000000..2cb3c783b68 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/TARGET_STM32H745xI_CM7/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32h745xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32H745xI_CM7.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32h745xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32h745xI_CM7.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/CMakeLists.txt new file mode 100644 index 00000000000..52495298cac --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_H747I" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_H747I) +elseif("STM32H747xI_CM4" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H747xI_CM4) +elseif("STM32H7A3xIQ" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32H7A3xIQ) +endif() + +target_sources(mbed-core + INTERFACE + system_clock.c +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_DISCO_H747I/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM4/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM4/CMakeLists.txt new file mode 100644 index 00000000000..cf9506cd9fe --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM4/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32h747xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32H747xI_CM4.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32h747xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32h747xI_CM4.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM7/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM7/CMakeLists.txt new file mode 100644 index 00000000000..937198c2304 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H747xI/TARGET_STM32H747xI_CM7/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32h747xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/STM32H747xI_CM7.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32h747xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32h747xI_CM7.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H7A3xIQ/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H7A3xIQ/CMakeLists.txt new file mode 100644 index 00000000000..f078f49c945 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H7A3xIQ/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_H7A3ZI_Q" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_H7A3ZI_Q) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32h7a3xxq.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32h7a3xxq.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32h7a3xxq.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32h7a3xxq.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H7A3xIQ/TARGET_NUCLEO_H7A3ZI_Q/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H7A3xIQ/TARGET_NUCLEO_H7A3ZI_Q/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H7A3xIQ/TARGET_NUCLEO_H7A3ZI_Q/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/CMakeLists.txt new file mode 100644 index 00000000000..e612aa55020 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/CMakeLists.txt @@ -0,0 +1,32 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32L053x8" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L053x8) +elseif("STM32L071xZ" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L071xZ) +elseif("STM32L072xZ" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L072xZ) +elseif("STM32L073xZ" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L073xZ) +elseif("STM32L082xZ" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L082xZ) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +add_subdirectory(STM32Cube_FW) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..d0033540ca4 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,80 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + STM32L0xx_HAL_Driver/stm32l0xx_hal.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_adc.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_adc_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_comp.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_comp_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_cortex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_crc.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_crc_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_cryp.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_cryp_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_dac.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_dac_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_dma.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_firewall.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_flash.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_flash_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_flash_ramfunc.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_gpio.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_i2c.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_i2c_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_i2s.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_irda.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_iwdg.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_lcd.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_lptim.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_pcd.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_pcd_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_pwr.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_pwr_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_rcc.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_rcc_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_rng.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_rtc.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_rtc_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_smartcard.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_smartcard_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_smbus.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_spi.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_tim.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_tim_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_tsc.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_uart.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_uart_ex.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_usart.c + STM32L0xx_HAL_Driver/stm32l0xx_hal_wwdg.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_adc.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_comp.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_crc.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_crs.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_dac.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_dma.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_exti.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_gpio.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_i2c.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_lptim.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_lpuart.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_pwr.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_rcc.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_rng.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_rtc.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_spi.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_tim.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_usart.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_usb.c + STM32L0xx_HAL_Driver/stm32l0xx_ll_utils.c + system_stm32l0xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32L0xx_HAL_Driver + STM32L0xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/CMakeLists.txt new file mode 100644 index 00000000000..285d347f42a --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L053x8/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l053xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l053x8.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l053xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l053x8.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L071xZ/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L071xZ/CMakeLists.txt new file mode 100644 index 00000000000..94492f45feb --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L071xZ/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l071xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l071xz.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l071xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l071xz.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/CMakeLists.txt new file mode 100644 index 00000000000..80e411d0458 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_L072CZ_LRWAN1" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_L072CZ_LRWAN1) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l072xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l072xz.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l072xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l072xz.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/TARGET_DISCO_L072CZ_LRWAN1/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/TARGET_DISCO_L072CZ_LRWAN1/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L072xZ/TARGET_DISCO_L072CZ_LRWAN1/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L073xZ/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L073xZ/CMakeLists.txt new file mode 100644 index 00000000000..deaf552828b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L073xZ/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_L073RZ" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L073RZ) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l073xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l073xz.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l073xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l073xz.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L073xZ/TARGET_NUCLEO_L073RZ/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L073xZ/TARGET_NUCLEO_L073RZ/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L073xZ/TARGET_NUCLEO_L073RZ/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L082xZ/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L082xZ/CMakeLists.txt new file mode 100644 index 00000000000..39e6ce75eef --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L0/TARGET_STM32L082xZ/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l082xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l082xz.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l082xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l082xz.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L1/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L1/CMakeLists.txt new file mode 100644 index 00000000000..4d74f157e89 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L1/CMakeLists.txt @@ -0,0 +1,88 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("MOTE_L152RC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_MOTE_L152RC) +elseif("NUCLEO_L152RE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L152RE) +elseif("XDOT_L151CC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_XDOT_L151CC) +endif() + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c + + device/stm32l1xx_hal.c + device/stm32l1xx_hal_adc.c + device/stm32l1xx_hal_adc_ex.c + device/stm32l1xx_hal_comp.c + device/stm32l1xx_hal_cortex.c + device/stm32l1xx_hal_crc.c + device/stm32l1xx_hal_cryp.c + device/stm32l1xx_hal_cryp_ex.c + device/stm32l1xx_hal_dac.c + device/stm32l1xx_hal_dac_ex.c + device/stm32l1xx_hal_dma.c + device/stm32l1xx_hal_flash.c + device/stm32l1xx_hal_flash_ex.c + device/stm32l1xx_hal_flash_ramfunc.c + device/stm32l1xx_hal_gpio.c + device/stm32l1xx_hal_i2c.c + device/stm32l1xx_hal_i2s.c + device/stm32l1xx_hal_irda.c + device/stm32l1xx_hal_iwdg.c + device/stm32l1xx_hal_lcd.c + device/stm32l1xx_hal_nor.c + device/stm32l1xx_hal_opamp.c + device/stm32l1xx_hal_opamp_ex.c + device/stm32l1xx_hal_pcd.c + device/stm32l1xx_hal_pcd_ex.c + device/stm32l1xx_hal_pwr.c + device/stm32l1xx_hal_pwr_ex.c + device/stm32l1xx_hal_rcc.c + device/stm32l1xx_hal_rcc_ex.c + device/stm32l1xx_hal_rtc.c + device/stm32l1xx_hal_rtc_ex.c + device/stm32l1xx_hal_sd.c + device/stm32l1xx_hal_smartcard.c + device/stm32l1xx_hal_spi.c + device/stm32l1xx_hal_spi_ex.c + device/stm32l1xx_hal_sram.c + device/stm32l1xx_hal_tim.c + device/stm32l1xx_hal_tim_ex.c + device/stm32l1xx_hal_uart.c + device/stm32l1xx_hal_usart.c + device/stm32l1xx_hal_wwdg.c + device/stm32l1xx_ll_adc.c + device/stm32l1xx_ll_comp.c + device/stm32l1xx_ll_crc.c + device/stm32l1xx_ll_dac.c + device/stm32l1xx_ll_dma.c + device/stm32l1xx_ll_exti.c + device/stm32l1xx_ll_fsmc.c + device/stm32l1xx_ll_gpio.c + device/stm32l1xx_ll_i2c.c + device/stm32l1xx_ll_opamp.c + device/stm32l1xx_ll_pwr.c + device/stm32l1xx_ll_rcc.c + device/stm32l1xx_ll_rtc.c + device/stm32l1xx_ll_sdmmc.c + device/stm32l1xx_ll_spi.c + device/stm32l1xx_ll_tim.c + device/stm32l1xx_ll_usart.c + device/stm32l1xx_ll_utils.c + device/system_stm32l1xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/CMakeLists.txt new file mode 100644 index 00000000000..39c303fecbe --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L1/TARGET_MOTE_L152RC/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_stm32l152xe.S) + set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/stm32l152re.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE device/TOOLCHAIN_ARM/startup_stm32l152xe.S) + set(LINKER_FILE device/TOOLCHAIN_ARM/stm32l152re.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + device/system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/CMakeLists.txt new file mode 100644 index 00000000000..39c303fecbe --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/CMakeLists.txt @@ -0,0 +1,25 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_stm32l152xe.S) + set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/stm32l152re.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE device/TOOLCHAIN_ARM/startup_stm32l152xe.S) + set(LINKER_FILE device/TOOLCHAIN_ARM/stm32l152re.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + device/system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32L1/TARGET_XDOT_L151CC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L1/TARGET_XDOT_L151CC/CMakeLists.txt new file mode 100644 index 00000000000..ff75ba2e3e4 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L1/TARGET_XDOT_L151CC/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE device/TOOLCHAIN_GCC_ARM/startup_stm32l151xc.S) + set(LINKER_FILE device/TOOLCHAIN_GCC_ARM/STM32L151XC.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE device/TOOLCHAIN_ARM/startup_stm32l151xc.S) + set(LINKER_FILE device/TOOLCHAIN_ARM/stm32l151rc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + device/system_clock.c + xdot_eeprom.c + xdot_low_power.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . + device +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/CMakeLists.txt index f51d3c41e31..aaf2f6e67ec 100644 --- a/targets/TARGET_STM/TARGET_STM32L4/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32L4/CMakeLists.txt @@ -1,8 +1,30 @@ # Copyright (c) 2020 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -if("STM32L475xG" IN_LIST MBED_TARGET_LABELS) +if("STM32L432xC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L432xC) +elseif("STM32L433xC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L433xC) +elseif("STM32L443xC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L443xC) +elseif("STM32L452xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L452xE) +elseif("STM32L471xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L471xG) +elseif("STM32L475xG" IN_LIST MBED_TARGET_LABELS) add_subdirectory(TARGET_STM32L475xG) +elseif("STM32L476xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L476xG) +elseif("STM32L486xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L486xG) +elseif("STM32L496xG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L496xG) +elseif("STM32L4R5xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L4R5xI) +elseif("STM32L4R9xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L4R9xI) +elseif("STM32L4S5xI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L4S5xI) endif() add_subdirectory(STM32Cube_FW) diff --git a/targets/TARGET_STM/TARGET_STM32L4/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/STM32Cube_FW/CMakeLists.txt index 1f06b554a5f..fa5a2d42a66 100644 --- a/targets/TARGET_STM/TARGET_STM32L4/STM32Cube_FW/CMakeLists.txt +++ b/targets/TARGET_STM/TARGET_STM32L4/STM32Cube_FW/CMakeLists.txt @@ -11,5 +11,5 @@ target_sources(mbed-core target_include_directories(mbed-core INTERFACE . - CMSIS + CMSIS ) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/CMakeLists.txt new file mode 100644 index 00000000000..f4db8b6cb2f --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_L432KC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L432KC) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l432xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l432xc.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l432xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l432xc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/CMakeLists.txt new file mode 100644 index 00000000000..aacc6d489a6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L433xC/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_L433RC_P" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L433RC_P) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l433xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l433xc.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l433xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l433xc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L443xC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L443xC/CMakeLists.txt new file mode 100644 index 00000000000..0d52272dda8 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L443xC/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("ADV_WISE_1510" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_ADV_WISE_1510) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l443xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l443xc.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l443xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l443xc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L443xC/TARGET_ADV_WISE_1510/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L443xC/TARGET_ADV_WISE_1510/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L443xC/TARGET_ADV_WISE_1510/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/CMakeLists.txt new file mode 100644 index 00000000000..ad2bd275a4b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_L452RE_P" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L452RE_P) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l452xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l452xe.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l452xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l452xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/TARGET_NUCLEO_L452RE_P/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/TARGET_NUCLEO_L452RE_P/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L452xE/TARGET_NUCLEO_L452RE_P/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L471xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L471xG/CMakeLists.txt new file mode 100644 index 00000000000..a49f03f24d8 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L471xG/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("MTS_DRAGONFLY_L471QG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_MTS_DRAGONFLY_L471QG) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l471xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l471xg.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l471xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l471xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L471xG/TARGET_MTS_DRAGONFLY_L471QG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L471xG/TARGET_MTS_DRAGONFLY_L471QG/CMakeLists.txt new file mode 100644 index 00000000000..be09afa2e33 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L471xG/TARGET_MTS_DRAGONFLY_L471QG/CMakeLists.txt @@ -0,0 +1,15 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + mtqn_low_power.c + ONBOARD_SARA4_PPP.cpp + ublox_low_level_api.c + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/CMakeLists.txt new file mode 100644 index 00000000000..becaebdb014 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_L476VG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_MTS_DRAGONFLY_L471QG) +elseif("NUCLEO_L476RG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L476RG) +elseif("RHOMBIO_L476DMW1K" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_RHOMBIO_L476DMW1K) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l476xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l476xg.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l476xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l476xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_DISCO_L476VG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_DISCO_L476VG/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_DISCO_L476VG/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_NUCLEO_L476RG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_NUCLEO_L476RG/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_NUCLEO_L476RG/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_RHOMBIO_L476DMW1K/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_RHOMBIO_L476DMW1K/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L476xG/TARGET_RHOMBIO_L476DMW1K/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/CMakeLists.txt new file mode 100644 index 00000000000..c8c1d0693bb --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("ADV_WISE_1570" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_ADV_WISE_1570) +elseif("NUCLEO_L486RG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L486RG) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l486xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l486xg.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l486xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l486xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/TARGET_ADV_WISE_1570/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/TARGET_ADV_WISE_1570/CMakeLists.txt new file mode 100644 index 00000000000..9be08aca4a6 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/TARGET_ADV_WISE_1570/CMakeLists.txt @@ -0,0 +1,14 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + ONBOARD_QUECTEL_BC95.cpp + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/TARGET_NUCLEO_L486RG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/TARGET_NUCLEO_L486RG/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L486xG/TARGET_NUCLEO_L486RG/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/CMakeLists.txt new file mode 100644 index 00000000000..bbb815e497b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/CMakeLists.txt @@ -0,0 +1,29 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_L496AG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_L496AG) +elseif("NUCLEO_L496ZG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L496ZG) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l496xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l496xg.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l496xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l496xg.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_DISCO_L496AG/CMakeListst.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_DISCO_L496AG/CMakeListst.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_DISCO_L496AG/CMakeListst.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_NUCLEO_L496ZG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_NUCLEO_L496ZG/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L496xG/TARGET_NUCLEO_L496ZG/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R5xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R5xI/CMakeLists.txt new file mode 100644 index 00000000000..489a390d95b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R5xI/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_L4R5ZI" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L4R5ZI) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l4r5xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l4r5xi.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l4r5xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l4r5xi.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R5xI/TARGET_NUCLEO_L4R5ZI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R5xI/TARGET_NUCLEO_L4R5ZI/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R5xI/TARGET_NUCLEO_L4R5ZI/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R9xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R9xI/CMakeLists.txt new file mode 100644 index 00000000000..c943f83c15c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R9xI/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_L4R9I" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_L4R9I) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l4r9xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l4r9xi.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l4r9xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l4r9xi.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R9xI/TARGET_DISCO_L4R9I/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R9xI/TARGET_DISCO_L4R9I/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4R9xI/TARGET_DISCO_L4R9I/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4S5xI/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4S5xI/CMakeLists.txt new file mode 100644 index 00000000000..5dab6f9d755 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4S5xI/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("B_L4S5I_IOT01A" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_B_L4S5I_IOT01A) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l4s5xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l4s5xi.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l4s5xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l4s5xi.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + system_clock.c + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4S5xI/TARGET_B_L4S5I_IOT01A/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4S5xI/TARGET_B_L4S5I_IOT01A/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L4S5xI/TARGET_B_L4S5I_IOT01A/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L5/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L5/CMakeLists.txt new file mode 100644 index 00000000000..be41ea8cdc5 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L5/CMakeLists.txt @@ -0,0 +1,28 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32L552xC" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L552xC) +elseif("STM32L552xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L552xE) +elseif("STM32L562xE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32L562xE) +endif() + +add_subdirectory(STM32Cube_FW) + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L5/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L5/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..1bea24e4007 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L5/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,107 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + STM32L5xx_HAL_Driver/stm32l5xx_hal.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_adc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_adc_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_comp.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_cortex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_crc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_crc_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_cryp.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_cryp_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_dac.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_dac_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_dfsdm.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_dfsdm_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_dma.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_dma_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_exti.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_fdcan.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_flash.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_flash_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_flash_ramfunc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_gpio.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_gtzc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_hash.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_hash_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_i2c.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_i2c_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_icache.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_irda.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_iwdg.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_lptim.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_mmc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_mmc_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_nand.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_nor.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_opamp.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_opamp_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_ospi.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_otfdec.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_pcd.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_pcd_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_pka.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_pwr.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_pwr_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_rcc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_rcc_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_rng.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_rng_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_rtc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_rtc_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_sai.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_sai_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_sd.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_sd_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_smartcard.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_smartcard_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_smbus.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_spi.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_spi_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_sram.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_tim.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_tim_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_tsc.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_uart.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_uart_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_usart.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_usart_ex.c + STM32L5xx_HAL_Driver/stm32l5xx_hal_wwdg.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_adc.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_comp.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_crc.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_crs.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_dac.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_dma.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_exti.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_fmc.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_gpio.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_i2c.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_lptim.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_lpuart.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_opamp.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_pka.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_pwr.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_rcc.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_rng.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_rtc.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_sdmmc.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_spi.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_tim.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_ucpd.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_usart.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_usb.c + STM32L5xx_HAL_Driver/stm32l5xx_ll_utils.c + system_stm32l5xx.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32L5xx_HAL_Driver + STM32L5xx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xC/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xC/CMakeLists.txt new file mode 100644 index 00000000000..e775157385c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xC/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l552xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l552xc.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l552xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l552xc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xE/CMakeLists.txt new file mode 100644 index 00000000000..5da6f7576df --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xE/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_L552ZE_Q" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_L552ZE_Q) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l552xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l552xc.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l552xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l552xc.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xE/TARGET_NUCLEO_L552ZE_Q/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xE/TARGET_NUCLEO_L552ZE_Q/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L552xE/TARGET_NUCLEO_L552ZE_Q/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L562xE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L562xE/CMakeLists.txt new file mode 100644 index 00000000000..d64ffa88754 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L562xE/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("DISCO_L562QE" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_DISCO_L562QE) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32l562xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32l562xe.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32l562xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32l562xe.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L562xE/TARGET_DISCO_L562QE/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L562xE/TARGET_DISCO_L562QE/CMakeLists.txt new file mode 100644 index 00000000000..118fbc11897 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32L5/TARGET_STM32L562xE/TARGET_DISCO_L562QE/CMakeLists.txt @@ -0,0 +1,12 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32WB/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32WB/CMakeLists.txt new file mode 100644 index 00000000000..7f38e9d3e4e --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32WB/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("STM32WB50xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32WB50xx) +elseif("STM32WB55xx" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_STM32WB55xx) +endif() + +add_subdirectory(STM32Cube_FW) + +target_sources(mbed-core + INTERFACE + analogin_device.c + analogout_device.c + flash_api.c + gpio_irq_device.c + pwmout_device.c + serial_device.c + spi_api.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32WB/STM32Cube_FW/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32WB/STM32Cube_FW/CMakeLists.txt new file mode 100644 index 00000000000..07e0494a61c --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32WB/STM32Cube_FW/CMakeLists.txt @@ -0,0 +1,86 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + otp.c + STM32WBxx_HAL_Driver/stm32wbxx_hal.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_adc.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_adc_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_comp.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_cortex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_crc.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_crc_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_cryp.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_cryp_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_dma.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_dma_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_exti.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_flash.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_flash_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_gpio.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_hsem.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_i2c.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_i2c_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_ipcc.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_irda.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_iwdg.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_lcd.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_lptim.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_pcd.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_pcd_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_pka.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_pwr.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_pwr_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_qspi.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_rcc.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_rcc_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_rng.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_rtc.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_rtc_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_sai.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_sai_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_smartcard.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_smartcard_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_smbus.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_spi.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_spi_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_tim.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_tim_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_tsc.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_uart.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_uart_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_usart.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_usart_ex.c + STM32WBxx_HAL_Driver/stm32wbxx_hal_wwdg.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_adc.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_comp.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_crc.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_crs.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_dma.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_exti.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_gpio.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_i2c.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_lptim.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_lpuart.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_pka.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_pwr.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_rcc.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_rng.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_rtc.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_spi.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_tim.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_usart.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_usb.c + STM32WBxx_HAL_Driver/stm32wbxx_ll_utils.c + stm32_lpm_if.c + system_stm32wbxx.c +) + +target_include_directories(mbed-core + INTERFACE + . + CMSIS + STM32WBxx_HAL_Driver + STM32WBxx_HAL_Driver/Legacy +) diff --git a/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB50xx/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB50xx/CMakeLists.txt new file mode 100644 index 00000000000..b5caaa1f1b0 --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB50xx/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32wb50xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32wb50xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32wb50xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32wb50xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/CMakeLists.txt new file mode 100644 index 00000000000..19a58016d9b --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +if("NUCLEO_WB55RG" IN_LIST MBED_TARGET_LABELS) + add_subdirectory(TARGET_NUCLEO_WB55RG) +endif() + +if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM") + set(STARTUP_FILE TOOLCHAIN_GCC_ARM/startup_stm32wb55xx.S) + set(LINKER_FILE TOOLCHAIN_GCC_ARM/stm32wb55xx.ld) +elseif(${MBED_TOOLCHAIN} STREQUAL "ARM") + set(STARTUP_FILE TOOLCHAIN_ARM/startup_stm32wb55xx.S) + set(LINKER_FILE TOOLCHAIN_ARM/stm32wb55xx.sct) +endif() + +set_property(GLOBAL PROPERTY MBED_TARGET_LINKER_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${LINKER_FILE}) + +target_sources(mbed-core + INTERFACE + ${STARTUP_FILE} +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/TARGET_NUCLEO_WB55RG/CMakeLists.txt b/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/TARGET_NUCLEO_WB55RG/CMakeLists.txt new file mode 100644 index 00000000000..3a805bbdaaf --- /dev/null +++ b/targets/TARGET_STM/TARGET_STM32WB/TARGET_STM32WB55xx/TARGET_NUCLEO_WB55RG/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2020 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +target_sources(mbed-core + INTERFACE + PeripheralPins.c + system_clock.c +) + +target_include_directories(mbed-core + INTERFACE + . +) diff --git a/tools/cmake/README.md b/tools/cmake/README.md index 9b02e14721a..8ce404f7a82 100644 --- a/tools/cmake/README.md +++ b/tools/cmake/README.md @@ -19,12 +19,10 @@ The full profile with the selected printf and C libraries. Only a limited set of targets is supported at the moment. The following targets are supported: -- DISCO_L475VG_IOT01A +- all STM32 targets - K64F - K66F - NRF52840_DK -- NUCLEO_F303K8 -- NUCLEO_F401RE - WIO_3G ### Supported toolchains