rt-thread/bsp/stm32/libraries/STM32WLxx_HAL/SConscript

79 lines
2.9 KiB
Python
Raw Normal View History

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/STM32WLxx/Source/Templates/system_stm32wlxx.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_comp.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_cortex.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_crc.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_crc_ex.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_cryp.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_cryp_ex.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_dma.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_dma_ex.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_exti.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_pwr.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_pwr_ex.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_rcc.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_rcc_ex.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_rng.c
STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_gpio.c
''')
if GetDepend(['RT_USING_SERIAL']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_uart_ex.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_usart.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_usart_ex.c']
if GetDepend(['RT_USING_I2C']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_i2c_ex.c']
if GetDepend(['RT_USING_SPI']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_spi.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_spi_ex.c']
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_lptim.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_tim.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_tim_ex.c']
if GetDepend(['RT_USING_ADC']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_adc.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_adc_ex.c']
if GetDepend(['BSP_USING_ONCHIP_RTC']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_rtc.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_rtc_ex.c']
if GetDepend(['RT_USING_WDT']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_iwdg.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_wwdg.c']
if GetDepend(['RT_USING_PM']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_lptim.c']
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_flash.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_flash_ex.c']
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_flash_ramfunc.c']
if GetDepend(['BSP_USING_SUBGHZ']):
src += ['STM32WLxx_HAL_Driver/Src/stm32wlxx_hal_subghz.c']
path = [cwd + '/STM32WLxx_HAL_Driver/Inc',
cwd + '/CMSIS/Device/ST/STM32WLxx/Include',
cwd + '/CMSIS/Include']
CPPDEFINES = ['USE_HAL_DRIVER']
group = DefineGroup('STM32_HAL', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')