Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
10d480ee
R
rt-thread
项目概览
BaiXuePrincess
/
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,发现更多精彩内容 >>
未验证
提交
10d480ee
编写于
2月 18, 2020
作者:
B
Bernard Xiong
提交者:
GitHub
2月 18, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3383 from armink/fix_eclipse
Fix eclipse
上级
bbdc9e2c
19dd4044
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
528 addition
and
60 deletion
+528
-60
bsp/stm32/stm32f103-dofly-M3S/.cproject
bsp/stm32/stm32f103-dofly-M3S/.cproject
+48
-2
bsp/stm32/stm32f103-yf-ufun/.cproject
bsp/stm32/stm32f103-yf-ufun/.cproject
+47
-2
bsp/stm32/stm32f401-st-nucleo/.cproject
bsp/stm32/stm32f401-st-nucleo/.cproject
+47
-2
bsp/stm32/stm32f405-smdz-breadfruit/.cproject
bsp/stm32/stm32f405-smdz-breadfruit/.cproject
+47
-2
bsp/stm32/stm32f407-atk-explorer/.cproject
bsp/stm32/stm32f407-atk-explorer/.cproject
+48
-2
bsp/stm32/stm32f411-st-nucleo/.cproject
bsp/stm32/stm32f411-st-nucleo/.cproject
+47
-2
bsp/stm32/stm32f429-atk-apollo/.cproject
bsp/stm32/stm32f429-atk-apollo/.cproject
+48
-2
bsp/stm32/stm32f429-fire-challenger/.cproject
bsp/stm32/stm32f429-fire-challenger/.cproject
+48
-2
bsp/stm32/stm32f767-atk-apollo/.cproject
bsp/stm32/stm32f767-atk-apollo/.cproject
+48
-2
bsp/stm32/stm32l475-atk-pandora/.cproject
bsp/stm32/stm32l475-atk-pandora/.cproject
+48
-2
tools/eclipse.py
tools/eclipse.py
+52
-40
未找到文件。
bsp/stm32/stm32f103-dofly-M3S/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f103-yf-ufun/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f401-st-nucleo/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f405-smdz-breadfruit/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f407-atk-explorer/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f411-st-nucleo/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f429-atk-apollo/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f429-fire-challenger/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32f767-atk-apollo/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
bsp/stm32/stm32l475-atk-pandora/.cproject
浏览文件 @
10d480ee
此差异已折叠。
点击以展开。
tools/eclipse.py
浏览文件 @
10d480ee
...
...
@@ -20,6 +20,10 @@ from utils import xml_indent
import
xml.etree.ElementTree
as
etree
from
xml.etree.ElementTree
import
SubElement
from
building
import
*
MODULE_VER_NUM
=
0
source_pattern
=
[
'*.c'
,
'*.cpp'
,
'*.cxx'
,
'*.s'
,
'*.S'
,
'*.asm'
]
def
OSPath
(
path
):
...
...
@@ -134,57 +138,66 @@ def IsRttEclipsePathFormat(path):
return
True
else
:
return
False
def
IsCppProject
():
return
GetDepend
(
'RT_USING_CPLUSPLUS'
)
def
HandleToolOption
(
tools
,
env
,
project
,
reset
):
is_cpp_prj
=
IsCppProject
()
BSP_ROOT
=
os
.
path
.
abspath
(
env
[
'BSP_ROOT'
])
CPPDEFINES
=
project
[
'CPPDEFINES'
]
paths
=
[
ConverToRttEclipsePathFormat
(
RelativeProjectPath
(
env
,
os
.
path
.
normpath
(
i
)).
replace
(
'
\\
'
,
'/'
))
for
i
in
project
[
'CPPPATH'
]]
compile_include_paths_option
=
None
compile_include_files_option
=
None
compile_defs_option
=
None
compile_include_paths_option
s
=
[]
compile_include_files_option
s
=
[]
compile_defs_option
s
=
[]
linker_scriptfile_option
=
None
linker_script_option
=
None
linker_nostart_option
=
None
linker_libs_option
=
None
linker_paths_option
=
None
linker_newlib_nano_option
=
None
for
tool
in
tools
:
if
tool
.
get
(
'id'
).
find
(
'c
.c
ompile'
)
!=
1
:
if
tool
.
get
(
'id'
).
find
(
'compile'
)
!=
1
:
options
=
tool
.
findall
(
'option'
)
# find all compile options
for
option
in
options
:
if
option
.
get
(
'id'
).
find
(
'c
.compiler.include.paths'
)
!=
-
1
or
option
.
get
(
'id'
).
find
(
'c.
compiler.option.includepaths'
)
!=
-
1
:
compile_include_paths_option
=
option
elif
option
.
get
(
'id'
).
find
(
'c
.compiler.include.files'
)
!=
-
1
or
option
.
get
(
'id'
).
find
(
'c.
compiler.option.includefiles'
)
!=
-
1
:
compile_include_files_option
=
option
elif
option
.
get
(
'id'
).
find
(
'c
.compiler.defs'
)
!=
-
1
or
option
.
get
(
'id'
).
find
(
'c.
compiler.option.definedsymbols'
)
!=
-
1
:
compile_defs_option
=
option
if
tool
.
get
(
'id'
).
find
(
'
c.
linker'
)
!=
-
1
:
if
option
.
get
(
'id'
).
find
(
'c
ompiler.include.paths'
)
!=
-
1
or
option
.
get
(
'id'
).
find
(
'
compiler.option.includepaths'
)
!=
-
1
:
compile_include_paths_option
s
+=
[
option
]
elif
option
.
get
(
'id'
).
find
(
'c
ompiler.include.files'
)
!=
-
1
or
option
.
get
(
'id'
).
find
(
'
compiler.option.includefiles'
)
!=
-
1
:
compile_include_files_option
s
+=
[
option
]
elif
option
.
get
(
'id'
).
find
(
'c
ompiler.defs'
)
!=
-
1
or
option
.
get
(
'id'
).
find
(
'
compiler.option.definedsymbols'
)
!=
-
1
:
compile_defs_option
s
+=
[
option
]
if
tool
.
get
(
'id'
).
find
(
'linker'
)
!=
-
1
:
options
=
tool
.
findall
(
'option'
)
# find all linker options
for
option
in
options
:
if
option
.
get
(
'id'
).
find
(
'c.linker.scriptfile'
)
!=
-
1
:
# the project type and option type must equal
if
is_cpp_prj
!=
(
option
.
get
(
'id'
).
find
(
'cpp.linker'
)
!=
-
1
):
continue
if
option
.
get
(
'id'
).
find
(
'linker.scriptfile'
)
!=
-
1
:
linker_scriptfile_option
=
option
elif
option
.
get
(
'id'
).
find
(
'
c.
linker.option.script'
)
!=
-
1
:
elif
option
.
get
(
'id'
).
find
(
'linker.option.script'
)
!=
-
1
:
linker_script_option
=
option
elif
option
.
get
(
'id'
).
find
(
'
c.
linker.nostart'
)
!=
-
1
:
elif
option
.
get
(
'id'
).
find
(
'linker.nostart'
)
!=
-
1
:
linker_nostart_option
=
option
elif
option
.
get
(
'id'
).
find
(
'
c.
linker.libs'
)
!=
-
1
and
env
.
has_key
(
'LIBS'
):
elif
option
.
get
(
'id'
).
find
(
'linker.libs'
)
!=
-
1
and
env
.
has_key
(
'LIBS'
):
linker_libs_option
=
option
elif
option
.
get
(
'id'
).
find
(
'
c.
linker.paths'
)
!=
-
1
and
env
.
has_key
(
'LIBPATH'
):
elif
option
.
get
(
'id'
).
find
(
'linker.paths'
)
!=
-
1
and
env
.
has_key
(
'LIBPATH'
):
linker_paths_option
=
option
elif
option
.
get
(
'id'
).
find
(
'
c.
linker.usenewlibnano'
)
!=
-
1
:
elif
option
.
get
(
'id'
).
find
(
'linker.usenewlibnano'
)
!=
-
1
:
linker_newlib_nano_option
=
option
# change the inclue path
if
compile_include_paths_option
is
not
None
:
option
=
compile_include_paths_option
for
option
in
compile_include_paths_options
:
# find all of paths in this project
include_paths
=
option
.
findall
(
'listOptionValue'
)
for
item
in
include_paths
:
...
...
@@ -196,8 +209,7 @@ def HandleToolOption(tools, env, project, reset):
for
item
in
paths
:
SubElement
(
option
,
'listOptionValue'
,
{
'builtIn'
:
'false'
,
'value'
:
item
})
# change the inclue files (default) or definitions
if
compile_include_files_option
is
not
None
:
option
=
compile_include_files_option
for
option
in
compile_include_files_options
:
# add '_REENT_SMALL' to CPPDEFINES when --specs=nano.specs has select
if
linker_newlib_nano_option
is
not
None
and
linker_newlib_nano_option
.
get
(
'value'
)
==
'true'
and
'_REENT_SMALL'
not
in
CPPDEFINES
:
CPPDEFINES
+=
[
'_REENT_SMALL'
]
...
...
@@ -227,25 +239,25 @@ def HandleToolOption(tools, env, project, reset):
break
if
find_ok
is
False
:
SubElement
(
option
,
'listOptionValue'
,
{
'builtIn'
:
'false'
,
'value'
:
rtt_pre_inc_item
})
elif
compile_defs_option
is
not
None
:
option
=
compile_defs_option
defs
=
option
.
findall
(
'listOptionValue'
)
project_defs
=
[]
for
item
in
defs
:
if
reset
is
True
:
# clean all old configuration
option
.
remove
(
item
)
if
len
(
compile_include_files_options
)
==
0
:
for
option
in
compile_defs_options
:
defs
=
option
.
findall
(
'listOptionValue'
)
project_defs
=
[]
for
item
in
defs
:
if
reset
is
True
:
# clean all old configuration
option
.
remove
(
item
)
else
:
project_defs
+=
[
item
.
get
(
'value'
)]
if
len
(
project_defs
)
>
0
:
cproject_defs
=
set
(
CPPDEFINES
)
-
set
(
project_defs
)
else
:
project_defs
+=
[
item
.
get
(
'value'
)]
if
len
(
project_defs
)
>
0
:
cproject_defs
=
set
(
CPPDEFINES
)
-
set
(
project_defs
)
else
:
cproject_defs
=
CPPDEFINES
cproject_defs
=
CPPDEFINES
# print('c.compiler.defs')
cproject_defs
=
sorted
(
cproject_defs
)
for
item
in
cproject_defs
:
SubElement
(
option
,
'listOptionValue'
,
{
'builtIn'
:
'false'
,
'value'
:
item
})
# print('c.compiler.defs')
cproject_defs
=
sorted
(
cproject_defs
)
for
item
in
cproject_defs
:
SubElement
(
option
,
'listOptionValue'
,
{
'builtIn'
:
'false'
,
'value'
:
item
})
# update linker script config
if
linker_scriptfile_option
is
not
None
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录