[ABANDONED] JLinkGDBServerCL RTT latency issue

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

  • [ABANDONED] JLinkGDBServerCL RTT latency issue

    I am using RTT to send log messages to our test script. The test script uses a TCP socket to connect to the RTT telnet port of a running JLinkGDBServerCL process.

    Previously we used UART communication to send the log messages. We were hoping to get a more stable connection and less hassle using RTT.

    Unfortunately RTT seems to introduce a larger latency w.r.t. UART. As a consequence our test scripts sees events in wrong order, resulting in a failed test.

    Is there any RTT buffering introduced in JLinkGDBServerCL? Is it possible to influence the latency by setting certain command line options or by using GDB monitor commands?

    We are using JLink_Linux_V688c_x86_64
  • Hi,
    Thank you for your inquiry.
    Could you elaborate what the range of latency you are refering to (e.g seconds, ms,..)?
    What target device/MCU are you using?
    Are you working on an evaluation board or custom hardware?
    If evaluation board, which one?

    There are in total three buffers for RTT:
    1) Target side buffer, that is filled with the data to be send.
    2) J-Link buffer that is filled by reading the data from the target.
    3) J-Link DLL buffer that is filled by reading the J-Link buffer.

    Reg. 2) As the J-Link reads the target side buffer as background task, the delay for 2) depends on how much the J-Link has to do otherwise.
    If the J-Link is only handling RTT, this delay is very small.
    Reg. 3) The J-Link DLL is constantly polling the data from the J-Link, so the delay here is also very small.
    The last delay is between your application and the socket. The faster the data is taken from the socket, the smaller the delay here.

    A way to minimize the delay would be to increase the target interface speed, as the data transfer between J-Link and device is faster.

    Dinne wrote:

    As a consequence our test scripts sees events in wrong order, resulting in a failed test.
    This sounds weird to me. The data received via RTT should not be received in wrong order.
    Could you please confirm that this is not the case?

    Using GDB or another application for RTT should not influence the latency, as RTT is handled exactly the same.

    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.