SConscript 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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 GetDepend(['BSP_USING_SDRAM']):
  15. path += [cwd + '/ports']
  16. if rtconfig.CROSS_TOOL == 'gcc':
  17. src += [cwd + '/../../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.s']
  18. elif rtconfig.CROSS_TOOL == 'keil':
  19. src += [cwd + '/../../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f429xx.s']
  20. elif rtconfig.CROSS_TOOL == 'iar':
  21. src += [cwd + '/../../libraries/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f429xx.s']
  22. CPPDEFINES = ['STM32F429xx']
  23. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  24. Return('group')