SConscript 829 B

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