When building embedded software using an RTOS, efficient development and debugging requires a good understanding of the runtime interactions, timing and resource usage of your tasks and interrupts.
Tracealyzer provides more than 30 graphical views of the real-time behavior of RTOS systems, making it easier reveal errors and performance bottlenecks. Tracealyzer supports FreeRTOS, SafeRTOS, Micrium µC/OS-III, ThreadX and several other operating systems.
Make sure to check out our RTOS Debugging Portal where we share concrete examples of how users have applied Tracealyzer on real issues.
Percepio provides an extension for Atmel Studio 7, Percepio Trace Exporter, found in Microchip Gallery. This allows for snapshot tracing using any debug probe supported by Atmel Studio and works with any Tracealyzer installation on your computer. The extension adds a new “Percepio” menu in Atmel Studio that allows you to start Tracealyzer from within Atmel Studio and export the trace data into Tracealyzer. It also establishes a connection between Atmel Studio and Tracealyzer, that allows for using the “Snapshot” button in Tracealyzer to save a snapshot and refresh the views. (The snapshot button is found in the upper part of the navigation bar, a round red button with a camera icon.)
Snapshot tracing means that Tracealyzer recorder library keeps the trace data in a target-side RAM buffer, typically in a ring-buffer configuration, which allows for saving “snapshots” of the latest trace data. For instance, if your system halts on a breakpoint in an error handler, you can then save a snapshot trace and see what was going on in your system just before this.
This approach has minimal hardware dependencies and can therefore be used on essentially any 32-bit processor. The snapshot mode is optimized for memory efficiency and saves the events as four-byte records, often using only one such record per event, including the timestamp. As a result, our demo application generates only about 18 KB/s of trace data in snapshot mode, less than 7 byte per event on average.
Continuous streaming trace is not yet possible via the Atmel Studio extension, but is possible in parallel with Atmel Studio using a J-Link or an Atmel SAM-ICE. Other streaming setups is also possible, e.g., via TCP/IP. Contact firstname.lastname@example.org for further information about this.
How to use it:
- Download and install Tracealyzer, if you don’t have this already.
- Enable tracing in your project, as described in the Tracealyzer user manual for your specific RTOS.
- Install the plugin, as instructed below. This will create a “Percepio” menu in your IDE.
- Start a debug session and run it, so a trace is recorded.
- In Tracealyzer, select the “Snapshot” option (i.e. the red button with a camera symbol). This saves a trace file and displays it in Tracealyzer.
If you prefer to save the trace from within your IDE, you can also select “Percepio” > “Save Snapshot Trace” in the menu. This also updates the Tracealyzer views.
Note: Although the target system must be halted when saving the trace data in snapshot mode, the plugin handle this for you automatically. If the target system is running when you save a snapshot trace, the plugin will halt the system, upload the data, and then resume execution again.
Make sure you are using Atmel Studio version 7. Older versions are not supported.
Visit Microchip Gallery, look for “Percepio Trace Exporter” and download the .vsix file.
Make sure Atmel Studio is closed and double-click on the .vsix file. Start Atmel Studio again.
For general information on how to get started with Tracealyzer, please check the User Manual, found in the Tracealyzer Help menu.
(Note that we also have an Eclipse plugin that works in the same way.)