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

  • 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 Steve, thanks for confirming!

    With regards to updating the VS Code extension (and also VS Code itself), by default these updates are downloaded automatically when available, and installed either when VS Code exits or boots (I can't remember which). So it's not something you have to worry about.

    If you want to keep an eye on the versions and changed that have been released, you can look at the docs for the extension: https://nrfconnect.github.io/vscode-nrf-connect/

    Since you say you are new to Nordic, I also want to take the chance to point out the existence of our Developer Academy: https://academy.nordicsemi.com/

    It's a great starting point for working with our products. If you don't know where to start, I recommend the nRF Connect SDK Fundamentals course.

    Best regards,

    Raoul

  • Hi Raoul,

    Thanks for those Nordic documentation links. I'll study those. By the way, when you mentioned the Segger RTT viewer as an alternate to the VSCode/Extension RTT viewer, I experimented with it. I noticed that the Segger RTT viewer showed the same issue with backspace processing. It is not echoed back to the RTT viewer despite being processed internally by the device. I suspect the reason you thought it was working there is because you have your Segger RTT viewer set for Input->Sending...->"Send on Enter". When I switched to that setting via the menus I also saw a normal backspace operation. The default setting the Segger RTT viewer initially offered me (as a default) was Input->Sending...->"Send on Input" and this apparently is the mode that the VSCode Extension RTT viewer is using too. Maybe that mode is what changed recently with the extension. Not sure, but wanted to offer the additional info. Thanks again

    Steve K., PuzL Labs, LLC

  • Hi again,

    Thanks for the tip. I actually noticed that setting as well, though I'm not sure if it matches your description. The default for me was "Send on Input" which totally didn't work with the shell sample as it sends one letter at a time. However, when I tried "Send on Enter", everything works well, including backspaces:

    This is RTT Viewer v7.80c.

    Since this works for me, I'm still suspecting it to be a client side issue with VS Code/the extension. But I'm not 100% certain. I can check with the extension team, but let me know if you have anything to add.

    Best regards,

    Raoul

Related