import rtconfig from building import * # get current directory cwd = GetCurrentDir() # The set of source files associated with this SConscript file. src = Split(''' GD32E51x_standard_peripheral/Source/gd32e51x_gpio.c GD32E51x_standard_peripheral/Source/gd32e51x_rcu.c GD32E51x_standard_peripheral/Source/gd32e51x_exti.c GD32E51x_standard_peripheral/Source/gd32e51x_misc.c GD32E51x_standard_peripheral/Source/gd32e51x_dbg.c ''') if GetDepend(['RT_USING_SERIAL']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_usart.c'] if GetDepend(['RT_USING_I2C']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_i2c.c'] if GetDepend(['RT_USING_SPI']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_spi.c'] if GetDepend(['RT_USING_CAN']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_can.c'] if GetDepend(['BSP_USING_ETH']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_enet.c'] if GetDepend(['RT_USING_ADC']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_adc.c'] if GetDepend(['RT_USING_DAC']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_dac.c'] if GetDepend(['RT_USING_RTC']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_rtc.c'] src += ['GD32E51x_standard_peripheral/Source/gd32e51x_pmu.c'] if GetDepend(['RT_USING_WDT']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_wwdgt.c'] src += ['GD32E51x_standard_peripheral/Source/gd32e51x_fwdgt.c'] if GetDepend(['RT_USING_SDIO']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_sdio.c'] src += ['GD32E51x_standard_peripheral/Source/gd32e51x_dma.c'] if GetDepend(['RT_USING_PWM']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_timer.c'] if GetDepend(['BSP_USING_ONCHIP_FLASH']): src += ['GD32E51x_standard_peripheral/Source/gd32e51x_fmc.c'] path = [cwd + '/GD32E51x_standard_peripheral/Include'] CPPDEFINES = ['USE_STDPERIPH_DRIVER'] group = DefineGroup('Libraries', src, depend = ['SOC_SERIES_GD32E51x'], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group')