How to use TraceX with a small buffer

134 Views Asked by At

I am developing a microcontroller application using the Azure RTOS ThreadX, and I wanted to use TraceX to publish the results in my master's thesis. The problem is that my application is running on a Cortex M0+ and only have 20k of RAM. From this 20k, I can only allocate 10k to the TraceX buffer.

I can only think of two ways of solving the problem:

  • The TraceX only save, for example, thread switch and event flag signals;
  • Be able to put a breakpoint before TraceX starts overwriting and save the buffer, and in the end put it together;

Someone had the same problem? How do you solve it?

1

There are 1 best solutions below

0
On

Both options are possible:

  • To filter messages please look at the documentation here: https://learn.microsoft.com/en-us/azure/rtos/tracex/chapter5#tx_trace_event_filter
  • The trace mechanisms is based on a few macros. You can look at the code in the macro TX_TRACE_IN_LINE_INSERT for the details. You may need to make this macro into a function in order to be able to put a breakpoint in your toolchain. These are implemented as macros for performance and footprint reasons.