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