This project provides a Python-based GUI to display, filter and highlight real-time ARM Cortex microcontroller log messages received via SEGGER's Real-Time Transfer (RTT) debug protocol.
This debug protocol provides direct communication with ARM Cortex-based microcontrollers via J-Link debug probes. RTT removes the need for additional debug channels during development (like UART) by using the ARM Cortex SWD/JTAG interface. Unlike the slower and clunkier UART debug channel the SWD, JTAG interface provides lean and mean RTT debug messages for ARM MCUs.
This project interfaces directly with the J-Link debug probe drivers,
using the Python library pylink which wraps the JLink drivers to interact with a J-Link debug probe.
It does NOT require any other intermediary software like Segger's RTT Viewer.
The pylink library was written by Square Inc. (Now Block Inc.), open sourced https://github.com/square/pylink and uploaded to PyPI https://pypi.org/project/PyLink/.
The official documentation and examples for the pylink library
are somewhat lacking when it comes to using the RTT channel,
so this project may also serve as a practical guide for leveraging pylink for RTT communication.
- Direct J-Link connection using native drivers (no other software required)
- Real-time log display with filtering and message highlighting
- Data Series — define named patterns with
<N>capture groups to extract numeric values from log lines - Pattern Generator — auto-generate patterns from sample log lines
- Real-time plotting — plot up to 3 data series simultaneously with modern dark charts
- Activate/Deactivate series independently
- Pause/Resume log display
- Save logs to file
- MCU history — remembers recently used MCUs
- Config persistence — MCU history, interface selection, and data series are saved automatically
- Demo mode — test without hardware using
--demo-messages
- Python 3.8+ (https://www.python.org/)
- SEGGER J-Link Software (Download)
- Required Python packages (see
requirements.txt):- FreeSimpleGUI
- pylink-square
- platformdirs
- matplotlib
Include the SEGGER RTT library in your embedded application. See: https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/
#include "SEGGER_RTT.h"
void main() {
SEGGER_RTT_Init();
SEGGER_RTT_SetTerminal(0);
SEGGER_RTT_printf(0, "System started\n");
}Download the matching executable (Windows or Linux) from the releases page: https://github.com/SaturnIC/RTT-ARM-Cortex-GUI/releases
- Clone the repository:
git clone https://github.com/SaturnIC/RTT-ARM-Cortex-GUI.git cd RTT-ARM-Cortex-GUI - Install dependencies:
pip install -r requirements.txt
- Ensure J-Link drivers are installed on your system.
- Launch:
python rtt_python_gui.py
Test the application without hardware using the built-in demo mode:
python rtt_python_gui.py --demo-messagesThis replays a sample log file so you can explore filtering, highlighting, data series, and plotting.
- Connect MCU via J-Link to your PC
- Select your target MCU from the dropdown. Type to filter the list.
- Select the interface (SWD or JTAG).
- Click Connect. The status dot turns green when connected.
- Click Disconnect to terminate the connection.
- Filter — type a substring to show only matching log lines
- Highlight — type a substring to highlight matching text in the log
- Pause — freeze the log display while data continues to be received
- Clear — reset the log display
- Save — export the log to a text file
Define named data series that extract numeric values from log lines using patterns.
Defining a series:
- Enter a Name for the series.
- Define a Pattern — use
<N>to capture a number and*to match any text. - Click Add to create the series.
Pattern examples:
| Log line | Pattern | Captured value |
|---|---|---|
ADC value: 3.14 V |
ADC value: <N> V |
3.14 |
Sensor1=100 Sensor2=200 |
Sensor1=<N> * |
100 |
Temperature: 25.6 |
*: <N> |
25.6 |
Pattern Generator: Click Pattern Generator to open a dialog where you can paste a sample log line, type the number to capture, and the pattern is generated automatically.
Activate/Deactivate: Select a series in "Defined Series" and click Activate to start capturing data. Use Deactivate to stop. Only active series are plotted.
Clear Data: Click Clear Data next to "Recorded Values" to clear all captured values.
Select up to 3 data series from the dropdowns to plot them in real-time. All series share the same time origin. The chart features:
- Smooth line interpolation
- Glow effect and gradient fill under lines
- Auto-scaling Y-axis
- Custom toolbar (Home, Back, Forward, Pan, Zoom, Save)
The application stores configuration (MCU history, interface selection, data series definitions) in a JSON file at the platform-appropriate user data directory. This is saved automatically on exit or when settings change.
For development setup, testing, and building executables, see docs/DEVELOPMENT.md.
This project is licensed under the Apache License, Version 2.0. See LICENSE for more details.


