SConscript 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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/stm32l4xx_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 + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l412xx.s']
  16. elif rtconfig.CROSS_TOOL == 'keil':
  17. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l412xx.s']
  18. elif rtconfig.CROSS_TOOL == 'iar':
  19. src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l412xx.s']
  20. # STM32L412xx || STM32L422xx || STM32L431xx
  21. # STM32L432xx || STM32L433xx || STM32L442xx
  22. # STM32L443xx || STM32L451xx || STM32L452xx
  23. # STM32L462xx || STM32L471xx || STM32L475xx
  24. # STM32L476xx || STM32L485xx || STM32L486xx
  25. # STM32L496xx || STM32L4A6xx || STM32L4R5xx
  26. # STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
  27. # STM32L4S7xx || STM32L4S9xx
  28. # You can select chips from the list above
  29. CPPDEFINES = ['STM32L412xx']
  30. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  31. Return('group')