I am trying to get JLinkRTTClient (v646h) working on Ubuntu running in a VirtualBox 6.0 VM on Windows 10 host. I am using nRF52840 DK v1.1.0. I followed the guidance here. I can connect fine to the target OK:
robert@robert-VirtualBox:~$ JLinkExe -device NRF52840_XXAA -if SWD -speed 4000 -autoconnect 1 -SelectEmuBySN 683220351 -RTTTelnetPort 5000
SEGGER J-Link Commander V6.46h (Compiled Jun 28 2019 17:19:57)
DLL version V6.46h, compiled Jun 28 2019 17:19:50
RTT Telnet Port set to 5000
Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15
Hardware version: V1.00
S/N: 683220351
VTref=3.300V
Device "NRF52840_XXAA" selected.
Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>
However, when I run JLinkRTTClient, I cannot get a connection:
robert@robert-VirtualBox:~$ JLinkRTTClient -RTTTelnetPort 5000
###RTT Client: ************************************************************
###RTT Client: * SEGGER Microcontroller GmbH *
###RTT Client: * Solutions for real time microcontroller applications *
###RTT Client: ************************************************************
###RTT Client: * *
###RTT Client: * (c) 2012 - 2016 SEGGER Microcontroller GmbH *
###RTT Client: * *
###RTT Client: * www.segger.com Support: [email protected] *
###RTT Client: * *
###RTT Client: ************************************************************
###RTT Client: * *
###RTT Client: * SEGGER J-Link RTT Client Compiled Jun 28 2019 17:20:05 *
###RTT Client: * *
###RTT Client: ************************************************************
###RTT Client: -----------------------------------------------
###RTT Client: Connecting to J-Link RTT Server via localhost:5000 ..................................................^C
robert@robert-VirtualBox:~$
Note I tried with the default port of 19021 with the same result. I did notice that the LED next to the JLink device on the board flashed 15 or 16 times when I ran JLinkRTTClient and then stopped (or changed cadence at least) so this suggests there is some communication to the JLink device but it fails to complete and there is no proper connection taking place.
I also tried on a Raspberry Pi using JLink for Arm (v646i) and get the same result as with Ubuntu VM.
Note this runs fine on Windows 10 using the Segger JLink Commander and JLink RTT Client (and JLink RTT Viewer) (v646h).
Any help appreciated, although I wonder if this is a Segger issue?