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



    I have an application based on RTT for transferring large amounts of data (2 or more orders of magnitude larger than the buffer size) from host to target. For this, I have written a Python script to open a telnet connection using telnetlib and send data with telnet.write().

    This functions correctly on J-Link version 6.32g. However, after upgrading to latest version (6.72d as of now), I am unable to successfully complete transfers. The first approximately 4k of data, which is the same amount as the down buffer size, arrive correctly. After this point, data is missing. Some blocks continue to arrive, but with gaps. It would seem that the SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL flag is ignored and the telnet client is dropping data that would overflow.

    If I split the payload into 1k chunks and add sleeps between telnet.write() calls, the transfer completes successfully.

    I also tested versions 6.64 and 6.70c with the same results.

    • Target: Cortex M4 based SoC.
    • OS: Linux 64-bit.
    • Debugger: J-Link Base.
    RTT Setup:
    • The RTT source files (SEGGER_RTT.c, SEGGER_RTT.h, etc.) have been updated to the code from the latest J-Link release.
    • The default channel 0 ("Terminal") is used.
    • Both up and down buffers have .Flags = 2 /* SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL */.
    • Connection to target is established by JLinkExe with SWD.
    • Some metadata messages are exchanged successfully between host and target before payload is sent.
    Any help would be appreciated, as I haven't been able to find the source of the issue.


    The post was edited 1 time, last by vurziceanu ().

  • Hi Vlad,
    I can see that you also contacted us through the ticket system.
    Please try to keep communication to one channel in the future.
    Otherwise this causes a higher workload on our side and therefore longer wait time on customer side.

    In your case, it seems like the J-Link you are using is out of support period.
    If you do not have another J-Link in support period, please keep your inquiries to the Forum in the future.

    If you provide us with a reproduction setup via the ticket system and assuming that we are able to reproduce this on our side we will continue this inquiry there.
    Please note that this is just an exception.

    We will close this thread for now.

    Best regards,
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    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.