1
0

SConscript 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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/stm32f4xx_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 + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f412zx.s']
  16. elif rtconfig.CROSS_TOOL == 'keil':
  17. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f412zx.s']
  18. elif rtconfig.CROSS_TOOL == 'iar':
  19. src += [startup_path_prefix + '/STM32F4xx_HAL/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s']
  20. # STM32F405xx) || STM32F415xx) || STM32F407xx) || STM32F417xx)
  21. # STM32F427xx) || STM32F437xx) || STM32F429xx) || STM32F439xx)
  22. # STM32F401xC) || STM32F401xE) || STM32F410Tx) || STM32F410Cx)
  23. # STM32F410Rx) || STM32F411xE) || STM32F446xx) || STM32F469xx)
  24. # STM32F479xx) || STM32F412Cx) || STM32F412Rx) || STM32F412Vx)
  25. # STM32F412Zx) || STM32F413xx) || STM32F423xx)
  26. # You can select chips from the list above
  27. CPPDEFINES = ['STM32F412Zx']
  28. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  29. Return('group')