嵌入式技术论坛
直播中

韩刚龙

7年用户 1011经验值
私信 关注
[经验]

finsh shell的激活过程分享

rtdeh.h 核心宏定义 和 结构体
//激活配置过程 潘多拉 LED 项目
.config L96 # Command shell
rtconfig.h L69 / Command shell /
从.config 配置 生成 rtconfig.h 配置
.config L96 --> rtconfig.h L69
其中 RT_USING_FINSH 配置 激活了以下文件中的功能
components/finsh/shell.c
components/finsh/cmd.c
components/finsh/cmd.c 中的生成了相应的finsh命令
FINSH_FUNCtiON_EXPORT(clear,clear the terminal screen);  //C style 新版本移除
MSH_CMD_EXPORT(clear,clear the terminal screen);
components/finsh/finsh_api.h定义了关键的函数原型
#define FINSH_FUNCTION_EXPORT(name, desc)
#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc)
#define FINSH_VAR_EXPORT(name, type, desc)
#define MSH_CMD_EXPORT(command, desc)
#define MSH_CMD_EXPORT_ALIAS(command, alias, desc)

更多回帖

发帖
×
20
完善资料,
赚取积分