mirror of https://github.com/ARMmbed/mbed-os.git
CMake: add STM32L1 targets
parent
959c194b02
commit
93e35a07ab
|
@ -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
|
||||||
|
)
|
|
@ -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
|
||||||
|
)
|
|
@ -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
|
||||||
|
)
|
|
@ -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
|
||||||
|
)
|
Loading…
Reference in New Issue