I am trying to use vTaskList function to monitor tasks being used. In order to use vTaskList, I configure the macro below.
#define configUSE_TRACE_FACILITY 1
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
and below is task code to display task list.
void TASK_LIST()
{
signed char pWriteBuffer[2048];
for(;;)
{
vTaskList(pWriteBuffer);
printf("task_name task_state priority stack tasK_num\n");
printf("%s\n", pWriteBuffer);
}
vTaskDelete(NULL);
return;
}
However, the error just showed up for undefined reference
What caused this error?
Thank you.
Ps. For my original situation, there is no macro for configUSE_STATS_FORMATTING_FUNCTIONS in FreeRTOSConfig.h. so I add it manually.