Tracealyzer is a sophisticated tool for tracing and visualization of RTOS-based systems. Tracealyzer gives an unprecedented insight into the runtime behavior of STM32 firmware, which speeds up debugging, validation and performance optimization. Tracealyzer provides over 25 graphical views showing different aspects of the real-time software behavior, making it easier reveal errors and bottlenecks. The views are interconnected in clever ways and very intuitive to use.
For general information about Tracealyzer, check the Getting Started with video tutorials, articles and examples of how Tracealyzer can be used.
This page explains how to get started with Tracealyzer on STM32 devices, assuming you use an RTOS that is supported by Percepio’s trace recorder library, such as FreeRTOS, SafeRTOS or Micrium µC/OS-III. Tracealyzer also supports other RTOSes like Keil RTX5, ThreadX, VxWorks, Intervalzero RTX64 and Linux using other trace recording libraries. In those cases, please refer to the User Manual of the respective Tracealyzer version.
Tracealyzer relies on a software library that automatically records events from the RTOS kernel and also allows for logging your own events. No special debug/trace hardware is therefore required. The recorder library is highly optimized and the performance penalty is usually very small, in the range of a few percent.
Let’s take FreeRTOS as example. To integrate the trace recorder library in your FreeRTOS build, follow this step-by-step guide and select the ARM Cortex-M port. Make sure you have FreeRTOS v7.3 or later. The process is very similar for SafeRTOS or Micrium µC/OS-III, but please refer to the User Manual of the respective Tracealyzer version.
The default mode of the recorder is “Snapshot” tracing, using a RAM buffer to hold the trace, but Tracealyzer also supports continuous trace streaming that allows for very long traces. The streaming can be customized for all sorts of communication interfaces, via the concept of “stream ports”. The recorder library includes such stream ports for SEGGER J-Link and for USB CDC on STM32 devices.
Note that if using an Eclipse-based IDE like System Workbench for STM32 (SW4STM32) our convenient Eclipse plugin allows for using Tracealyzer in snapshot mode via the existing debug connection. That way, you can use any debug probe that is supported by your Eclipse IDE.
Also note that Tracealyzer supports the on-board ST-Link debug interfaces, if reprogrammed with J-Link firmware. This allows for both snapshot and streaming mode, just like the “real” J-Link probes but with lower performance than a standalone J-Link probe.