|
|
@@ -5,24 +5,32 @@ cwd = GetCurrentDir()
|
|
|
src = []
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
-support_arch = {"arm": ["cortex-m3", "cortex-m4", "cortex-m7", "arm926", "cortex-a"],"aarch64":["cortex-a"],"risc-v": ["virt64", "c906"]}
|
|
|
+support_arch = {"arm": ["cortex-m3", "cortex-m4", "cortex-m7", "arm926", "cortex-a"],"aarch64":["cortex-a"],"risc-v": ["rv64"]}
|
|
|
platform_file = {'armcc': 'rvds.S', 'gcc': 'gcc.S', 'iar': 'iar.S'}
|
|
|
|
|
|
+platform = rtconfig.PLATFORM
|
|
|
+arch = rtconfig.ARCH
|
|
|
+cpu = rtconfig.CPU
|
|
|
+
|
|
|
+# fix the cpu for risc-v
|
|
|
+if arch == 'risc-v':
|
|
|
+ rv64 = ['virt64', 'c906']
|
|
|
+ if cpu in rv64:
|
|
|
+ cpu = 'rv64'
|
|
|
+
|
|
|
if GetDepend('LWP_UNIX98_PTY'):
|
|
|
print("LWP_UNIX98_PTY")
|
|
|
- # src += ['unix98pty/lwp_ptmx.c', 'unix98pty/lwp_pts.c']
|
|
|
src += Glob('unix98pty/*.c')
|
|
|
CPPPATH += ['unix98pty/']
|
|
|
|
|
|
-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]
|
|
|
- arch_common = 'arch/' + rtconfig.ARCH + '/' + 'common/*.c'
|
|
|
+if platform in platform_file.keys(): # support platforms
|
|
|
+ if arch in support_arch.keys() and cpu in support_arch[arch]:
|
|
|
+ asm_path = 'arch/' + arch + '/' + cpu + '/*_' + platform_file[platform]
|
|
|
+ arch_common = 'arch/' + arch + '/' + 'common/*.c'
|
|
|
src += Glob('*.c') + Glob(asm_path) + Glob(arch_common)
|
|
|
- src += Glob('arch/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/*.c')
|
|
|
+ src += Glob('arch/' + arch + '/' + cpu + '/*.c')
|
|
|
CPPPATH = [cwd]
|
|
|
- CPPPATH += ['arch/' + rtconfig.ARCH + '/' + rtconfig.CPU]
|
|
|
+ CPPPATH += ['arch/' + arch + '/' + cpu]
|
|
|
|
|
|
group = DefineGroup('lwP', src, depend = ['RT_USING_LWP'], CPPPATH = CPPPATH)
|
|
|
|