1import os 2import rtconfig 3from building import * 4 5Import('SDK_LIB') 6 7cwd = GetCurrentDir() 8 9# add general drivers 10src = Split(''' 11board.c 12''') 13 14path = [cwd] 15 16startup_path_prefix = SDK_LIB 17 18if rtconfig.PLATFORM in ['gcc']: 19 src += [startup_path_prefix + '/msp432e4/startup_system_files/gcc/startup_msp432e401y_gcc.c'] 20elif rtconfig.PLATFORM in ['armcc', 'armclang']: 21 src += [startup_path_prefix + '/msp432e4/startup_system_files/keil/startup_msp432e401y_uvision.s'] 22elif rtconfig.PLATFORM in ['iccarm']: 23 src += [startup_path_prefix + '/libraries/msp432e4/startup_system_files/iar/startup_msp432e401y_ewarm.c'] 24 25 26CPPDEFINES = ['__MSP432E401Y__'] 27if rtconfig.PLATFORM in ['armcc', 'armclang']: 28 CPPDEFINES += ['rvmdk'] 29group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 30Return('group') 31