2014-08-12 18:18:23 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
2014-10-27 22:27:54 +08:00
|
|
|
src = Glob('*.c')
|
2014-08-12 18:18:23 +08:00
|
|
|
comm = 'libcpu/' + rtconfig.ARCH
|
|
|
|
if (rtconfig.CPU == 'cortex-m4') or (rtconfig.CPU == 'cortex-m3'):
|
|
|
|
comm = 'libcpu/cortexm'
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
if rtconfig.PLATFORM == 'armcc':
|
2014-10-27 22:27:54 +08:00
|
|
|
src = src + Glob(comm + '/*.c') + Glob(comm + '/*_rvds.S')
|
2014-08-12 18:18:23 +08:00
|
|
|
|
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
2014-10-27 22:27:54 +08:00
|
|
|
src = src + Glob(comm + '/*.c') + Glob(comm + '/*_gcc.S')
|
2014-08-12 18:18:23 +08:00
|
|
|
|
|
|
|
if rtconfig.PLATFORM == 'iar':
|
2014-10-27 22:27:54 +08:00
|
|
|
src = src + Glob(comm + '/*.c') + Glob(comm + '/*_iar.S')
|
2014-08-12 18:18:23 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd, cwd + '/' + comm]
|
|
|
|
|
|
|
|
group = DefineGroup('gdb', src, depend = ['RT_USING_GDB'], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
Return('group')
|