SConscript 1.1 KB

123456789101112131415161718192021222324252627282930
  1. import rtconfig
  2. from building import *
  3. cwd = GetCurrentDir()
  4. # add the general drivers.
  5. src = Glob('board.c')
  6. src += Glob('CubeMX_Config/Src/stm32f7xx_hal_msp.c')
  7. if GetDepend(['BSP_USING_ETH']):
  8. src += Glob('ports/phy_reset.c')
  9. path = [cwd]
  10. path += [cwd + '/CubeMX_Config/Inc']
  11. path += [cwd + '/ports']
  12. if rtconfig.CROSS_TOOL == 'gcc':
  13. src += [cwd + '/../../libraries/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f767xx.s']
  14. elif rtconfig.CROSS_TOOL == 'keil':
  15. src += [cwd + '/../../libraries/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/arm/startup_stm32f767xx.s']
  16. elif rtconfig.CROSS_TOOL == 'iar':
  17. src += [cwd + '/../../libraries/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/iar/startup_stm32f767xx.s']
  18. # STM32F756xx || STM32F746xx || STM32F745xx || STM32F767xx ||
  19. # STM32F769xx || STM32F777xx || STM32F779xx || STM32F722xx ||
  20. # STM32F723xx || STM32F732xx || STM32F733xx || STM32F730xx || STM32F750xx
  21. # You can select chips from the list above
  22. CPPDEFINES = ['STM32F767xx']
  23. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  24. Return('group')