SConscript 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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/stm32f3xx_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 + '/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/gcc/startup_stm32f302x8.s']
  16. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  17. src += [startup_path_prefix + '/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/arm/startup_stm32f302x8.s']
  18. elif rtconfig.PLATFORM in ['iccarm']:
  19. src += [startup_path_prefix + '/STM32F3xx_HAL/CMSIS/Device/ST/STM32F3xx/Source/Templates/iar/startup_stm32f302x8.s']
  20. # (STM32F301x8) || (STM32F302x8) || (STM32F318xx)
  21. # (STM32F302xC) || (STM32F303xC) || (STM32F358xx)
  22. # (STM32F303x8) || (STM32F334x8) || (STM32F328xx)
  23. # (STM32F302xE) || (STM32F303xE) || (STM32F398xx)
  24. # (STM32F373xC) || (STM32F378xx)
  25. # You can select chips from the list above
  26. CPPDEFINES = ['STM32F302x8']
  27. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  28. Return('group')