Skip to content

Commit 2ca71f9

Browse files
committed
[fix] MDK 旧版本错误识别 SConscript 文件
1 parent c3e20fd commit 2ca71f9

File tree

2 files changed

+16
-21
lines changed

2 files changed

+16
-21
lines changed

bsp/ra6m4-cpk/SConscript

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
# for module compiling
22
import os
33
Import('RTT_ROOT')
4+
Import('rtconfig')
5+
from building import *
46

5-
cwd = str(Dir('#'))
6-
objs = []
7+
cwd = GetCurrentDir()
8+
src = []
9+
CPPPATH = []
710
list = os.listdir(cwd)
811

12+
if rtconfig.CROSS_TOOL == 'iar':
13+
print("\nThe current project does not support iar build\n")
14+
Return('group')
15+
elif rtconfig.CROSS_TOOL == 'gcc':
16+
CPPPATH = [cwd]
17+
src = Glob('./src/*.c')
18+
19+
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
20+
921
for d in list:
1022
path = os.path.join(cwd, d)
1123
if os.path.isfile(os.path.join(path, 'SConscript')):
12-
objs = objs + SConscript(os.path.join(d, 'SConscript'))
24+
group = group + SConscript(os.path.join(d, 'SConscript'))
1325

14-
Return('objs')
26+
Return('group')

bsp/ra6m4-cpk/src/SConscript

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)