summaryrefslogtreecommitdiff
path: root/components/gdb/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'components/gdb/SConscript')
-rw-r--r--components/gdb/SConscript23
1 files changed, 23 insertions, 0 deletions
diff --git a/components/gdb/SConscript b/components/gdb/SConscript
new file mode 100644
index 0000000000..3ee73a0685
--- /dev/null
+++ b/components/gdb/SConscript
@@ -0,0 +1,23 @@
+Import('rtconfig')
+from building import *
+
+comm = 'libcpu/' + rtconfig.ARCH
+if (rtconfig.CPU == 'cortex-m4') or (rtconfig.CPU == 'cortex-m3'):
+ comm = 'libcpu/cortexm'
+
+cwd = GetCurrentDir()
+if rtconfig.PLATFORM == 'armcc':
+ src = Glob('*.c') + Glob(comm + '/*.c') + Glob(comm + '/*_rvds.S')
+
+if rtconfig.PLATFORM == 'gcc':
+ src = Glob('*.c') + Glob(comm + '/*.c') + Glob(comm + '/*_gcc.S')
+
+if rtconfig.PLATFORM == 'iar':
+ src = Glob('*.c') + Glob(comm + '/*.c') + Glob(comm + '/*_iar.S')
+
+
+CPPPATH = [cwd, cwd + '/' + comm]
+
+group = DefineGroup('gdb', src, depend = ['RT_USING_GDB'], CPPPATH = CPPPATH)
+
+Return('group')