SConscript 1.2 KB

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