SConscript 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import rtconfig
  2. from building import *
  3. Import('SDK_LIB')
  4. cwd = GetCurrentDir()
  5. # add the general drivers.
  6. # add general drivers
  7. src = Split('''
  8. board.c
  9. CubeMX_Config/Src/stm32h7xx_hal_msp.c
  10. ''')
  11. if GetDepend(['BSP_USING_QSPI_FLASH']):
  12. src += Glob('ports/drv_qspi_flash.c')
  13. if GetDepend('BSP_USING_SPI_LCD'):
  14. src = src + ['ports/drv_lcd.c']
  15. path = [cwd]
  16. path += [cwd + '/CubeMX_Config/Inc']
  17. startup_path_prefix = SDK_LIB
  18. if rtconfig.CROSS_TOOL == 'gcc':
  19. src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h750xx.s']
  20. elif rtconfig.CROSS_TOOL == 'keil':
  21. src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h750xx.s']
  22. elif rtconfig.CROSS_TOOL == 'iar':
  23. src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h750xx.s']
  24. # STM32H743xx || STM32H750xx || STM32F753xx
  25. # You can select chips from the list above
  26. CPPDEFINES = ['STM32H750xx']
  27. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  28. Return('group')