SConscript 1.5 KB

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