38 lines
719 B
Python

from building import *
cwd = GetCurrentDir()
src = Split("""
board.c
clock_config.c
""")
CPPPATH = [cwd]
# remove no need file.
if GetDepend('RT_USING_LWIP') == False:
SrcRemove(src, 'drv_emac.c')
# add driver code
if GetDepend('BSP_USING_UART0'):
src = src + ['drv_uart.c']
if GetDepend('BSP_USING_SPI2'):
src = src + ['drv_spi.c']
if GetDepend('BSP_USING_I2C4'):
src = src + ['drv_i2c.c']
if GetDepend('BSP_USING_SDCARD'):
src = src + ['drv_sdcard.c']
if GetDepend('BSP_USING_SPIFLASH'):
src = src + ['drv_spi_flash.c']
if GetDepend('BSP_USING_PCT2075'):
src = src + ['drv_pct2075.c']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')