how do I use shell.c?
ianc at goanna.iinet.net.au
Wed Apr 30 21:26:33 CDT 2008
> Thanks for the reply, Ian,
> - We have an Sparc eval board that has 2 ports: 1 is debug port, 1 is
> application port.
> From debug port, I load/run application. The output goes out to the
> rs-232 application port.
> So, am I supposed to specify this app port (/dev/console) as 'device' to
> When I tried that, I got the message:
> "shell: unalbel to open stdin./dev/console:Too many open files in system"?
It look like you don't have enough FILE descriptors defined. You need
to define this before you include "confdefs.h" in your application
The define you need is:
default only provides 3, you will need to increase it by at least 3 for
the shell as there is an fopen for stdin, stdout and stderr
> Ian Caddy wrote:
>> The shell (and monitor) works for us, although we are using an older
>> version of RTEMS and the shell was not integrated into RTEMS at the
>> time. Our shell has also been cusotmised to add our specific commands
>> that we required for our applications as well.
>> All you need to do so start the shell is call:
>> shell_init (at the bottom of shell.c)
>> with the required parameters for your system. The main one being
>> where you want your console to live which would be one of your serial
>> port devices I assume.
>> It is also possible to use the shell through telnet as well through
>> the pty interfaces, but you need to make sure the telnet server is
>> also started.
>> I hope this helps.
>> Ian Caddy
> rtems-users mailing list
> rtems-users at rtems.com
Goanna Technologies Pty Ltd
+61 8 9444 2634
More information about the rtems-users