Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2345VOR
rt-thread
提交
8a1e6c01
R
rt-thread
项目概览
2345VOR
/
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,发现更多精彩内容 >>
提交
8a1e6c01
编写于
8月 23, 2021
作者:
马
马志远
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable FINSH_FUNCTION_EXPORT
上级
221da7f4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
18 addition
and
23 deletion
+18
-23
bsp/nuvoton/libraries/m031/rtt_port/drv_common.c
bsp/nuvoton/libraries/m031/rtt_port/drv_common.c
+1
-1
bsp/nuvoton/libraries/m2354/rtt_port/drv_common.c
bsp/nuvoton/libraries/m2354/rtt_port/drv_common.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_common.c
bsp/stm32/libraries/HAL_Drivers/drv_common.c
+1
-1
bsp/w60x/drivers/board.c
bsp/w60x/drivers/board.c
+1
-1
components/finsh/finsh.h
components/finsh/finsh.h
+10
-12
components/finsh/msh.c
components/finsh/msh.c
+4
-7
未找到文件。
bsp/nuvoton/libraries/m031/rtt_port/drv_common.c
浏览文件 @
8a1e6c01
...
...
@@ -138,5 +138,5 @@ static void reboot(uint8_t argc, char **argv)
{
rt_hw_cpu_reset
();
}
FINSH_FUNCTION_EXPORT_ALIAS
(
reboot
,
__cmd_
reboot
,
Reboot
System
);
MSH_CMD_EXPORT
(
reboot
,
Reboot
System
);
#endif
/* RT_USING_FINSH */
bsp/nuvoton/libraries/m2354/rtt_port/drv_common.c
浏览文件 @
8a1e6c01
...
...
@@ -138,6 +138,6 @@ static void reboot(uint8_t argc, char **argv)
{
rt_hw_cpu_reset
();
}
FINSH_FUNCTION_EXPORT_ALIAS
(
reboot
,
__cmd_
reboot
,
Reboot
System
);
MSH_CMD_EXPORT
(
reboot
,
Reboot
System
);
#endif
/* RT_USING_FINSH */
bsp/stm32/libraries/HAL_Drivers/drv_common.c
浏览文件 @
8a1e6c01
...
...
@@ -25,7 +25,7 @@ static void reboot(uint8_t argc, char **argv)
{
rt_hw_cpu_reset
();
}
FINSH_FUNCTION_EXPORT_ALIAS
(
reboot
,
__cmd_
reboot
,
Reboot
System
);
MSH_CMD_EXPORT
(
reboot
,
Reboot
System
);
#endif
/* RT_USING_FINSH */
/* SysTick configuration */
...
...
bsp/w60x/drivers/board.c
浏览文件 @
8a1e6c01
...
...
@@ -255,7 +255,7 @@ static void reboot(uint8_t argc, char **argv)
{
rt_hw_cpu_reset
();
}
FINSH_FUNCTION_EXPORT_ALIAS
(
reboot
,
__cmd_
reboot
,
Reboot
System
);
MSH_CMD_EXPORT
(
reboot
,
Reboot
System
);
#endif
/* RT_USING_FINSH */
/*@}*/
components/finsh/finsh.h
浏览文件 @
8a1e6c01
...
...
@@ -23,7 +23,7 @@ typedef long (*syscall_func)(void);
#endif
#ifdef FINSH_USING_DESCRIPTION
#ifdef _MSC_VER
#define
FIN
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
#define
M
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] = #cmd; \
const char __fsym_##cmd##_desc[] = #desc; \
__declspec(allocate("FSymTab$f")) \
...
...
@@ -36,7 +36,7 @@ typedef long (*syscall_func)(void);
#pragma comment(linker, "/merge:FSymTab=mytext")
#elif defined(__TI_COMPILER_VERSION__)
#define
FIN
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
#define
M
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
__TI_FINSH_EXPORT_FUNCTION(__fsym_##cmd); \
const char __fsym_##cmd##_name[] = #cmd; \
const char __fsym_##cmd##_desc[] = #desc; \
...
...
@@ -48,7 +48,7 @@ typedef long (*syscall_func)(void);
};
#else
#define
FIN
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
#define
M
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] RT_SECTION(".rodata.name") = #cmd; \
const char __fsym_##cmd##_desc[] RT_SECTION(".rodata.name") = #desc; \
RT_USED const struct finsh_syscall __fsym_##cmd RT_SECTION("FSymTab")= \
...
...
@@ -61,7 +61,7 @@ typedef long (*syscall_func)(void);
#endif
#else
#ifdef _MSC_VER
#define
FIN
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
#define
M
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] = #cmd; \
__declspec(allocate("FSymTab$f")) \
const struct finsh_syscall __fsym_##cmd = \
...
...
@@ -72,7 +72,7 @@ typedef long (*syscall_func)(void);
#pragma comment(linker, "/merge:FSymTab=mytext")
#elif defined(__TI_COMPILER_VERSION__)
#define
FIN
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
#define
M
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
__TI_FINSH_EXPORT_FUNCTION(__fsym_##cmd); \
const char __fsym_##cmd##_name[] = #cmd; \
const struct finsh_syscall __fsym_##cmd = \
...
...
@@ -82,7 +82,7 @@ typedef long (*syscall_func)(void);
};
#else
#define
FIN
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
#define
M
SH_FUNCTION_EXPORT_CMD(name, cmd, desc) \
const char __fsym_##cmd##_name[] = #cmd; \
RT_USED const struct finsh_syscall __fsym_##cmd RT_SECTION("FSymTab")= \
{ \
...
...
@@ -102,8 +102,7 @@ typedef long (*syscall_func)(void);
* @param name the name of function.
* @param desc the description of function, which will show in help.
*/
#define FINSH_FUNCTION_EXPORT(name, desc) \
FINSH_FUNCTION_EXPORT_CMD(name, name, desc)
#define FINSH_FUNCTION_EXPORT(name, desc)
/**
* @ingroup finsh
...
...
@@ -114,8 +113,7 @@ typedef long (*syscall_func)(void);
* @param alias the alias name of function.
* @param desc the description of function, which will show in help.
*/
#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc) \
FINSH_FUNCTION_EXPORT_CMD(name, alias, desc)
#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc)
/**
* @ingroup finsh
...
...
@@ -126,9 +124,9 @@ typedef long (*syscall_func)(void);
* @param desc the description of command, which will show in help.
*/
#define MSH_CMD_EXPORT(command, desc) \
FINSH_FUNCTION_EXPORT_CMD(command, __cmd_##
command, desc)
MSH_FUNCTION_EXPORT_CMD(command,
command, desc)
#define MSH_CMD_EXPORT_ALIAS(command, alias, desc) \
FINSH_FUNCTION_EXPORT_ALIAS(command, __cmd_##
alias, desc)
MSH_FUNCTION_EXPORT_CMD(command,
alias, desc)
/* system call table */
struct
finsh_syscall
...
...
components/finsh/msh.c
浏览文件 @
8a1e6c01
...
...
@@ -41,11 +41,10 @@ int msh_help(int argc, char **argv)
index
<
_syscall_table_end
;
FINSH_NEXT_SYSCALL
(
index
))
{
if
(
strncmp
(
index
->
name
,
"__cmd_"
,
6
)
!=
0
)
continue
;
#if defined(FINSH_USING_DESCRIPTION) && defined(FINSH_USING_SYMTAB)
rt_kprintf
(
"%-16s - %s
\n
"
,
&
index
->
name
[
6
]
,
index
->
desc
);
rt_kprintf
(
"%-16s - %s
\n
"
,
index
->
name
,
index
->
desc
);
#else
rt_kprintf
(
"%s "
,
&
index
->
name
[
6
]
);
rt_kprintf
(
"%s "
,
index
->
name
);
#endif
}
}
...
...
@@ -174,10 +173,8 @@ static cmd_function_t msh_get_cmd(char *cmd, int size)
index
<
_syscall_table_end
;
FINSH_NEXT_SYSCALL
(
index
))
{
if
(
strncmp
(
index
->
name
,
"__cmd_"
,
6
)
!=
0
)
continue
;
if
(
strncmp
(
&
index
->
name
[
6
],
cmd
,
size
)
==
0
&&
index
->
name
[
6
+
size
]
==
'\0'
)
if
(
strncmp
(
index
->
name
,
cmd
,
size
)
==
0
&&
index
->
name
[
size
]
==
'\0'
)
{
cmd_func
=
(
cmd_function_t
)
index
->
func
;
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录