Porting JLink RTT to RT595
1. Introduction
2. RTT (Real-Time Terminal)
3. Porting
Steps for Porting
4. Conclusion
For most beginners learning MCU or embedded systems, the first step often involves simple tasks like "lighting up an LED" or a "Hello World" program. Today, we will discuss a topic closely related to "Hello World."
Serial output is a highly effective debugging tool, allowing developers to monitor program states, interact with the program, and diagnose issues. This is a familiar friend to anyone engaged in embedded development.
The most common approach, as seen in NXP SDK examples, uses a UART peripheral for logging:
This is the simplest and most widely used method for serial output. However, what if the precious UART resource is already occupied? Here's a great alternative: porting SEGGER's RTT (Real-Time Terminal) driver and using the JLink RTT functionality for logging. The biggest advantage of this approach is conserving UART resources!
Next, let’s explore the powerful capabilities of JLink RTT.
RTT, developed by SEGGER, is a real-time terminal solution for interactive communication in embedded applications. Beyond conserving UART resources, RTT offers significant advantages over semi-hosting methods provided by tools like MCUXpresso IDE. RTT allows for high-speed bidirectional data transfer between the MCU and the host without compromising real-time performance.
Key features of JLink RTT include:
JLink RTT typically pairs with JLink debuggers and SEGGER's development tools, providing powerful support for debugging and tracking embedded systems. To try out this functionality, a JLink debugger is essential.
Using the classic RT595-EVK as an example, we will demonstrate how to port RTT.
The development environment includes the MCUXpresso IDE and the hello_world project from the SDK. The SDK version is not critical.
Compared to traditional UART-based logging, utilizing the debugger’s built-in RTT functionality reduces peripheral usage and eliminates the need for UART initialization and configuration. With JLink, RTT is essentially plug-and-play, providing convenient and fast logging and interaction.
In addition to basic functionality, SEGGER offers advanced features such as changing font colors. Explore more on SEGGER's official website:
SEGGER RTT Documentation
For Chinese version and demo project, please check this link:
https://www.nxpic.org.cn/module/forum/forum.php?mod=viewthread&tid=803638&fromuid=3253523