SConscript 1018 B

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. ''')
  10. path = [cwd]
  11. path += [cwd + '/ports']
  12. startup_path_prefix = SDK_LIB
  13. if rtconfig.PLATFORM in ['armcc', 'armclang']:
  14. src += [startup_path_prefix + '/APM32F0xx_Library/Device/Geehy/APM32F0xx/Source/arm/startup_apm32f091.s']
  15. if rtconfig.PLATFORM in ['iccarm']:
  16. src += [startup_path_prefix + '/APM32F0xx_Library/Device/Geehy/APM32F0xx/Source/iar/startup_apm32f091.s']
  17. if rtconfig.PLATFORM in ['gcc']:
  18. src += [startup_path_prefix + '/APM32F0xx_Library/Device/Geehy/APM32F0xx/Source/gcc/startup_apm32f091.S']
  19. # APM32F030x6 || APM32F030x8 || APM32F030xC
  20. # APM32F051x6 || APM32F051x8
  21. # APM32F070xB
  22. # APM32F071x8 || APM32F071xB
  23. # APM32F072x8 || APM32F072xB
  24. # APM32F091xB || APM32F091xC
  25. # You can select chips from the list above
  26. CPPDEFINES = ['APM32F091xC']
  27. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  28. Return('group')