summaryrefslogtreecommitdiff
path: root/components/lwp/SConscript
diff options
context:
space:
mode:
authorshaojinchun <[email protected]>2018-12-10 16:31:33 +0800
committershaojinchun <[email protected]>2018-12-10 16:44:48 +0800
commita8953e92119944ffdb8c02a8d88cfa08dc3a59af (patch)
tree334493be38c291a2922c2f2e03a4d31dd3c470c6 /components/lwp/SConscript
parent56c0df1e58a231750ebfbc93401a4b6f42f99ffb (diff)
add lwp support
Diffstat (limited to 'components/lwp/SConscript')
-rw-r--r--components/lwp/SConscript20
1 files changed, 20 insertions, 0 deletions
diff --git a/components/lwp/SConscript b/components/lwp/SConscript
new file mode 100644
index 0000000000..53e445f8cc
--- /dev/null
+++ b/components/lwp/SConscript
@@ -0,0 +1,20 @@
+Import('rtconfig')
+from building import *
+
+cwd = GetCurrentDir()
+src = []
+CPPPATH = []
+
+support_arch = {"arm": ["cortex-m3", "cortex-m4", "cortex-m7", "R6", "vexpress-a9"]}
+platform_file = {'armcc': 'rvds.S', 'gcc': 'gcc.S', 'iar': 'iar.S'}
+
+if rtconfig.PLATFORM in platform_file.keys(): # support platforms
+ if rtconfig.ARCH in support_arch.keys() and rtconfig.CPU in support_arch[rtconfig.ARCH]:
+ # arch/arm/cortex-m7/lwp_gcc.S
+ asm_path = 'arch/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/*_' + platform_file[rtconfig.PLATFORM]
+ src = Glob('*.c') + Glob(asm_path)
+ CPPPATH = [cwd]
+
+group = DefineGroup('lwP', src, depend = ['RT_USING_LWP'], CPPPATH = CPPPATH)
+
+Return('group')