4

How to use RTT Viewer (or similar) on GNU/Linux?

tesc gravatar image

asked 2016-06-15 14:05:26 +0100

updated 2016-06-15 14:15:51 +0100

It is pretty straight-forward to use J-Link RTT Viewer on Windows (as described in the Debugging with Real Time Terminal tutorial). Is there a similar viewer to use with GNU/Linux?

edit retag flag offensive close delete report spam

1 answer

Sort by ยป oldest newest most voted
12
tesc gravatar image

answered 2016-06-15 14:05:45 +0100

updated 2016-06-15 14:13:45 +0100

I assume that you have already installed the latest Software and documentation pack from SEGGER.

To use the RTT Viewer equivalent on GNU/Linux, you must first set up the connection using JLinkExe. Provided that your DK or dongle is connected, starting JLinkExe from a terminal should look something like this:

you@yourcomputer:~$ JLinkExe
SEGGER J-Link Commander V5.10u (Compiled Mar 17 2016 19:06:22)
DLL version V5.10u, compiled Mar 17 2016 19:06:19

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17
Hardware version: V1.00
VTref = 3.300V


Type "connect" to establish a target connection, '?' for help
J-Link>

JLinkExe may decide to update the firmware on the Segger programmer IC, which will give additional information between "Connecting to J-Link via USB..." and "O.K."

The final line is a prompt. The "connect" command will present some choices along with default values and options. Defaults are mostly fine, but use "SWD" for target interface.

If a connection is established the final lines of output should state "Cortex-M0 identified" (for nRF51) or "Cortex-M4 identified" (for nRF52), followed by the "J-Link>" prompt:

(...)
Cortex-M4 identified.
J-Link>

Now, from another terminal, start JLinkRTTClient. This program should connect automatically:

you@yourcomputer:~$ JLinkRTTClient
###RTT Client: ************************************************************
###RTT Client: *           SEGGER MICROCONTROLLER GmbH & Co KG            *
###RTT Client: *   Solutions for real time microcontroller applications   *
###RTT Client: ************************************************************
###RTT Client: *                                                          *
###RTT Client: *  (c) 2012 - 2014  SEGGER Microcontroller GmbH & Co KG    *
###RTT Client: *                                                          *
###RTT Client: *     www.segger.com     Support: support@segger.com       *
###RTT Client: *                                                          *
###RTT Client: ************************************************************
###RTT Client: *                                                          *
###RTT Client: * SEGGER J-Link RTT Client   Compiled May 27 2016 17:03:51 *
###RTT Client: *                                                          *
###RTT Client: ************************************************************

###RTT Client: -----------------------------------------------
###RTT Client: Connecting to J-Link RTT Server via localhost:19021  Connected.
SEGGER J-Link V5.12g - Real time terminal output
J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17 V1.0, SN=682852586
Process: JLinkExe

You will now receive RTT output.

If you happen to like telnet you can use it instead of JLinkRTTClient:

you@yourcomputer:~$ telnet localhost 19021
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SEGGER J-Link V5.12g - Real time terminal output
J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17 V1.0, SN=682852586
Process: JLinkExe

You will now receive RTT output.

edit flag offensive delete publish link more

Comments

Works like a charm

rusger ( 2017-10-12 14:48:35 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

User menu

    or sign up

Recent questions

Question Tools

1 follower

Stats

Asked: 2016-06-15 14:05:26 +0100

Seen: 3,525 times

Last updated: juni 15 '16