SConscript 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. import rtconfig
  2. Import('RTT_ROOT')
  3. from building import *
  4. # get current directory
  5. cwd = GetCurrentDir()
  6. # The set of source files associated with this SConscript file.
  7. src = Split("""
  8. CMSIS/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
  9. """)
  10. src += Glob('STM32F4xx_StdPeriph_Driver/src/*.c')
  11. #add for startup script
  12. if rtconfig.CROSS_TOOL == 'gcc':
  13. src = src + ['CMSIS/ST/STM32F4xx/Source/Templates/gcc_ride7/startup_stm32f4xx.s']
  14. elif rtconfig.CROSS_TOOL == 'keil':
  15. src = src + ['CMSIS/ST/STM32F4xx/Source/Templates/arm/startup_stm32f4xx.s']
  16. # elif rtconfig.CROSS_TOOL == 'iar':
  17. # src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/iar/' + startup_scripts[rtconfig.STM32_TYPE]]
  18. path = [cwd + '/STM32F4xx_StdPeriph_Driver/inc',
  19. cwd + '/CMSIS/ST/STM32F4xx/Include',
  20. cwd + '/CMSIS/Include']
  21. #CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
  22. CPPDEFINES = ['USE_STDPERIPH_DRIVER']
  23. group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  24. Return('group')