SConscript 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
  25. Return('group')