Upgrading to newer SDK broke RTT processing of backspace character.

Problem: Upgrading to newer SDK broke RTT processing of backspace character.

Details: We had been using RTT with the v2.4.1 SDK (for our nRF52840 development) and yesterday we upgraded to v2.5.0 and now find that RTT will no longer process the backspace character. You can type into the RTT terminal but backspace no longer has any effect. The only change we made was the SDK upgrade. Our application uses a pretty simple prj.conf file and in it we have the following lines that we believed were all that was necessary to have a working RTT (and in fact it did seem adequate with SDK v2.4.1). Any ideas?

Note: prj.conf pertinent lines:
# ------- Debug instrumentation via RTT.
CONFIG_CONSOLE=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_SHELL=y
CONFIG_SHELL_BACKENDS=y
CONFIG_SHELL_BACKEND_RTT=y
CONFIG_LOG_BACKEND_RTT_BUFFER=1
CONFIG_USE_SEGGER_RTT=y
CONFIG_SHELL_PROMPT_RTT="$ "
# -------

Any help would be appreciated. Thanks in advance.

Steve K.
PuzL Labs, LLC

Parents
  • Hi Steve,

    Which RTT viewer are you using?

    I tried to reproduce this using the shell_module sample with the prj_minimal_rtt.conf configuration, using NCS v.2.4.0 just to check the "before" behavior.

    Using the Segger RTT viewer, I had no issues, but when I used the RTT Viewer included with our VS Code Extension, I found that using backspace will not be reflected in the local echo in the extension. Meaning, backspaces don't visually do anything but in the background they are actually registering on the nRF52840. (if I type "asdf", then backspace 4 times and type "help", it clearly only sends the help command". You could try it.).

    Could this be what you are experiencing? If so, this might be an issue with the extension (since I'm seeing this on v2.4.0 already). Perhaps it has been updated recently.

    If you are experiencing something different - Could you try to create a reproduction of the issue based on a modified sample, instead of your own application? That would make it easier for the developers to investigate.

    Best regards,

    Raoul

  • Hi Raoul, thank you for your response. You asked which RTT viewer I am using. Yes, I am using the RTT Viewer included with the VS Code Extension, and your backspace description does match my results (I went back and tried it again). In other words, as you say: "I found that using backspace will not be reflected in the local echo in the extension. Meaning, backspaces don't visually do anything but in the background they are actually registering on the nRF52840."

    I believe you were suggesting the problem resides with the VSCode Nordic Extension as you see good results when using an alternate RTT viewer. Thanks again for narrowing in on this. I am curious how I would know that a corrected VSCode Nordic Extension has become available? Will the VSCode extension panel show me when a new version is available? Probably. I am fairly new to VSCode/Nordic. Thanks in advance.

    Steve K. , PuzL Labs, LLC

  • Hi Raoul,

    Any word as to plans for offering a Input->Sending...->"Send on Enter" functionality for VSCode/Extension RTT to match the functionality that the Segger RTT viewer gives? It is frustrating not have the backspace echoed to the VSCode/Extension RTT terminal. Just curious if you heard anything?

    Steve K. , PuzL Labs, LLC

  • Hi Steve,

    I apologise for the delay. I asked our developers whether this is an issue on our end or with VS Code itself, but they've now come back with a much simpler answer:

    Change your setting from "line mode" to "character mode" in the nRF Terminal.

    Press ctrl + shift + P to open the command palette, and search for "switch to character mode"

    This immediately fixed the issue on my end.

    Excuse me for not suggesting this earlier, I was not aware of the existence of this setting.

    Of course, let me know if that doesn't work!

    Best regards,

    Raoul

  • Hi Raoul,

    That sounds promising. I am running on a MacBookPro (M1) and I can't get the command palette to open with the ctrl + shift + P. Is it possible there is a different keybinding I should use?

    I am attempting this after first creating a nRF RTT Terminal and then placing the cursor in the created terminal window (where I would normally expect displayed RTT activity).

    Thanks, Steve K.

  • Hi Steve,

    On a Mac that would be CMD + shift + P.

    The command palette is a universal (and very useful) feature in VS Code, should work from anywhere:

    https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette

    It exposes all the functionality of VS Code and extensions, through a search box.

    Best regards,

    Raoul

  • Hello Raoul,

    This fix no longer seems to work in NCS 2.5.2.

    Any other suggestions?

Reply Children
Related