<br><font size=2><tt>Joel Sherrill <joel.sherrill@oarcorp.com> wrote
on 31/08/2007 16:24:38:<br>
<br>
> Aitor.Viana.Sanchez@esa.int wrote:<br>
> ><br>
> > The same behaviour happens also if I change the "/dev/console_b"
for<br>
> > "/dev/console" device in the fopen call.<br>
> ><br>
> > There is also something strange: If the "r+" option
is set, "no such<br>
> > device" error is raised but if "w+" is set instead,
no error is raised<br>
> > but the fprintf call does not printf anything anyway.<br>
> Break at _open_r() and step through.  fopen() doesn't fail in
this way.</tt></font>
<br>
<br><font size=2><tt>Yes. My fault...in this mode the fopen call does not
fail...is not strange at all ;)</tt></font>
<br><font size=2><tt><br>
> ><br>
> > In the RTEMS configuration file the option<br>
> ><br>
> >         #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>
> ><br>
> > is set as well.<br>
> ><br>
> So the driver is there. Good.</tt></font>
<br><font size=2><tt>Yep.</tt></font>
<br>
<br>
<br><font size=2><tt>I will try to figure out why I cannot write on console_b</tt></font>
<br>
<br>
<br><font size=2><tt>Cheers,</tt></font>
<br><font size=2><tt>        Aitor</tt></font>
<br><font size=2><tt><br>
> ><br>
> > Aitor<br>
> ><br>
> ><br>
> ><br>
> > *Joel Sherrill <joel.sherrill@oarcorp.com>*<br>
> > Sent by: rtems-users-bounces+aitor.viana.sanchez=esa.int@rtems.org<br>
> ><br>
> > 31/08/2007 16:13<br>
> ><br>
> ><br>
> > To<br>
> >  Aitor.Viana.Sanchez@esa.int<br>
> > cc<br>
> >  RTEMS Users <rtems-users@rtems.org><br>
> > Subject<br>
> >  Re: Two UARTS<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Aitor.Viana.Sanchez@esa.int wrote:<br>
> > ><br>
> > > OK,<br>
> > ><br>
> > > I already tried with this code.<br>
> > ><br>
> > >        fp = fopen("/dev/console_b",
"r+");<br>
> > >         if(fp == NULL)<br>
> > >             std::cout <<
strerror(errno) << std::endl;<br>
> > ><br>
> > > ....<br>
> > ><br>
> > >     fprintf(fp, string);<br>
> > >     fflush(fp);<br>
> > ><br>
> > > where string is a char* passed as an argument to the routine<br>
> > > containing the fprintf.<br>
> > ><br>
> > > The problem is that the fopen routine returns "No such
file or<br>
> > > directory" error.<br>
> > ><br>
> > > In the RTEMS configuration file this options are specified<br>
> > ><br>
> > > #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS  
 10<br>
> > > #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS    
      2<br>
> > > #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM<br>
> > ><br>
> > ><br>
> > > In principle, as far as I read, should work, but it does
not. Has<br>
> > > anybody any clue?<br>
> > ><br>
> > ><br>
> > Looking at the CVS head, there is no obvious reason in the leon2
device<br>
> > driver that the /dev/console would work if /dev/console_b doesn't.
  I<br>
> > would recommend stepping into console_open() and seeing what
happens.<br>
> ><br>
> > I assume you still have the console device driver configured
since they<br>
> > are in the same driver.<br>
> ><br>
> > --joel<br>
> > > Cheers,<br>
> > >         Aitor<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > *Aitor.Viana.Sanchez@esa.int*<br>
> > > Sent by: rtems-users-bounces+aitor.viana.sanchez=esa.int@rtems.org<br>
> > ><br>
> > > 31/08/2007 15:21<br>
> > ><br>
> > ><br>
> > > To<br>
> > >         Aitor.Viana.Sanchez@esa.int<br>
> > > cc<br>
> > >         RTEMS Users <rtems-users@rtems.org><br>
> > > Subject<br>
> > >         Re: Two UARTS<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > could be using the devices /dev/console and /dev/console_b<br>
> > ><br>
> > > Cheers<br>
> > ><br>
> > ><br>
> > ><br>
> > > *Aitor.Viana.Sanchez@esa.int*<br>
> > > Sent by: rtems-users-bounces+aitor.viana.sanchez=esa.int@rtems.org<br>
> > ><br>
> > > 31/08/2007 15:16<br>
> > > To<br>
> > >         RTEMS Users <rtems-users@rtems.org><br>
> > > cc<br>
> > ><br>
> > > Subject<br>
> > >         Two UARTS<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > Hi everyone,<br>
> > ><br>
> > > I've got, for sure, and stupid question. I am working with
the RTEMS<br>
> > > for LEON architecture. I know that the standard output is
connected<br>
> > > with the UART1, but I also have an UART2. I would like,
from a user<br>
> > > application, to send some trace information out through
the<br>
> > > UART2...which the easiest way to do that?<br>
> > ><br>
> > > Cheers,<br>
> > >         Aitor<br>
> > ><br>
> > ><br>
> ><br>
> > _______________________________________________<br>
> > rtems-users mailing list<br>
> > rtems-users@rtems.com<br>
> > http://rtems.rtems.org/mailman/listinfo/rtems-users</tt></font>