Tracealyzer for FreeRTOS is a sophisticated tool for tracing and visualization of FreeRTOS based systems.
Tracealyzer gives an unprecedented insight into the runtime behavior, which speeds up debugging, validation and performance optimization. Issues that otherwise may require many hours, days or even weeks to solve, can with Tracealyzer be understood quickly. This saves you many hours of frustrating trial-and-error troubleshooting. With Tracealyzer you see what is really going on in your system!
"Tracealyzer has always offered exceptional value to our global community of users by giving engineers direct insight into how their applications are executing.
This information is invaluable when both optimizing and debugging FreeRTOS applications."
- Richard Barry, FreeRTOS founder.
Tracealyzer provides more than 25 interconnected views of the runtime behavior, including task scheduling and timing, interrupts, interaction between tasks, as well as User Events that you may log from your application code. Tracealyzer can be used side-by-side with a traditional debugger and complements the debugger view with a higher level perspective, ideal for understanding the complex RTOS-related errors, where a classic debugger is not sufficient.
Tracealyzer does not require additional tracing hardware, which means that it can be used in deployed systems to capture rare errors which otherwise are hard to reproduce. Tracealyzer supports trace streaming via leading debug probes, and since highly configurable also allows for streaming via other interfaces, such as USB, TCP/IP or any other interface you might have available.
Tracealyzer for FreeRTOS consists of two main components:
Tracealyzer provides several graphical views which gives different perspectives of the runtime behavior, based on a recording of task scheduling and FreeRTOS kernel service calls. You may also choose to include interrupt service routines (ISRs) as well as application events by adding own calls to the trace recorder library. Application events, or user events, contain a custom text label and optionally also associated data - integers or floating point values.
This section is intended to give a quick overview of the features and how this tool can be used. More detailed information on the various features are available in the later sections.
Also make sure to have a look at the Getting Started page on our website, featuring video tutorials, articles and several examples of how Tracealyzer is used in practice, including real-world cases.
The main trace view provides all recorded information on a vertical time line, including focusing on the execution of FreeRTOS task and traced interrupt handlers. This view is complemented by some 25 additional views providing high level overviews or focused views from different perspectives.
Kernel events such as calls to kernel services and User Events are displayed as text labels on the right side of the scheduling trace. The labels are color coded depending on the type and status of the operation (red for blocking, green for resume, yellow for user events etc.).
Below follows a few examples of other views and dialogs which complements the trace view. There are over 25 views in total. All views are connected to the main trace window or another relevant view, which allows you to switch perspectives without losing focus.
To locate a particular task or interrupt in the trace view, open the Finder (Shortcut Key "Ctrl-F"). In the Finder dialog, you can also specify filters on timing properties such as response time, in order to quickly find the extreme cases.
The Object History View allows you to track a particular kernel object, in this case a message queue. You can follow a message from send to receive, or a semaphore signal. You can see the ownership of mutexes.
Double clicking in this view highlights the event in the main trace view.
The CPU Load Graph displays the CPU usage per task and interrupt over time. This can be zoomed separately of the main trace view, and can also be used to navigate the trace view by double clicking in the graph.
Make sure to visit the Getting Started page on our website, that provide multiple examples in blog, article and video format.
The general uses of Tracealyzer include:
Tracealyzer gives you better possibilities for finding out what is really going on in your system. For instance, if a task never gets to execute you can see why this is the case. Perhaps higher priority tasks are using all CPU time, so that the scheduler never lets the lower priority tasks execute. This is revealed by the CPU Load Graph.
Another reason for a "missing task" might be that the triggering message/semaphore signal is never sent, or sent to the wrong destination, or that the timeout is too short so that the send fails. The Communication Flow graph shows an overview of task interactions. The Finder can be used to find individual events, e.g., a message sent from a particular task to a particular message queue, and has a filter which can be used to quickly find operations which failed due to timeouts.
If the system performance is too slow, or if you simply want to measure the performance, you can study the Statistics Report for a overview of performance metrics like task response times and average CPU usage. Moreover, the Actor Instance Graph reveals the instances with high executions time and/or high response times.
All views are interconnected in clever ways, allowing you to navigate between views with ease and see the data from different perspectives. For instance, if you find a high response time in the Actor Instance Graph, you can simply click on the data point to focus the main Trace View on this point and see the cause - it could be that the actual execution time of the task is unusually long, but could also be caused by interference from other tasks or interrupts. This allows you to focus your optimization efforts on the true cause, which can save you a lot of time.
Running Tracealyzer requires a development PC running Microsoft Windows with .NET Framework 4 or later installed, or Linux with Mono installed (included in many distributions). Mono is also available for other platforms, including Mac OS, but this is not guaranteed to work as intended. To record a trace, you also need: