import rtconfig from building import * # get current directory cwd = GetCurrentDir() # The set of source files associated with this SConscript file. src = Split(''' GD/GD32H7xx/Source/system_gd32h7xx.c ''') path = [ cwd + '/GD/GD32H7xx/Include', cwd,] if rtconfig.PLATFORM in ['gcc']: src += ['GD/GD32H7xx/Source/GCC/startup_gd32h7xx.s'] elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += ['GD/GD32H7xx/Source/ARM/startup_gd32h7xx.s'] elif rtconfig.PLATFORM in ['iccarm']: src += ['GD/GD32H7xx/Source/IAR/startup_gd32h7xx.s'] CPPDEFINES = ['USE_STDPERIPH_DRIVER'] group = DefineGroup('Libraries', src, depend = ['SOC_SERIES_GD32H7xx'], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group')