2 of 2 people found this helpful
I'm assuming that you want something equivalent to vTaskGetRunTimeStats() in ThreadX. I don't think threadX has such an API for run time stats of a task. But they do have a TraceX plugin TRACEX | Real-Time System Events Analysis & Graphical View Tool which might serve your purpose.
I see how TraceX analyzes the data on a PC but there is no mention of how the on-device information is created. All I found are:
(from website) "TRACEX is designed to work with Express Logic’s THREADX RTOS, which constructs a database of system and application “events” on the target system during run-time"
(from user guide) "The user is responsible for transferring the trace buffer stored in RAM in the embedded target to a binary file on the host computer."
I do not see how the data is collected or where it is located, could you point me to where I can learn abotu this?
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
$(NAME)_COMPONENTS += test/TraceX
To extract the trace buffer, start your app in debug mode, pause execution of the program and dump memory address defined by the
To dump memory, use the Memory Browser window (Window->Show View->Memory Browser), type in the address and specify the size from
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.