zephyr-rtoseclipse-tracecompass

Zephyr tracing with CTF format and TraceCompass - Parsing errors


when enabling the tracing feature of Zephyr-RTOS, specifically using the default CTF configuration (common trace format), (using CONFIG_TRACING and CONFIG_TRACING_CTF), the generated trace is not compatible with TraceCompass. I've attempted creating a new folder and placed the generated trace file, which was renamed to "channel0_0", along with the TSDL-file (simply called metadata) in there. I'm getting a parsing error "Error initializing trace:TmfTraceException: Failed to get CTF iterator".

I've attempted getting the CTF file through UART, using the trace_capture_uart.py script from Zephyr, and also by retrieving the CTF file from a RAM buffer, where I assume the file integrity should be intact. Has anyone gotten the CTF parsing working with TraceCompass? I'm using Zephyr version 3.5 with TraceCompass 9.3.0


Solution

  • Basically, the trace file (channel0_0) should start at the beginning of a CTF packet (which begins with the timestamp) and accordingly end at the end of a CTF packet. This requires some editing of the file, Zephyr doesn't automatically provide an integral CTF file.