how do I use shell.c?
Ian Caddy
ianc at goanna.iinet.net.au
Thu May 1 02:26:33 UTC 2008
Hi Mike,
mike wrote:
> 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
> shell_init(...)?
> 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:
CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS
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
regards,
Ian Caddy
>
> 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.
>>
>> regards,
>>
>> Ian Caddy
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
--
Ian Caddy
Goanna Technologies Pty Ltd
+61 8 9444 2634
More information about the users
mailing list