Setting up Percepios’ Tracealyzer to Debug FreeRTOS Applications: Page 2 of 3

These days, developers can use tools such as Percepios’ Tracealyzer to peer into the microcontroller and understand exactly how the software is being executed.

to use the streaming trace, developers need to examine their debugger settings so that Tracealyzer knows how it is to receive the event data. This is done through the File->Settings menu. The tool needs to know where that data will be coming from such as Seggers RTT, TCP/IP, or USB. In this example, the settings are configured for the Segger RTT. Two up and down channels are configured to match the FreeRTOS settings as shown in Figure 4.

 

Percepio, Tracealyzer, debug, RTOS, ESC, Embedded Systems Conference
Figure 4 – Configure the Debugger Settings

 

Step #6 – Start Recording Data

Once the tools are configured and ready to execute, developers can start their debug session, begin executing code, and also start recording trace data. When the Tracealyzer is successfully receiving trace data, it will report statistics on the trace session such as the total number of events and the event per second that are occurring. This can be seen in Figure 5.

 

Percepio, Tracealyzer, debug, RTOS, ESC, Embedded Systems Conference
Figure 5 – Recording Trace Data

 

Step # 7 – Analyze the Trace Data

Finally, after the microcontroller has ran its code for the desired time period, developers are ready to begin analyzing their trace data. There are many different views and reports that the trace tool can generate. The main view can be seen in Figure 6. In this view, developers can see the lifeline for the different tasks that are executing in the system. Developers can see when queue data is sent and received along with other RTOS objects such as mutexes and semaphores.

Developers can click on the task and get addition information such as the minimum, average, and maximum execution times for the task. There is even information such as the response time for the task with minimum, average, and maximum values. Developers can hide events that they are not interested in and switch views to see the CPU loading. In the past, developers could only guess and deduce this information let alone actually see it!

 

Percepio, Tracealyzer, debug, RTOS, ESC, Embedded Systems Conference
Figure 6 – Analyzing the Trace Data

 

Conclusion

Trace tools remove the guess work for developers who are working with real-time embedded systems. The days of guessing what a system is doing are over. Developers can now visualize and see the actual trace data for the how the system is executed and dive into the details when strange behavior is present. Trace tools are an essential tool for developers to have on their workbench and we can expect that they will only become more powerful in the years to come.

 

ESC, Embedded Systems Conference, BostonBootloader Design Techniques for Microcontrollers.
Join Jacob Beningo at ESC Boston 2017 , May 3-4, as he uses examples from real-world bootloaders to supply attendees with ideas, code snippets, and solutions that can be used in their own development efforts. Register today for this session and more!   Click here to the full conference schedule.

 

Jacob Beningo is an embedded software consultant who currently works with clients in more than a dozen countries to dramatically transform their businesses by improving product quality, cost and time to market. He has published more

Add new comment

By submitting this form, you accept the Mollom privacy policy.