import rtconfig Import('RTT_ROOT') from building import * # get current directory cwd = GetCurrentDir() # The set of source files associated with this SConscript file. src = Split(""" CMSIS/Nuvoton/M051Series/Source/system_M051Series.c """) src += Glob('StdDriver/src/*.c') #add for startup script if rtconfig.CROSS_TOOL == 'iar': src = src + ['CMSIS/Nuvoton/M051Series/Source/IAR/startup_M051Series.s'] elif rtconfig.CROSS_TOOL == 'keil': src = src + ['CMSIS/Nuvoton/M051Series/Source/ARM/startup_M051Series.s'] #elif rtconfig.CROSS_TOOL == 'gcc': // not support gcc # src = src + ['CMSIS/ST/STM32F0xx/Source/Templates/gcc_ride7/startup_stm32f0xx.s'] path = [cwd + '/StdDriver/inc', cwd + '/CMSIS/Nuvoton/M051Series/Include', cwd + '/CMSIS/Include'] #CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE] CPPDEFINES = [''] group = DefineGroup('M05X_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group')