SConscript 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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/STM32F0xx/Source/Templates/system_stm32f0xx.c
  9. """)
  10. src += Glob('STM32F0xx_StdPeriph_Driver/src/*.c')
  11. # starupt scripts for each STM32 kind
  12. # startup_scripts = {}
  13. # startup_scripts['STM32F10X_CL'] = 'startup_stm32f10x_cl.s'
  14. # startup_scripts['STM32F10X_HD'] = 'startup_stm32f10x_hd.s'
  15. # startup_scripts['STM32F10X_HD_VL'] = 'startup_stm32f10x_hd_vl.s'
  16. # startup_scripts['STM32F10X_LD'] = 'startup_stm32f10x_ld.s'
  17. # startup_scripts['STM32F10X_LD_VL'] = 'startup_stm32f10x_ld_vl.s'
  18. # startup_scripts['STM32F10X_MD'] = 'startup_stm32f10x_md.s'
  19. # startup_scripts['STM32F10X_MD_VL'] = 'startup_stm32f10x_md_vl.s'
  20. # startup_scripts['STM32F10X_XL'] = 'startup_stm32f10x_xl.s'
  21. #add for startup script
  22. if rtconfig.CROSS_TOOL == 'gcc':
  23. src = src + ['CMSIS/ST/STM32F0xx/Source/Templates/gcc_ride7/startup_stm32f0xx.s']
  24. elif rtconfig.CROSS_TOOL == 'keil':
  25. src = src + ['CMSIS/ST/STM32F0xx/Source/Templates/arm/startup_stm32f0xx.s']
  26. elif rtconfig.CROSS_TOOL == 'iar':
  27. src = src + ['CMSIS/ST/STM32F0xx/Source/Templates/iar/startup_stm32f0xx.s']
  28. path = [cwd + '/STM32F0xx_StdPeriph_Driver/inc',
  29. cwd + '/CMSIS/ST/STM32F0xx/Include',
  30. cwd + '/CMSIS/Include']
  31. #CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
  32. CPPDEFINES = ['USE_STDPERIPH_DRIVER']
  33. group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  34. Return('group')