Shell Enhancements Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Shell Enhancements

Postby Giovanni » Sat Apr 16, 2016 8:28 am

Hi,

Good work, committed. Also good idea to accept NULL as history for shellGetLine().

Giovanni

bvernoux
Posts: 6
Joined: Sun Dec 01, 2013 3:56 pm
Been thanked: 1 time

Re: Shell Enhancements

Postby bvernoux » Mon May 09, 2016 9:14 pm

Just for information I'm using TokenLine with chibios (in my project hydrafw) see https://github.com/biot/tokenline
I think it is the most powerful shell with completion and tons of very good feature for compact code and fast advanced shell management.

AdShea
Posts: 6
Joined: Mon Nov 30, 2015 9:03 pm
Has thanked: 1 time
Been thanked: 2 times

Re: Shell Enhancements  Topic is solved

Postby AdShea » Mon Nov 14, 2016 9:55 pm

One small patch, currently the shell echos the backspace / delete keycode used to delete characters. Due to several silly choices over the past 30 years, many terminals (linux standard terminals especially) send a 0xFF for the backspace key but need an 0x08, 0x20, 0x08 sent back to properly delete characters (like the ANSI and VT100 specs say). To fix this, just a quick change to os/various/shell/shell.c. With this change, a standard raw terminal will work on Linux.

Code: Select all

--- a/os/various/shell/shell.c
+++ b/os/various/shell/shell.c
@@ -521,9 +521,9 @@ bool shellGetLine(ShellConfig *scfg, char *line, unsigned size, ShellHistory *sh
 #endif
     if ((c == 8) || (c == 127)) {
       if (p != line) {
-        streamPut(chp, c);
+        streamPut(chp, 0x08);
         streamPut(chp, 0x20);
-        streamPut(chp, c);
+        streamPut(chp, 0x08);
         p--;
       }

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Shell Enhancements

Postby Giovanni » Tue Nov 15, 2016 4:58 pm

Hi,

Thanks, moving this topic in "bug reports" for handling.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Shell Enhancements

Postby Giovanni » Mon Nov 21, 2016 9:53 am

Fixed on repository, thanks.

Giovanni

Luri
Posts: 1
Joined: Sun Aug 11, 2019 2:54 pm
Been thanked: 1 time

Re: Shell Enhancements

Postby Luri » Sun Aug 11, 2019 3:06 pm

A small example to use this enhancements feature.

You must modify makefile to add -D SHELL_CONFIG_FILE to compiler option. (see makefile in my example)
This allow to use your own shellconf.h in your root projet directory. We this, you can set on history and completion.
You can also enable or disable each chibios shell function.

example projet is tested with Nucléo STM32F767, ChibiOS 19.1.3, GNU ARM 8.3.1 2019q3, And this patch for chibistudio openocd

If you play with shell, you probably want add a serial console to ChibiStudio. See that : https://mcuoneclipse.com/2015/04/20/ser ... ipse-luna/
Attachments
Extended-shell-example.7z
(13.03 KiB) Downloaded 180 times


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 37 guests