SConscript 1.2 KB

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