This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[Python]R eading from SEGGER RTT print via Jlink Compact instead of a wired UART connection

Hi,

We would like to access the print outputs of the SEGGER_RTT_WriteString() function via a JLINK compact debugger using Python.
The latter is wired only via SWDIO, SWDCLK, VMCU and GND of the nRF52840 IC. 
Is there a clever way to do this in order to not use a wired UART connection.

example:

Hereby we would replace

printf("\r\nUART started.\r\n");

(which can be read in python by using pyserial readlines())

with

SEGGER_RTT_WriteString(0,"\r\n RTT started.\r\n");

and read this string in Python. 

Thanks in advance,

Kind regards,
Tom

Related