SConscript 982 B

1234567891011121314151617181920212223242526272829303132
  1. import os
  2. import rtconfig
  3. from building import *
  4. Import('SDK_LIB')
  5. cwd = GetCurrentDir()
  6. # add general drivers
  7. src = Split('''
  8. board.c
  9. CubeMX_Config/Core/Src/stm32f2xx_hal_msp.c
  10. ''')
  11. path = [cwd]
  12. path += [cwd + '/CubeMX_Config/Core/Inc']
  13. startup_path_prefix = SDK_LIB
  14. if rtconfig.CROSS_TOOL == 'gcc':
  15. src += [startup_path_prefix + '/STM32F2xx_HAL/CMSIS/Device/ST/STM32F2xx/Source/Templates/gcc/startup_stm32f207xx.s']
  16. elif rtconfig.CROSS_TOOL == 'keil':
  17. src += [startup_path_prefix + '/STM32F2xx_HAL/CMSIS/Device/ST/STM32F2xx/Source/Templates/arm/startup_stm32f207xx.s']
  18. elif rtconfig.CROSS_TOOL == 'iar':
  19. src += [startup_path_prefix + '/STM32F2xx_HAL/CMSIS/Device/ST/STM32F2xx/Source/Templates/iar/startup_stm32f207xx.s']
  20. # STM32F205xx || STM32F207xx || STM32F215xx
  21. # STM32F217xx
  22. # You can select chips from the list above
  23. CPPDEFINES = ['STM32F207xx']
  24. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  25. Return('group')