2010-03-24 13:16:28 +08:00
|
|
|
Import('env')
|
|
|
|
Import('rtconfig')
|
|
|
|
Import('RTT_ROOT')
|
2010-04-19 06:16:50 +08:00
|
|
|
Import('projects')
|
2010-03-24 13:16:28 +08:00
|
|
|
|
|
|
|
comm = rtconfig.ARCH + '/common'
|
|
|
|
path = rtconfig.ARCH + '/' + rtconfig.CPU
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
if rtconfig.PLATFORM == 'armcc':
|
|
|
|
src_local = Glob(path + '/*.c') + Glob(path + '/*_rvds.S') + Glob(comm + '/*.c')
|
|
|
|
|
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
|
|
|
src_local = Glob(path + '/*.c') + Glob(path + '/*_gcc.S') + Glob(comm + '/*.c') + Glob(path + '/*_init.S')
|
|
|
|
|
|
|
|
if rtconfig.PLATFORM == 'iar':
|
|
|
|
src_local = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c')
|
|
|
|
|
2010-04-19 06:16:50 +08:00
|
|
|
# group definitions
|
|
|
|
group = {}
|
|
|
|
group['name'] = rtconfig.CPU.upper()
|
|
|
|
group['src'] = File(src_local)
|
|
|
|
group['CCFLAGS'] = ''
|
2010-10-16 07:40:44 +08:00
|
|
|
group['CPPPATH'] = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/common']
|
2010-04-19 06:16:50 +08:00
|
|
|
group['CPPDEFINES'] = ''
|
|
|
|
group['LINKFLAGS'] = ''
|
|
|
|
|
|
|
|
# add group to project list
|
|
|
|
projects.append(group)
|
|
|
|
|
|
|
|
env.Append(CPPPATH = group['CPPPATH'])
|
|
|
|
obj = env.Object(group['src'])
|
2010-03-24 13:16:28 +08:00
|
|
|
|
|
|
|
Return('obj')
|