mirror of https://github.com/ARMmbed/mbed-os.git
CMake: add STM32L0 targets
parent
80161f59ca
commit
959c194b02
|
@ -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
|
||||
.
|
||||
)
|
|
@ -0,0 +1,79 @@
|
|||
# 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
|
||||
.
|
||||
STM32L0xx_HAL_Driver
|
||||
STM32L0xx_HAL_Driver/Legacy
|
||||
)
|
|
@ -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
|
||||
.
|
||||
)
|
|
@ -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
|
||||
.
|
||||
)
|
|
@ -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
|
||||
.
|
||||
)
|
|
@ -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
|
||||
.
|
||||
)
|
|
@ -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
|
||||
.
|
||||
)
|
|
@ -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
|
||||
.
|
||||
)
|
|
@ -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
|
||||
.
|
||||
)
|
Loading…
Reference in New Issue