1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

FreeRTOS Debug, Utility系のTips

Posted at

概要

FreeRTOSのDebug, Utility系のTipsのまとめ
逐次追記、、予定

タスク情報関連

Task名の取得

void GetTaskStatus( const TaskHandle_t xHandle, TaskStatus_t* xTaskDetails )
{
    //TaskHandle_t xHandle;
    //TaskStatus_t xTaskDetails;

    /* Obtain the handle of a task from its name. */
    //xHandle = xTaskGetHandle( "Task_Name" );

    /* Check the handle is not NULL. */
    configASSERT( xHandle );

    /* Use the handle to obtain further information about the task. */
    vTaskGetTaskInfo( /* The handle of the task being queried. */
                      xHandle,
                      /* The TaskStatus_t structure to complete with information on xHandle. */
                      xTaskDetails,
                      /* Include the stack high water mark value in the TaskStatus_t
                      structure. */
                      pdTRUE,
                      /* Include the task state in the TaskStatus_t structure. */
                      eInvalid );
}
const char* GetTaskName( const TaskHandle_t xHandle)
{
	TaskStatus_t xTaskDetails;
	GetTaskStatus(xHandle, &xTaskDetails);
	return xTaskDetails.pcTaskName;
}

// 使いたい場所で
// ex. printf("%s", GetTaskName(handle));

Tracealyzer

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?