SConscript 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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/stm32l0xx_hal_msp.c
  10. ''')
  11. path = [cwd]
  12. path += [cwd + '/CubeMX_Config/Inc']
  13. startup_path_prefix = SDK_LIB
  14. if rtconfig.CROSS_TOOL == 'gcc':
  15. src += [startup_path_prefix + '/STM32L0xx_HAL/CMSIS/Device/ST/STM32L0xx/Source/Templates/gcc/startup_stm32l053xx.s']
  16. elif rtconfig.CROSS_TOOL == 'keil':
  17. src += [startup_path_prefix + '/STM32L0xx_HAL/CMSIS/Device/ST/STM32L0xx/Source/Templates/arm/startup_stm32l053xx.s']
  18. elif rtconfig.CROSS_TOOL == 'iar':
  19. src += [startup_path_prefix + '/STM32L0xx_HAL/CMSIS/Device/ST/STM32L0xx/Source/Templates/iar/startup_stm32l053xx.s']
  20. # STM32L052xx || STM32L053xx || STM32L062xx
  21. # STM32L063xx || STM32L072xx || STM32L073xx
  22. # STM32L082xx || STM32L083xx
  23. # You can select chips from the list above
  24. CPPDEFINES = ['STM32L053xx']
  25. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  26. Return('group')