FreeRTOS命令注册无法执行问题 #85
-
letter shell我在FreeRTOS运行使用以下注册方式注册获取系统状态,总是无法正常运行。 ``SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), ps, system_view_state, Show Task State); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
命令注册是没问题的,不知道你这个函数的实现是什么样的,给你一个我实现的命令,可以参考下 /**
* @brief 打印任务列表
*
*/
void showTaskList(void)
{
#if configUSE_TRACE_FACILITY == 1 && configUSE_STATS_FORMATTING_FUNCTIONS == 1
char *buf = pvPortMalloc(2048);
if (buf != NULL)
{
logPrintln("Name State Pri Stack Num");
logPrintln("*******************************************");
vTaskList(buf);
logPrintln("%s", buf);
vPortFree(buf);
}
#else
logPrintln("fuction vTaskList is disabled");
#endif
}
SHELL_EXPORT_CMD(
SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_DISABLE_RETURN,
ps, showTaskList, show task list); |
Beta Was this translation helpful? Give feedback.
命令注册是没问题的,不知道你这个函数的实现是什么样的,给你一个我实现的命令,可以参考下