This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Backspace in terminal not giving correct command



In case anyone has tried to use the Command Line utils from /utils/cmdline.c, you may notice that depending on the terminal you use to communicate with your Tiva, a backspace may appear to delete the last character on your output, but sometimes it will not.

This is because many terminal and shell interpreters will consume the '\b' before we can make use of it. Some of them (like PuTTY) will replace \b with DEL (which is dec:127) I'm not certain how the behavior is on a Windows system, but I definitely noticed this on Linux using PuTTY.

When making a typo, hitting backspace, and then fixing the string, I'd get "Command not recognized!" Even with a fresh cmdline, it was possible to delete the input marker: '>'

The fix is simple. In /utils/uartstdio.c, change both instances of 

if(cChar == '\b')

to

if(cChar == 127)

This should work if your interpreter gobbles your '\b' and outputs a DEL control code instead.

I hope this can be of help to someone!

-Phil

BTW, does anyone know offhand what the escape code ESC[3~ is for?