Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
a64ec10e
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
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,发现更多精彩内容 >>
提交
a64ec10e
编写于
2月 27, 2013
作者:
P
prife
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
app module support for simlator, first version
上级
242574a3
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
64 addition
and
5 deletion
+64
-5
bsp/simulator/SConstruct
bsp/simulator/SConstruct
+39
-2
bsp/simulator/applications/SConscript
bsp/simulator/applications/SConscript
+2
-0
bsp/simulator/applications/dfs_win32.c
bsp/simulator/applications/dfs_win32.c
+8
-0
bsp/simulator/dummy.c
bsp/simulator/dummy.c
+4
-0
bsp/simulator/rtconfig.h
bsp/simulator/rtconfig.h
+3
-0
bsp/simulator/rtconfig.py
bsp/simulator/rtconfig.py
+3
-3
include/rtm.h
include/rtm.h
+5
-0
未找到文件。
bsp/simulator/SConstruct
浏览文件 @
a64ec10e
...
...
@@ -106,8 +106,45 @@ if GetDepend('RT_USING_RTGUI'):
if
GetDepend
(
'RT_USING_TC'
):
objs
=
objs
+
SConscript
(
RTT_ROOT
+
'/examples/kernel/SConscript'
,
variant_dir
=
'build/tc/kernel'
,
duplicate
=
0
)
# build program
program
=
env
.
Program
(
TARGET
,
objs
)
def
ObjRemove
(
objs
,
remove
):
for
item
in
objs
:
# print type(item), os.path.basename(str(item))
if
os
.
path
.
basename
(
str
(
item
))
in
remove
:
objs
.
remove
(
item
)
return
# build program -shared
if
GetDepend
(
'RT_USING_MODULE'
):
# Remove module.c in $RTT_ROOT/src
ObjRemove
(
objs
,
[
'module.obj'
,
'module.o'
])
AddOption
(
'--def'
,
dest
=
'def'
,
nargs
=
1
,
type
=
'string'
,
action
=
'store'
,
metavar
=
'DIR'
,
help
=
'installation prefix'
)
res
=
GetOption
(
'def'
)
if
res
is
None
:
program
=
env
.
Program
(
TARGET
,
objs
)
elif
res
==
'update'
:
env
[
'LINKFLAGS'
]
=
rtconfig
.
DEFFILE_LFLAGS
env
.
SharedLibrary
(
"rtthread.dll"
,
objs
)
program
=
''
elif
res
==
'yes'
:
if
rtconfig
.
PLATFORM
==
'cl'
:
objs
+=
[
'rtthread.def'
]
env
.
SharedLibrary
(
"rtthread.dll"
,
objs
)
program
=
env
.
Program
(
TARGET
,
'dummy.c'
,
LIBS
=
'rtthread'
,
LIBPATH
=
'.'
)
else
:
print
"bad arguments, you can use the following command:"
print
"
\t
--def=update to create .def"
print
"
\t
--def=yes to create final exe"
exit
()
else
:
# env.SharedLibrary("rtthread.dll", objs)
program
=
env
.
Program
(
TARGET
,
objs
)
# end building
EndBuilding
(
TARGET
,
program
)
bsp/simulator/applications/SConscript
浏览文件 @
a64ec10e
...
...
@@ -6,6 +6,8 @@ src = Glob('*.c')
# remove no need file.
if
GetDepend
(
'RT_USING_DFS_WINSHAREDIR'
)
==
False
:
SrcRemove
(
src
,
'dfs_win32.c'
)
if
GetDepend
(
'RT_USING_MODULE'
)
==
False
:
SrcRemove
(
src
,
[
'module_win32.c'
])
CPPPATH
=
[
cwd
,
str
(
Dir
(
'#'
))]
group
=
DefineGroup
(
'Applications'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
)
...
...
bsp/simulator/applications/dfs_win32.c
浏览文件 @
a64ec10e
...
...
@@ -148,6 +148,14 @@ static char *winpath_dirdup(char *des, const char *src)
return
path
;
}
/* This function can convert the path in rt-thread/dfs to the path in windows */
char
*
dfs_win32_dirdup
(
char
*
path
)
{
char
*
file_path
;
file_path
=
winpath_dirdup
(
WIN32_DIRDISK_ROOT
,
path
);
return
file_path
;
}
static
int
dfs_win32_open
(
struct
dfs_fd
*
file
)
{
int
fd
;
...
...
bsp/simulator/dummy.c
0 → 100644
浏览文件 @
a64ec10e
int
dummy_main
()
{
return
0
;
}
bsp/simulator/rtconfig.h
浏览文件 @
a64ec10e
...
...
@@ -99,6 +99,9 @@
/* SECTION: component options */
#define RT_USING_COMPONENTS_INIT
/* SECTION: APP MODULE */
#define RT_USING_MODULE
/* SECTION: MTD interface options */
/* using mtd nand flash */
#define RT_USING_MTD_NAND
...
...
bsp/simulator/rtconfig.py
浏览文件 @
a64ec10e
...
...
@@ -71,10 +71,10 @@ elif PLATFORM == 'mingw':
DEVICE
=
' -ffunction-sections -fdata-sections'
DEVICE
=
' '
CFLAGS
=
' -Wl,--output-def '
CFLAGS
=
DEVICE
AFLAGS
=
' -c'
+
DEVICE
+
' -x assembler-with-cpp'
#LFLAGS = DEVICE + ' -Wl,-Map=rtthread-win32.map -T mingw.ld
'
LFLAGS
=
DEVICE
+
' -Wl,-Map=rtthread-win32.map -
-gc-sections,--whole-archive -
T mingw.ld '
DEFFILE_LFLAGS
=
DEVICE
+
' -Wl,-Map=rtthread-win32.map,--output-def,rtthread.def -T mingw.ld
'
LFLAGS
=
DEVICE
+
' -Wl,-Map=rtthread-win32.map -T mingw.ld '
CPATH
=
''
LPATH
=
''
...
...
include/rtm.h
浏览文件 @
a64ec10e
...
...
@@ -21,6 +21,9 @@ struct rt_module_symtab
const
char
*
name
;
};
#if defined(_MSC_VER) || defined(__MINGW32__)
#define RTM_EXPORT(symbol)
#else
#define RTM_EXPORT(symbol) \
const char __rtmsym_##symbol##_name[] = #symbol; \
const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
...
...
@@ -28,6 +31,8 @@ const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \
(void *)&symbol, \
__rtmsym_##symbol##_name \
};
#endif
#else
#define RTM_EXPORT(symbol)
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录