1
0

SConscript 999 B

1234567891011121314151617181920212223242526272829303132333435
  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. if GetDepend(['BSP_USING_SPI_FLASH']):
  11. src += Glob('ports/spi_flash_init.c')
  12. path = [cwd]
  13. path += [cwd + '/ports']
  14. startup_path_prefix = SDK_LIB
  15. if rtconfig.PLATFORM in ['armcc', 'armclang']:
  16. src += [startup_path_prefix + '/APM32F10x_Library/Device/Geehy/APM32F10x/Source/arm/startup_apm32f10x_cl.s']
  17. if rtconfig.PLATFORM in ['iccarm']:
  18. src += [startup_path_prefix + '/APM32F10x_Library/Device/Geehy/APM32F10x/Source/iar/startup_apm32f10x_cl.s']
  19. if rtconfig.PLATFORM in ['gcc']:
  20. src += [startup_path_prefix + '/APM32F10x_Library/Device/Geehy/APM32F10x/Source/gcc/startup_apm32f10x_cl.S']
  21. # APM32F10X_LD || APM32F10X_MD || APM32F10X_HD || APM32F10X_CL
  22. # You can select chips from the list above
  23. CPPDEFINES = ['APM32F10X_CL']
  24. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  25. Return('group')