Skip to main content
SEGGER RTT real-time transfer debugging architecture diagram

SEGGER RTT (Real Time Transfer): A Technical Guide to Non-Intrusive Embedded Debugging

GSAS Engineering · · 5 min read

Every embedded developer has faced the same problem: getting data out of a running target without disrupting its real-time behavior. UART printf is the classic approach, but it consumes a peripheral, requires dedicated pins, and introduces blocking delays that distort timing-sensitive code. SEGGER’s Real Time Transfer (RTT) solves this by using the debug probe’s existing JTAG/SWD connection, no additional hardware, no additional pins, and critically, minimal CPU overhead on the target.

How RTT Works

RTT uses a small control block in target RAM that contains ring buffers for bidirectional communication between the target and host. The J-Link debug probe reads and writes these buffers through the standard debug interface (JTAG or SWD) using background memory access, the same mechanism the probe uses to read variables during debugging. The target CPU is never halted.

The architecture consists of three components:

  1. SEGGER_RTT control block: A structure placed in target RAM containing pointers to up and down ring buffers. The J-Link probe locates this control block automatically by scanning RAM for a known ID string.

  2. Up channels (target to host): Ring buffers where the target firmware writes data. The J-Link probe continuously reads these buffers in the background and forwards data to the host application. Multiple up channels are supported for separating different data streams (debug output, sensor data, profiling events).

  3. Down channels (host to target): Ring buffers where the host writes data that the target firmware reads. Used for configuration commands, parameter updates, or interactive debug input.

RTT Code Integration

Adding RTT to a project requires including SEGGER’s RTT source files (freely available from SEGGER) and calling a handful of functions. A minimal example:

#include "SEGGER_RTT.h"

int main(void) {
    SEGGER_RTT_Init();

    // Channel 0 is the default terminal channel
    SEGGER_RTT_printf(0, "System started, clock: %u Hz\n", SystemCoreClock);

    while (1) {
        uint32_t sensor_val = read_sensor();
        SEGGER_RTT_printf(0, "Sensor: %u\n", sensor_val);

        // Write binary data on channel 1
        SEGGER_RTT_Write(1, &sensor_val, sizeof(sensor_val));
    }
}

The SEGGER_RTT_printf function formats and writes to the specified channel. SEGGER_RTT_Write sends raw binary data. Both are non-blocking in the default mode, if the buffer is full, the write returns immediately without waiting. Alternative blocking and trim modes are available per channel.

RTT vs SWO vs UART

CharacteristicRTTSWOUART
Additional HardwareNone (uses debug probe)None (uses debug probe)UART transceiver + cable
Additional PinsNone1 pin (SWO)2 pins (TX/RX)
DirectionBidirectionalTarget to host onlyBidirectional
SpeedHigh, well beyond typical UART rates (probe and target dependent)Limited by SWO clockTypically 115.2 kbps to 1 Mbps
CPU OverheadMinimal (short write to a RAM buffer)Low (DWT/ITM hardware)Moderate (ISR or DMA)
Timing ImpactNegligibleLowCan be significant
Multiple ChannelsYes (configurable)Yes (ITM stimulus ports)Requires multiple UARTs
Works While HaltedNo (target must run)NoNo
AvailabilityAny J-Link + RAMCortex-M with SWO pinAny MCU with UART

When to use RTT: General-purpose debug output, sensor data streaming, interactive command shells, logging in timing-critical code, and any scenario where UART pins are unavailable or the UART peripheral is already in use.

When to use SWO: Hardware-assisted event tracing via the Cortex-M Data Watchpoint and Trace (DWT) unit. SWO is generated by dedicated hardware with no software involvement for hardware-triggered events, making it useful for exception tracing and PC sampling.

When to use UART: Production debug interfaces that must work without a debug probe, field diagnostics, and communication with external equipment.

Practical Use Cases

Debug Logging Without UART

The most common use case. Replace printf over UART with SEGGER_RTT_printf and eliminate the UART dependency entirely. The debug output appears in the J-Link RTT Viewer application or in Embedded Studio’s integrated RTT terminal. No board modification, no additional cables.

Streaming Sensor Data for Analysis

Write sensor readings as binary data on a dedicated RTT channel. On the host side, the J-Link SDK (licensed separately from SEGGER for every J-Link model) or a custom application reads the binary stream and plots, logs, or processes the data. RTT’s high throughput, which depends on the J-Link model and target, handles continuous sensor streams that would overwhelm UART.

Interactive Debug Console

Use a down channel to accept commands from the host and an up channel to return responses. This creates an interactive console for runtime configuration, register dumps, state inspection, and test control, without consuming a UART. The RTT Viewer application provides a terminal interface for interactive use.

SystemView RTOS Analysis

SEGGER SystemView uses RTT as its data transport. RTOS task switches, ISR entry/exit events, and custom application events stream from the target through RTT to SystemView on the host, providing real-time visualization of system behavior with minimal target intrusion.

Automated Testing

CI/CD pipelines can use RTT to capture test output from firmware running on physical hardware, check pass/fail results, and log diagnostic data, all through the same J-Link connection used for flashing. No UART cables to manage in the test rack.

