Monday, December 11th 2017, 10:20am UTC+1

You are not logged in.

  • Login
  • Register

jhendrix

Beginner

Date of registration: Oct 31st 2017

Posts: 2

1

Thursday, November 2nd 2017, 5:22pm

[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.
jhendrix has attached the following image:
  • Segger Debug Terminal.png

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

2

Friday, November 3rd 2017, 9:33am

Hello Jason,

Thank you for your inquiry.

Quoted

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.

Quoted

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

jakub

Beginner

Date of registration: Jun 7th 2017

Posts: 3

3

Friday, November 3rd 2017, 3:46pm

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:


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.



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:


Scenario 4
I was holding one button "w" on PuTTY and some of characters were directed to SES Debug window instead of PuTTY





What can be done to fix it?

jhendrix

Beginner

Date of registration: Oct 31st 2017

Posts: 2

4

Friday, November 3rd 2017, 5:39pm

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.

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

5

Tuesday, November 7th 2017, 10:57am

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

jakub

Beginner

Date of registration: Jun 7th 2017

Posts: 3

6

Tuesday, November 7th 2017, 11:32am

It is perfect solution for me :) Thank you.

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 434

7

Tuesday, November 7th 2017, 11:51am

Great to hear that you are up and running again.

I will consider this case as solved then.

Best regards,
Nino