SConscript 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. if GetDepend(['BSP_USING_QSPI_FLASH']):
  11. src += Glob('ports/drv_qspi_flash.c')
  12. if GetDepend(['BSP_USING_SDCARD']):
  13. src += Glob('ports/sdcard_port.c')
  14. path = [cwd]
  15. path += [cwd + '/CubeMX_Config/Inc']
  16. path += [cwd + '/ports']
  17. startup_path_prefix = SDK_LIB
  18. if rtconfig.PLATFORM in ['gcc']:
  19. src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f746xx.s']
  20. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  21. src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/arm/startup_stm32f746xx.s']
  22. elif rtconfig.PLATFORM in ['iccarm']:
  23. src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/iar/startup_stm32f746xx.s']
  24. # STM32F756xx || STM32F746xx || STM32F745xx || STM32F767xx ||
  25. # STM32F769xx || STM32F777xx || STM32F779xx || STM32F722xx ||
  26. # STM32F723xx || STM32F732xx || STM32F733xx || STM32F730xx || STM32F750xx
  27. # You can select chips from the list above
  28. CPPDEFINES = ['STM32F746xx']
  29. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  30. Return('group')