Performance Considerations

RTT speed depends on the J-Link model, the target’s debug interface speed, and the buffer configuration:

  • Buffer size: Larger buffers reduce the frequency of J-Link background reads but consume more target RAM. For most applications, 1 KB per channel is a reasonable starting point. High-throughput binary streams may benefit from 4 KB or larger.
  • J-Link model: The ULTRA and PRO models, rated at download speeds up to 4 MB/s, achieve higher background access rates than the BASE Compact, rated at up to 1 MB/s.
  • Write mode: The default skip mode drops data when the buffer is full (non-blocking). Block mode waits until space is available (blocking). Trim mode truncates the current write. Choose based on whether data integrity or timing predictability matters more for your use case.

Getting Started with RTT in India

GSAS provides all J-Link models with local stock, INR invoicing, and technical support from offices in Bengaluru, Chennai, Hyderabad, Delhi NCR, Mumbai, and Pune. The RTT source code is included in the free J-Link Software and Documentation Pack, download from SEGGER’s website and integrate into any project within minutes.

View all J-Link models | Request a quote

Interested in SEGGER tools?

Talk to our application engineers for personalized tool recommendations.

Frequently asked questions

What is SEGGER RTT (Real Time Transfer)?
RTT is SEGGER's technology for bidirectional data exchange between a running embedded target and the host over the existing J-Link JTAG/SWD connection. It needs no extra pins or hardware, imposes minimal CPU overhead, and never halts the target CPU.
How does RTT work?
The target firmware keeps a small RTT control block with up and down ring buffers in RAM. The J-Link probe locates the control block automatically by scanning RAM for a known ID string, then reads and writes the buffers through background memory access while the CPU keeps running.
How does RTT compare to UART printf?
UART printf consumes a peripheral and pins and introduces blocking delays that distort timing-sensitive code. RTT uses the debug probe's existing connection, needs no pins, works bidirectionally, runs well beyond typical UART rates, and its default non-blocking mode returns immediately if a buffer is full.
When should I use SWO instead of RTT?
SWO suits hardware-assisted event tracing through the Cortex-M DWT unit, such as exception tracing and PC sampling, because dedicated hardware generates those events with no software involvement. RTT is the better fit for general debug output, binary data streaming and interactive command consoles.
Can RTT send data from the host to the target?
Yes. Down channels are ring buffers that the host writes and the target firmware reads, used for configuration commands, parameter updates or interactive debug input, so RTT can power a full interactive console without consuming a UART.
What do I need to start using RTT?
Any J-Link probe plus a small amount of target RAM. The RTT source code is included in the free J-Link Software and Documentation Pack. GSAS Micro Systems supplies all J-Link models in India with INR invoicing and local technical support.

Stay in the Loop

Get monthly compliance updates, product insights, and engineering best practices delivered to your inbox.

Related Articles

Horizontal stacked bar showing where an ADAS test vehicle's bandwidth budget is spent, split into cameras, lidar, radar and bus traffic, with the logger uplink limit drawn as a vertical rule crossing the bar, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

ADAS Sensor Data Logging: Bandwidth Budgets That Add Up

Every page that tells you an ADAS test vehicle produces terabytes a day states the headline and skips the arithmetic, so you cannot redo it for your own sensor set. This article publishes the arithmetic instead: one formula, every table row derived on the page, a worked eight-hour drive that chains those rows into a sustained write rate, a media count and an offload window, and the five places bandwidth budgets go wrong. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 15 min read
The bench to harness adapter path drawn left to right: the ECU connector, a test lead, a media converter or pluggable T1 module, RJ45, and the host, showing where each connector family sits between the device under test and the laptop, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

Automotive Ethernet Connectors: H-MTD, MATEnet, MQS

An ECU arrives on the bench with a connector nobody has a mate for, and the day is gone. Search the family names and you get connector product pages that describe their own part and stop there. This article puts the families side by side in one table using only what their public pages state, then makes the point those pages leave out: the IEEE link segment definition, not the connector, is what sets reach and loss limits, and shielding is a channel decision rather than a preference. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 12 min read
Ladder chart of the T1 single-pair Ethernet family by data rate: 10BASE-T1S (802.3cg), 100BASE-T1 (802.3bw), 1000BASE-T1 (802.3bp), 2.5/5/10GBASE-T1 (802.3ch) and 25GBASE-T1 (802.3cy), one balanced pair across five IEEE standards, from GSAS Micro Systems India
Automotive Ethernet Automotive & Mobility

The T1 Family Explained: 10BASE-T1S to Multi-Gig 802.3ch

The T1 family is the set of single-pair Ethernet physical layers used in vehicles, and every member is documented separately inside a different datasheet. This guide puts all of them in one table with rate, symbol rate, line code, specified reach and cabling traced to public IEEE task force documents, then answers the two questions that keep coming back: why 100BASE-T1 has no auto-negotiation, and why one end has to be master. Written by the GSAS Micro Systems engineering team in India.

29 Aug 2026 · 13 min read