[SOLVED] Nordic CLI over RTT - Debug Terminal problems

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

  • [SOLVED] Nordic CLI over RTT - Debug Terminal problems

    Hi,
    I'm trying to run a version of the command-line-interface (CLI) example from Nordic Semiconductor. The only interface is RTT. The problem seems to be that the "Debug Terminal" window opens automatically and can't be truly shut down. This interferes with access to the CLI with a terminal program like PuTTY. When PuTTY is open, it gets part of the CLI feedback, and the Debug Terminal gets the remaining parts. Same with J-Link viewer and the debug terminal.
    The problems with simply using the debug terminal are that my input is doubled up on the screen (like an unwanted "local echo"), and keys like Tab, backspace, and the up and down arrows do not work.

    Can I somehow disable the "Debug Terminal"?

    Or, it might be moderately useful if I could eliminate the "local echo".

    Thanks.
    Images
    • Segger Debug Terminal.png

      8.36 kB, 576×268, viewed 1,599 times
  • Hello Jason,

    Thank you for your inquiry.

    Can I somehow disable the "Debug Terminal"?

    You can do so by clicking the little "x" in the top right corner of the debug terminal.
    Or, it might be moderately useful if I could eliminate the "local echo".

    Does the issue still persist when using the JLinkRTTViewer instead? It comes with each J-Link Software package installation.

    Can you provide us with an exact reproduction scenario and an example project?

    Best regards,
    Nino
    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.
  • Hi,
    Problem with double characters can be simply fixed by switching off CLI echo on Nordic console side.
    More important issue is that some characters are "lost" between RTT Host and Putty when RTT session is started by JLink viewer or when debugging under SES.The same problem does not exist (all characters are printed correctly on PuTTY) when RTT session is started by JLink.exe.

    RTT config:
    512 - upstream buffer
    2x upstream buffer
    16 - downstream buffer
    2x downstram buffer
    Mode: skip if fifo full

    Scenario 1:
    I have been pasting (ctr + insert) following text to PuTTY:"test_1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1"

    I understand there is following "path" of this text: PuTTY->RTT Host->RTT Target (CLI)-> RTT Host -> PuTTY.
    It seems that some characters are lost in the last step, please find below my screenshot:
    [img]https://naforum.zapodaj.net/thumbs/f49e6c5f7e20.png[/img]

    I was clearing RTT logs after each transaction so there is only last one witch is not correctly displayed on PuTTY.



    Scenario 2:
    I was holding 1 key to indroduce text on PuTTY terminal.
    Again I don't see all characters send from Target to Host on PuTTY.

    [img]https://naforum.zapodaj.net/thumbs/5833366c6a75.png[/img]

    RTT config:
    512 - upstream buffer

    2x upstream buffer
    512 - downstream buffer
    2x downstram buffer

    Mode: Block if fifo full

    Scenario 3:
    It looks a bit better when changed RTT config but problem is slightly different. Now debug terminal is "stealing" characters from PuTTY. What is not printed on PuTTY is printed on SES Debug Terminal (the same effect I have observed with JLink Viewer).
    I was pastingtext: "test_1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1234567890_test1" and once everything I've pasted was directed to SES Debug window:
    [img]https://naforum.zapodaj.net/thumbs/d4f89c4992c0.png[/img]

    Scenario 4
    I was holding one button "w" on PuTTY and some of characters were directed to SES Debug window instead of PuTTY
    [img]https://naforum.zapodaj.net/thumbs/3672d5da10ee.png[/img]




    What can be done to fix it?
  • Nino - clicking the X closes the displayed window, but Debug Terminal is still working in the background. I can tell because the behavior is the same whether open or closed, but more conclusively - when you re-open the Debug Terminal it has captured some of the input made to Putty while it (the Debug Terminal) was closed.

    Jakub - I did set echo off using the sdk_config.h file, but it had no effect. The guys at Nordic did send me some updated code that fixed my double-char problem; they said it will be released in nRF5 SDK 14.2

    Thanks both for the help; I hope that we can resolve the issue so that I can use PuTTY to interface with my system over RTT.
  • Hello Jakub and Jason,

    ES can be prevented from "grabbing" RTT data away by going to the Project settings->Debug->Debugger->RTT Enable-> Set to *No*

    Now all RTT data should land in Putty.
    The issue is that RTT data can only be grabbed once from J-Link. So when there are multiple terminals "competing" data will be spread or even lost among them.

    Does this solve the issue for you two?

    Best regards,
    Nino
    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.
  • Great to hear that you are up and running again.

    I will consider this case as solved then.

    Best regards,
    Nino
    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.