SConscript 1001 B

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/stm32f4xx_hal_msp.c')
  7. if GetDepend(['BSP_USING_ETH']):
  8. src += Glob('ports/phy_reset.c')
  9. if GetDepend(['BSP_USING_SPI_FLASH']):
  10. src += Glob('ports/spi_flash_init.c')
  11. path = [cwd]
  12. path += [cwd + '/CubeMX_Config/Inc']
  13. path += [cwd + '/ports']
  14. if rtconfig.CROSS_TOOL == 'gcc':
  15. src += [cwd + '/../../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f407xx.s']
  16. elif rtconfig.CROSS_TOOL == 'keil':
  17. src += [cwd + '/../../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f407xx.s']
  18. elif rtconfig.CROSS_TOOL == 'iar':
  19. src += [cwd + '/../../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f407xx.s']
  20. CPPDEFINES = ['STM32F407xx']
  21. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  22. Return('group')