A Tool for Online Debugging of Embedded Systems

Many of you may have heard of or used the tool SystemView. It is a tool for online debugging of embedded systems, capable of analyzing which interrupts and tasks are executed in an RTOS, as well as the sequence of these interrupts and tasks.

It also allows you to view the timing of kernel object acquisition and release, such as semaphores, mutexes, events, and message queues, which is particularly effective when developing and handling complex systems with multiple threads and events.

This article describes the use of the SystemView tool to analyze the operation of the RT-Thread on the Renesas RA6M4 microcontroller.

Introduction to SystemView Tool

The SystemView software needs to be used in conjunction with the J-Link emulator. Through the SystemView software, we can monitor the task switching and scheduling of our real-time system in real-time, and this software supports various real-time systems, including RT-Thread, FreeRTOS, etc.

Interface Preview

Common Functions

How to Use the SystemView Tool to Analyze RT-Thread Operation on RA6M4 Chip?

The official development environment RT-Thread Studio has already embedded the RA6M4 BSP, allowing engineers to easily develop applications based on the RT-Thread RTOS. This article introduces the development environment based on RT-Thread Studio.

01

First, create an RT-Thread application project using the project template. A thread will be created by default.

02

Add the SystemView software package to the project (it is recommended to use the stable version V2.52a).

Note: The new version of RT-Thread Studio will default to the latest version; it is recommended to select the stable version V2.52a. The modification method is as follows:

After adding the software package, compilation will report an error:

You can resolve the error by changing the kernel version. After modifying the project as shown in the figure below, it can compile correctly:

03

The first time you connect to the SystemView software, a J-Link error will be prompted.

Copy the file JLINKARM.DLL from the J-Link installation path to the corresponding installation directory of SystemView to resolve this:

In RT-Thread Studio, connect to the CP-RA6M4 development board. After a normal simulation connection, the following address information will be printed in the debug serial port:

Create a new project in the SystemView software, input the corresponding chip model and RTT address information, and it can connect correctly to the SystemView software:

Conclusion

SystemView is an embedded system visualization analysis tool developed by SEGGER, providing complete insights into applications, including visual windows for timelines, CPU load, runtime information, and context runtime information, helping developers gain an in-depth understanding of application runtime behavior.

With visualization analysis tools like SystemView, developers can better understand the real-time behavior of RTOS applications running on the Renesas RA6M4, thereby creating higher quality code.

‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧  END  ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧

Follow my WeChat public account, reply "planet" to join the knowledge planet, and get answers to your questions.

Click "Read the original text" to view the details of the knowledge planet. Feel free to share, bookmark, like, and view.

Leave a Comment