SConscript 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import os
  2. import rtconfig
  3. from building import *
  4. Import('SDK_LIB')
  5. cwd = GetCurrentDir()
  6. # add general drivers
  7. src = Split('''
  8. board.c
  9. CubeMX_Config/Src/stm32f4xx_hal_msp.c
  10. ''')
  11. if GetDepend(['BSP_USING_QSPI_FLASH']):
  12. src += ['ports/drv_qspi_flash.c']
  13. if GetDepend(['PKG_USING_FAL']):
  14. src += ['ports/qspi_mnt.c']
  15. if GetDepend(['BSP_USING_TOUCH']):
  16. src += Glob('ports/touch/*.c')
  17. if GetDepend(['BSP_USING_SDCARD']):
  18. src += ['ports/drv_sdcard.c']
  19. if GetDepend(['BSP_USING_QSPI']):
  20. src += ['ports/drv_qspi_flash.c']
  21. if GetDepend(['BSP_USING_LCD']):
  22. src += ['ports/ili9341.c']
  23. path = [cwd]
  24. path += [cwd + '/CubeMX_Config/Inc']
  25. path += [cwd + '/ports']
  26. startup_path_prefix = SDK_LIB
  27. if rtconfig.CROSS_TOOL == 'gcc':
  28. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.s']
  29. elif rtconfig.CROSS_TOOL == 'keil':
  30. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f429xx.s']
  31. elif rtconfig.CROSS_TOOL == 'iar':
  32. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f429xx.s']
  33. # STM32F405xx) || STM32F415xx) || STM32F407xx) || STM32F417xx)
  34. # STM32F427xx) || STM32F437xx) || STM32F429xx) || STM32F439xx)
  35. # STM32F401xC) || STM32F401xE) || STM32F410Tx) || STM32F410Cx)
  36. # STM32F410Rx) || STM32F411xE) || STM32F446xx) || STM32F469xx)
  37. # STM32F479xx) || STM32F412Cx) || STM32F412Rx) || STM32F412Vx)
  38. # STM32F412Zx) || STM32F413xx) || STM32F423xx)
  39. # You can select chips from the list above
  40. CPPDEFINES = ['STM32F429xx']
  41. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  42. Return('group')