Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
AdRainty
rt-thread
提交
63feef4c
R
rt-thread
项目概览
AdRainty
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
63feef4c
编写于
12月 04, 2021
作者:
B
Bernard Xiong
提交者:
GitHub
12月 04, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5322 from mysterywolf/tools
[tools] add function to auto-update rtconfig.h
上级
6feea35e
eac383f9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
41 addition
and
28 deletion
+41
-28
tools/buildbot.py
tools/buildbot.py
+41
-28
未找到文件。
tools/buildbot.py
浏览文件 @
63feef4c
...
...
@@ -12,6 +12,46 @@ if len(sys.argv) != 2:
usage
()
sys
.
exit
(
0
)
def
update_project_file
(
project_dir
):
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.Uv2'
)):
print
(
'prepare MDK3 project file on '
+
project_dir
)
command
=
' --target=mdk -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
+
' > 1.txt'
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.uvproj'
)):
print
(
'prepare MDK4 project file on '
+
project_dir
)
command
=
' --target=mdk4 -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
+
' > 1.txt'
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.uvprojx'
)):
print
(
'prepare MDK5 project file on '
+
project_dir
)
command
=
' --target=mdk5 -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
+
' > 1.txt'
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.ewp'
)):
print
(
'prepare IAR project file on '
+
project_dir
)
command
=
' --target=iar -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
+
' > 1.txt'
)
def
update_all_project_files
(
root_path
):
# current path is dir
if
os
.
path
.
isdir
(
root_path
):
projects
=
os
.
listdir
(
root_path
)
# is a project path?
if
"SConscript"
in
projects
:
print
(
'new bsp path {}'
.
format
(
root_path
))
try
:
os
.
system
(
'scons --pyconfig-silent -C {0}'
.
format
(
root_path
))
# update rtconfig.h and .config
update_project_file
(
root_path
)
except
Exception
as
e
:
print
(
"error message: {}"
.
format
(
e
))
sys
.
exit
(
-
1
)
else
:
for
i
in
projects
:
new_root_path
=
os
.
path
.
join
(
root_path
,
i
)
update_all_project_files
(
new_root_path
)
# get command options
command
=
''
if
sys
.
argv
[
1
]
==
'all'
:
...
...
@@ -19,34 +59,7 @@ if sys.argv[1] == 'all':
elif
sys
.
argv
[
1
]
==
'clean'
:
command
=
' -c'
elif
sys
.
argv
[
1
]
==
'project'
:
projects
=
os
.
listdir
(
BSP_ROOT
)
for
item
in
projects
:
project_dir
=
os
.
path
.
join
(
BSP_ROOT
,
item
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.Uv2'
)):
print
(
'prepare MDK3 project file on '
+
project_dir
)
command
=
' --target=mdk -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.uvproj'
)):
print
(
'prepare MDK4 project file on '
+
project_dir
)
command
=
' --target=mdk4 -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.uvprojx'
)):
print
(
'prepare MDK5 project file on '
+
project_dir
)
command
=
' --target=mdk5 -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
project_dir
,
'template.ewp'
)):
print
(
'prepare IAR project file on '
+
project_dir
)
command
=
' --target=iar -s'
os
.
system
(
'scons --directory='
+
project_dir
+
command
)
update_all_project_files
(
BSP_ROOT
)
sys
.
exit
(
0
)
else
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录