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

65 lines
2.4 KiB
Python
Raw Normal View History

2019-01-19 09:23:40 +08:00
import rtconfig
Import('RTT_ROOT')
from building import *
# get current directory
cwd = GetCurrentDir()
src = Split("""
2019-10-29 16:27:02 +08:00
CMSIS/Device/ST/STM32G0xx/Source/Templates/system_stm32g0xx.c
2019-01-19 09:23:40 +08:00
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_cec.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_rcc.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_rcc_ex.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_flash.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_flash_ex.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_dma.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_dma_ex.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_pwr.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_pwr_ex.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_cortex.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal.c
STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_gpio.c
2019-01-19 09:23:40 +08:00
""")
if GetDepend(['RT_USING_SERIAL']):
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_uart.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_uart_ex.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_usart_ex.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_ll_usart.c']
if GetDepend(['RT_USING_I2C']):
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_i2c.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_ll_i2c.c']
if GetDepend(['RT_USING_SPI']):
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_spi.c']
2020-07-01 20:29:43 +08:00
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_spi_ex.c']
2019-01-19 09:23:40 +08:00
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_ll_spi.c']
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_tim.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_tim_ex.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_ll_tim.c']
if GetDepend(['RT_USING_ADC']):
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_adc.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_adc_ex.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_ll_adc.c']
2019-02-15 10:43:09 +08:00
if GetDepend(['RT_USING_WDT']):
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_iwdg.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_wwdg.c']
2019-01-19 09:23:40 +08:00
2020-07-01 20:29:43 +08:00
if GetDepend(['RT_USING_RTC']):
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_rtc.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_rtc_ex.c']
src += ['STM32G0xx_HAL_Driver/Src/stm32g0xx_ll_rtc.c']
path = [cwd + '/STM32G0xx_HAL_Driver/Inc',
cwd + '/CMSIS/Device/ST/STM32G0xx/Include']
2019-01-19 09:23:40 +08:00
CPPDEFINES = ['USE_HAL_DRIVER']
2020-11-20 13:38:11 +08:00
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
2019-01-19 09:23:40 +08:00
Return('group')