2014-07-18 17:17:56 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Glob('driverlib/*.c')
|
|
|
|
SrcRemove(src, 'onewire.c')
|
2021-12-22 11:03:03 +08:00
|
|
|
CFLAGS = ''
|
2014-07-18 17:17:56 +08:00
|
|
|
|
|
|
|
# add for startup script
|
2022-04-20 09:56:04 +08:00
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2018-05-16 09:39:56 +08:00
|
|
|
src += ['startup/startup_gcc.c']
|
2022-04-20 09:56:04 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2018-05-16 09:39:56 +08:00
|
|
|
src += ['startup/startup_rvmdk.S']
|
2014-07-18 17:17:56 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
2018-05-16 09:39:56 +08:00
|
|
|
src += ['startup/startup_ewarm.c']
|
2021-12-22 11:03:03 +08:00
|
|
|
CFLAGS += ' --diag_suppress=pe177'
|
2014-07-18 17:17:56 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd, cwd + '/inc', cwd + '/driverlib']
|
2018-05-16 09:39:56 +08:00
|
|
|
|
2014-07-18 17:17:56 +08:00
|
|
|
|
|
|
|
CPPDEFINES = [rtconfig.PART_TYPE]
|
2021-12-22 11:03:03 +08:00
|
|
|
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, CFLAGS = CFLAGS)
|
2014-07-18 17:17:56 +08:00
|
|
|
|
|
|
|
Return('group')
|