WICED or ThreadX API for getting task stats?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NaFi_2915566
Level 3
Level 3
First like received First like given

Is there an API for getting task stats like run time percentage?  The information from tx_thread_info_get() seems to be more related to current status rather than past performance.  I am looking for something similar to FreeRTOS tx_thread_info_get().

0 Likes
1 Solution

Understand Azure RTOS TraceX | Microsoft Docs

You need to use WICED_ENABLE_TRACEX=1 in the make target or as a global defines. This will compile the traceX enabled version of the libraries.

Have this in the .mk file

ifdef WICED_ENABLE_TRACEX

$(NAME)_COMPONENTS += test/TraceX

endif

To extract the trace buffer, start your app in debug mode, pause execution of the program and dump memory address defined by the WICED_TRACEX_BUFFER_ADDRESS macro.

To dump memory, use the Memory Browser window (Window->Show View->Memory Browser), type in the address and specify the size from WICED_TRACEX_BUFFER_ADDRESS and WICED_TRACEX_BUFFER_SIZE macros, respectively.

Save the dump in Raw Binary format with the file extension of .trx and now you are ready to view the traces in the gui; which should give you the necessary stats you are looking for.

Please let me know if this is not clear. I will try to create a verbose document and upload in case this is not sufficient.

View solution in original post

3 Replies