cancel
Showing results for 
Search instead for 
Did you mean: 

Trace Hook Macros in Azure RTOS ThreadX

MStew.1
Associate III

Hello,

I worked until now with FreeRTOS. And in FreeRTOS there are Trace Hook Macros.

Is there an equivalent on Azure RTOS ThreadX?

Trace hook macros on FreeRTOS are a very powerful feature that permit you to collect data on how your embedded application is behaving.

Key points of interest within the FreeRTOS source code contain empty macros that an application can re-define for the purpose of providing application specific trace facilities. The application need only implement those macros of particular interest - with unused macros remaining empty and therefore not impacting the application timing

Specifically I am looking for:

traceTASK_SWITCHED_IN()

Called after a task has been selected to run. At this point pxCurrentTCB contains the handle of the task about to enter the Running state.

traceTASK_SWITCHED_OUT()

Called before a new task is selected to run. At this point pxCurrentTCB contains the handle of the task about to leave the Running state.

I looked at the Azure RTOS documentation but could not find this similar feature?

1 ACCEPTED SOLUTION

Accepted Solutions
Haithem Rahmani
ST Employee

Hi @MStew.1​ 

In ThreadX there is the following API that offers similar functionality.

https://learn.microsoft.com/en-us/azure/rtos/threadx/chapter4#tx_thread_entry_exit_notify

regards

Haithem.

View solution in original post

2 REPLIES 2
Haithem Rahmani
ST Employee

Hi @MStew.1​ 

In ThreadX there is the following API that offers similar functionality.

https://learn.microsoft.com/en-us/azure/rtos/threadx/chapter4#tx_thread_entry_exit_notify

regards

Haithem.

Thank you very much, I will look into this API