Skip to content

FreeRTOS命令注册无法执行问题 #85

Answered by NevermindZZT
bevis-wong asked this question in Q&A
Discussion options

You must be logged in to vote

命令注册是没问题的,不知道你这个函数的实现是什么样的,给你一个我实现的命令,可以参考下

/**
 * @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);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bevis-wong
Comment options

Answer selected by bevis-wong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants