1import os 2from building import * 3 4objs = [] 5cwd = GetCurrentDir() 6 7# add general drivers 8src = [] 9path = [cwd] 10 11if GetDepend(['BSP_USING_QSPI_FLASH']): 12 src += Glob('drv_qspi_flash.c') 13 14if GetDepend(['RT_USING_FAL']): 15 src += Glob('qspi_mnt.c') 16 17if GetDepend(['BSP_USING_TOUCH']): 18 src += Glob('touch/drv_touch.c') 19 path = [cwd + '/touch'] 20 21if GetDepend(['BSP_USING_SDCARD']): 22 src += Glob('drv_sdcard.c') 23 24if GetDepend(['BSP_USING_QSPI']): 25 src += Glob('drv_qspi_flash.c') 26 27if GetDepend(['BSP_USING_LCD']): 28 src += Glob('ili9341.c') 29 30CPPDEFINES = ['STM32F429xx'] 31group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 32 33list = os.listdir(cwd) 34for item in list: 35 if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 36 group = group + SConscript(os.path.join(item, 'SConscript')) 37 38Return('group') 39