SConscript 957 B

123456789101112131415161718192021222324252627282930
  1. import rtconfig
  2. from building import *
  3. # get current directory
  4. cwd = GetCurrentDir()
  5. # The set of source files associated with this SConscript file.
  6. src = Glob('STM32F7xx_HAL_Driver/Src/*.c')
  7. src += Split('''
  8. CMSIS/Device/ST/STM32F7xx/Source/Templates/system_stm32f7xx.c
  9. ''')
  10. #add for startup script
  11. if rtconfig.CROSS_TOOL == 'gcc':
  12. src = src + ['CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f769xx.s']
  13. elif rtconfig.CROSS_TOOL == 'keil':
  14. src = src + ['CMSIS/Device/ST/STM32F7xx/Source/Templates/arm/startup_stm32f769xx.s']
  15. elif rtconfig.CROSS_TOOL == 'iar':
  16. src = src + ['CMSIS/Device/ST/STM32F7xx/Source/Templates/iar/startup_stm32f769xx.s']
  17. path = [cwd + '/STM32F7xx_HAL_Driver/Inc',
  18. cwd + '/CMSIS/Device/ST/STM32F7xx/Include',
  19. cwd + '/CMSIS/Include']
  20. CPPDEFINES = ['STM32F769xx', 'USE_HAL_DRIVER']
  21. group = DefineGroup('STM32_HAL', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  22. Return('group')