SConscript 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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(['RT_USING_FAL']):
  14. src += ['ports/qspi_mnt.c']
  15. if GetDepend(['BSP_USING_LCD_OTM8009A']):
  16. src += ['ports/drv_otm8009a.c']
  17. if GetDepend(['BSP_USING_SDCARD']):
  18. src += ['ports/drv_sdcard.c']
  19. path = [cwd]
  20. path += [cwd + '/CubeMX_Config/Inc']
  21. path += [cwd + '/ports']
  22. startup_path_prefix = SDK_LIB
  23. if rtconfig.CROSS_TOOL == 'gcc':
  24. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f469xx.s']
  25. elif rtconfig.CROSS_TOOL == 'keil':
  26. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f469xx.s']
  27. elif rtconfig.CROSS_TOOL == 'iar':
  28. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f469xx.s']
  29. # STM32F405xx) || STM32F415xx) || STM32F407xx) || STM32F417xx)
  30. # STM32F427xx) || STM32F437xx) || STM32F429xx) || STM32F439xx)
  31. # STM32F401xC) || STM32F401xE) || STM32F410Tx) || STM32F410Cx)
  32. # STM32F410Rx) || STM32F411xE) || STM32F446xx) || STM32F469xx)
  33. # STM32F479xx) || STM32F412Cx) || STM32F412Rx) || STM32F412Vx)
  34. # STM32F412Zx) || STM32F413xx) || STM32F423xx)
  35. # You can select chips from the list above
  36. CPPDEFINES = ['STM32F469xx']
  37. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  38. Return('group')