1072 views|1 replies

227

Posts

0

Resources
The OP
 

Observability for FreeRTOS using Percepio's Tracealyzer and DevAlert! [Copy link]

Percepio is the company behind the famous Tracealyzer. Tracealyzer is a desktop application that allows embedded engineers to visually diagnose problems in their software through tracing. What is tracing? Tracing is a low-level logging mechanism that can be used to explain the state of a system during execution. Analyzing traces from microcontroller-based applications using FreeRTOS can save embedded engineers a lot of time and effort when troubleshooting unexpected behavior. To use this tool with FreeRTOS applications, a simple integration of the TraceRecorder library is required to capture the trace. Traces can be recorded and saved as snapshots during program execution, or streamed in real time.

After loading a trace, Tracealyzer can provide execution details with configurable views, such as program timeline, event log, CPU load graph, memory usage, task dependencies, and many other useful visualizations. These features help achieve observability. You can trace tasks as well as kernel API calls at a deep level in a FreeRTOS application. The following figure is a snapshot of Tracealyzer running on a laptop with a sample FreeRTOS trace loaded. Note the FreeRTOS API calls in the trace view panel, such as xQueueSend() and xQueueReceive(). In addition to code debugging, you can also see the CPU load graph associated with the trace sequence.

Tracealyzer with example FreeRTOS trace loaded

Tracealyzer can be used for development and testing of embedded applications or to triage issues encountered in the field. For more information on how to use the tool, visit Tracealyzer for FreeRTOS on the Percepio website. Additionally, follow the practical getting started guide to set up the TraceRecorder library with a FreeRTOS application.

In addition to Tracealyzer, Percepio also offers another cloud-based product, DevAlert. DevAlert complements Tracealyzer very well, with many features suitable for production use cases. From a different perspective of observability, the DevAlert service can be configured to capture specific diagnostics from a remote fleet of devices via a cloud connection. More importantly, you can define the specific data elements that are meaningful and the types of alerts to be issued. In addition, both device firmware and diagnostic data do not need to be sent directly to the DevAlert service, but are stored in your own cloud account (such as AWS S3).

Using separated storage addresses privacy and security concerns, as this data remains in the device manufacturer's account and is not uploaded to the Percepio service. Diagnostic data is accessible with a single click, thanks to the hybrid design employed by the desktop client DevAlertDispatcher. When a DevAlert dashboard link is triggered, the client downloads the requested data from a separate storage. The DevAlert service architecture diagram is shown below, showing an example of this separated storage paradigm.

DevAlert Architecture

Thanks to this architecture, many types of debug data are available using the relevant desktop tools. You can get a Tracealyzer trace to see the sequence of events that led to the detection of an exception. In addition, support for GDB crash dumps was recently added, as shown in the following screenshot.

GDB crash dump screenshot

You can use the regular source code debugger to analyze crashes and other exceptions in more detail, just as you would debug a local device. You can also add your own diagnostic payloads, viewer tools, and scripts if you have more specific needs.

The easiest way to get a deeper understanding of DevAlert's capabilities is to launch a sandbox environment, of which Percepio offers a free trial. The sandbox includes a FreeRTOS sample application running in the QEMU emulator as a virtual device connected to DevAlert.

First, sign up and log in to DevAlert, then click Activate Service in the console. In just a few steps, you'll access a virtual desktop in your browser that displays a simulated elevator project. The elevator controller in the example is a virtual device running a FreeRTOS application that has been configured to generate different types of alerts. To see what's happening in the controller at any given time, see Elevator Animation.

Elevator simulation project

You can browse the source code to see how to configure alerts based on the types of events you encounter in a running FreeRTOS application. We provide a set of scenarios that raise known issues to demonstrate the role of alerts. After executing the scenarios, return to the DevAlert console and click Dashboard. You can now see an overview of the issues, where the alerts are grouped by uniqueness. The dashboard will update as alerts are sent to the service.

DevAlert Console

As you can see from the dashboard's "Open" button, you can even launch Tracelyzer from DevAlert if you want to get deeper into the trace itself from your device. In this way, the two tools complement each other to bring comprehensive observability to FreeRTOS applications. There is a lot more to explore with Tracealyzer and DevAlert for FreeRTOS, so follow the links above to get started with your own embedded applications. Happy tracing!

Latest reply

These tools can improve development efficiency and product quality and are very helpful for embedded system design and development.   Details Published on 2023-5-18 19:46
Personal signature

欢迎关注“麦克泰技术”

 
 

4817

Posts

4

Resources
2
 

These tools can improve development efficiency and product quality and are very helpful for embedded system design and development.

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list