Adding RTEMS shell commands in BSP and application

sudarshan.rajagopalan sudarshan.rajagopalan at
Thu Sep 17 14:35:04 UTC 2015

Hey guys,

 I was working on adding user shell commands in RTEMS. Was able to
successfully do it. Right now, we want to add few BSP specific shell
commands and few application specific shell commands. The BSP shell
commands will be added to the BSP, compiled and built. And also give the
flexibility to user application to add application specific commands
later on. One way to do it: 

int bsp1(int argc, char **argv){ 

int bsp2(int argc, char **argv){ 

rtems_shell_cmd_t BSP1_Command = {
 "test1", /* name */
 "test1", /* usage */
 "user", /* topic */
 bsp1, /* command */
 NULL, /* alias */
 NULL /* next */

rtems_shell_cmd_t BSP2_Command = {
 "test2", /* name */
 "test2", /* usage */
 "user", /* topic */
 bsp2, /* command */
 NULL, /* alias */
 NULL /* next */

&BSP2_Command, \

and the same in application code for APP1_Command and APP2_Command. And
initialize the shell in the application code: 

 &APP1_Command, \ 

#include <rtems/shellconfig.h> 

Would this be the right way or are there any better ways to do it?
Please let me know I didn't make myself clear on this. 

Thanks and Regards, 
Sudarshan Rajagopalan 
sudarshan.rajagopalan at

 Cambridge Research Laboratory
 Vecna Technologies, Inc.
 36 Cambridge Park Drive
 Cambridge, MA 02140 [1]

 Better Technology, Better World (TM) 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list