SConscript 821 B

12345678910111213141516171819202122232425262728293031323334
  1. import os
  2. from building import *
  3. objs = []
  4. cwd = GetCurrentDir()
  5. # add general drivers
  6. src = []
  7. path = [cwd]
  8. if GetDepend(['BSP_USING_SPI_FLASH']):
  9. src += Glob('drv_spi_flash.c')
  10. if GetDepend(['BSP_USING_QSPI_FLASH']):
  11. src += Glob('drv_qspi_flash.c')
  12. if GetDepend('BSP_USING_LCD_SPI'):
  13. src = src + ['drv_lcd_spi.c']
  14. src = src + ['st7735/lcd.c']
  15. src = src + ['st7735/st7735.c']
  16. src = src + ['st7735/st7735_reg.c']
  17. src = src + ['st7735/logo.c']
  18. path += [cwd + '/st7735']
  19. CPPDEFINES = ['STM32H750xx']
  20. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  21. list = os.listdir(cwd)
  22. for item in list:
  23. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  24. group = group + SConscript(os.path.join(item, 'SConscript'))
  25. Return('group')