1
0

SConscript 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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/Src/stm32f0xx_hal_msp.c
  10. ''')
  11. path = [cwd]
  12. path += [cwd + '/CubeMX_Config/Inc']
  13. startup_path_prefix = SDK_LIB
  14. if rtconfig.PLATFORM in ['gcc']:
  15. src += [startup_path_prefix + '/STM32F0xx_HAL/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/startup_stm32f072xb.s']
  16. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  17. src += [startup_path_prefix + '/STM32F0xx_HAL/CMSIS/Device/ST/STM32F0xx/Source/Templates/arm/startup_stm32f072xb.s']
  18. elif rtconfig.PLATFORM in ['iccarm']:
  19. src += [startup_path_prefix + '/STM32F0xx_HAL/CMSIS/Device/ST/STM32F0xx/Source/Templates/iar/startup_stm32f072xb.s']
  20. # STM32F030x6 || STM32F030x8 || STM32F031x6
  21. # STM32F038xx || STM32F042x6 || STM32F048xx
  22. # STM32F070x6 || STM32F051x8 || STM32F058xx
  23. # STM32F071xB || STM32F072xB || STM32F078xx
  24. # STM32F070xB || STM32F091xC || STM32F098xx || STM32F030xC
  25. # You can select chips from the list above
  26. CPPDEFINES = ['STM32F072xB']
  27. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  28. Return('group')