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

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] [Python] Reading 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
  • Hi Tom,
    Thank you for your inquiry.

    There are two ways to achieve this:
    1) You could acquire the J-Link SDK, which comes with an RTT Python sample as well as
    a python library to control J-Link including RTT:
    segger.com/products/debug-prob…nk/technology/j-link-sdk/

    2) You could read the RTT data via the TELNET channel:
    wiki.segger.com/RTT#TELNET_channel_of_J-Link_software

    If you would be interested in option 1) I would suggest you contact us regarding this via our Support Ticket System
    (please see my signature below this post for the link).

    Does this answer your question?

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.