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(['BSP_USING_SDMMC']): 15 src += Glob('drv_sdio.c') 16 17if GetDepend(['BSP_USING_DCMI']): 18 src += Glob('drv_dcmi.c') 19 20if GetDepend(['BSP_USING_OV2640']): 21 src += Glob('drv_ov2640.c') 22 23 24CPPDEFINES = ['STM32H743xx'] 25group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 26 27list = os.listdir(cwd) 28for item in list: 29 if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 30 group = group + SConscript(os.path.join(item, 'SConscript')) 31 32Return('group') 33