SConscript 917 B

1234567891011121314151617181920212223242526272829303132
  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 + '/APM32F10x_Library/Device/Geehy/APM32F10x/Source/arm/startup_apm32f10x_hd.s']
  15. if rtconfig.PLATFORM in ['iccarm']:
  16. src += [startup_path_prefix + '/APM32F10x_Library/Device/Geehy/APM32F10x/Source/iar/startup_apm32f10x_hd.s']
  17. if rtconfig.PLATFORM in ['gcc']:
  18. src += [startup_path_prefix + '/APM32F10x_Library/Device/Geehy/APM32F10x/Source/gcc/startup_apm32f10x_hd.S']
  19. # APM32F10X_LD || APM32F10X_MD || APM32F10X_HD || APM32F10X_CL
  20. # You can select chips from the list above
  21. CPPDEFINES = ['APM32F10X_HD']
  22. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  23. Return('group')