2023-12-17 12:02 PM
Hi
I have working TraceX on Nucleo STM32U5A5 (as per MOOC TraceX section) as long the TrackX buffer (64K) does not get full. In event it get full, it leads to this error: "Unable to Read Event - Possible Trace File Truncation". I even put notify when the buffer is full which disables logging but it does not work. So I unable to use the Azure RTOS TraceX app since it seems to be guesswork when it going to get full without issue. I have posted a question to Microsoft but no answer for two weeks so far.
//Filter out certain events
// See https://learn.microsoft.com/en-us/azure/rtos/tracex/chapter5 for list of filter
ret = tx_trace_buffer_full_notify(my_trace_is_full); // Mitigate transacted issue when overflowed.
ret = tx_trace_event_filter(TX_TRACE_TIMER_EVENTS); // filter out unneeded item.
// enable trace.
ret = tx_trace_enable(&tracex_buffer,TRACEX_BUFFER_SIZE,30);
.....
void my_trace_is_full(void *trace_buffer_start)
{
tx_trace_disable(); // Stop collecting data
}