rt-thread-official/bsp/stm32/libraries/STM32L5xx_HAL/SConscript

123 lines
4.6 KiB
Python
Raw Normal View History

2021-11-01 14:56:23 +08:00
import rtconfig
from building import *
# get current directory
cwd = GetCurrentDir()
# The set of source files associated with this SConscript file.
src = Split('''
CMSIS/Device/ST/STM32L5xx/Source/Templates/system_stm32l5xx.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_comp.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_cortex.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_crc.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_crc_ex.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_cryp.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_cryp_ex.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_dma.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_dma_ex.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_exti.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_pwr.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_pwr_ex.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_rcc.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_rcc_ex.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_rng.c
STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_gpio.c
2021-11-01 14:56:23 +08:00
''')
if GetDepend(['RT_USING_SERIAL']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_uart.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_uart_ex.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_usart.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_usart_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_I2C']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_i2c.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_i2c_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_SPI']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_spi.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_spi_ex.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_qspi.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_USB']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_hcd.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_pcd.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_pcd_ex.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_ll_usb.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_CAN']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_can.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_lptim.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_tim.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_tim_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_ADC']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_adc.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_adc_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_DAC']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_dac.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_dac_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_RTC']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_rtc.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_rtc_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_WDT']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_iwdg.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_wwdg.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_SDIO']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_sd.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_sd_ex.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_ll_sdmmc.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_AUDIO']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_sai.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_sai_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_MTD_NOR']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_nor.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_MTD_NAND']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_nand.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['RT_USING_PM']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_lptim.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_flash.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_flash_ex.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_flash_ramfunc.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['BSP_USING_FMC']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_ll_fmc.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['BSP_USING_GFXMMU']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_gfxmmu.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['BSP_USING_DSI']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_dsi.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_dma2d.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_ll_dma2d.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_ltdc.c']
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_ltdc_ex.c']
2021-11-01 14:56:23 +08:00
if GetDepend(['BSP_USING_SRAM']):
2021-11-08 09:07:03 +08:00
src += ['STM32L5xx_HAL_Driver/Src/stm32l5xx_hal_sram.c']
2021-11-01 14:56:23 +08:00
path = [cwd + '/STM32L5xx_HAL_Driver/Inc',
cwd + '/CMSIS/Device/ST/STM32L5xx/Include',
cwd + '/CMSIS/Include']
CPPDEFINES = ['USE_HAL_DRIVER']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')