rt-thread/bsp/gd32/arm/libraries/GD32F4xx_Firmware_Library/SConscript

65 lines
2.1 KiB
Python
Raw Normal View History

2021-09-02 22:38:47 +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/GD/GD32F4xx/Source/system_gd32f4xx.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_gpio.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_rcu.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_exti.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_misc.c
GD32F4xx_standard_peripheral/Source/gd32f4xx_syscfg.c
''')
2023-01-09 10:14:23 +08:00
2021-09-02 22:38:47 +08:00
if GetDepend(['RT_USING_SERIAL']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_usart.c']
2023-01-09 10:14:23 +08:00
2021-09-02 22:38:47 +08:00
if GetDepend(['RT_USING_I2C']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_i2c.c']
if GetDepend(['RT_USING_SPI']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_spi.c']
if GetDepend(['RT_USING_CAN']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_can.c']
if GetDepend(['BSP_USING_ETH']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_enet.c']
if GetDepend(['RT_USING_ADC']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_adc.c']
if GetDepend(['RT_USING_DAC']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_dac.c']
if GetDepend(['RT_USING_RTC']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_rtc.c']
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_pmu.c']
2021-09-02 22:38:47 +08:00
if GetDepend(['RT_USING_WDT']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_wwdgt.c']
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_fwdgt.c']
if GetDepend(['RT_USING_SDIO']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_sdio.c']
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_dma.c']
2021-09-02 22:38:47 +08:00
if GetDepend(['BSP_USING_SDRAM']):
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_fmc.c']
src += ['GD32F4xx_standard_peripheral/Source/gd32f4xx_exmc.c']
2021-09-02 22:38:47 +08:00
path = [
cwd + '/CMSIS/GD/GD32F4xx/Include',
cwd + '/CMSIS',
cwd + '/GD32F4xx_standard_peripheral/Include',]
CPPDEFINES = ['USE_STDPERIPH_DRIVER']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')