RTEMS Shell
rtwas
rtwas at comcast.net
Wed Jan 13 21:27:50 UTC 2010
Hello,
I'm wanting to add *multiple* user commands to Rtems Shell. The examples
show
how to add *one* command but do not show how to add *n* commands.
To the point, to add a single command (after defining the function) one
does:
"#define CONFIGURE_SHELL_USER_COMMANDS &Shell_USERCMD_Command"
where "Shell_USERCMD_Command" is a structure describing the function.
The only
way I can see to add multiple commands is to define separate structures
and add
multiple pointers to the "CONFIGURE_SHELL_USER_COMMANDS" macro ie.,
"#define CONFIGURE_SHELL_USER_COMMANDS &Shell_USERCMD0_Command
&Shell_USERCMD1_Command.."
or some how make use of the "next" entry in the "rtems_shell_cmd_t"
struct to create
a linked list of commands. The docs are not clear here.
Another question, can one put this is a separate "C" file? Many of the
macros are used to
simply initialize the the RTEMS Shell but that seems to want to be in
"main.c". The example
in:
"http://rtems.org/onlinedocs/releases/rtemsdocs-4.9.3/share/rtems/html/shell/shell00008.html"
shows the user command text wrapped in:
"#include<rtems/shell.h>"
and
"#include<rtems/shellconfig.h>"
along with things like:
#define CONFIGURE_SHELL_COMMANDS_INIT
#define CONFIGURE_SHELL_COMMANDS_ALL
#define CONFIGURE_SHELL_MOUNT_MSDOS
in between.
Help appreciated.
Robert W.
More information about the users
mailing list