<br><font size=2 face="sans-serif">The same behaviour happens also if I
change the "/dev/console_b" for "/dev/console" device
in the fopen call. </font>
<br>
<br><font size=2 face="sans-serif">There is also something strange: If
the "r+" option is set, "no such device" error is raised
but if "w+" is set instead, no error is raised but the fprintf
call does not printf anything anyway.</font>
<br>
<br><font size=2 face="sans-serif">In the RTEMS configuration file the
option</font>
<br>
<br><font size=2 face="sans-serif"> #define
CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER</font>
<br>
<br><font size=2 face="sans-serif">is set as well.</font>
<br>
<br>
<br><font size=2 face="sans-serif">Aitor</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Joel Sherrill <joel.sherrill@oarcorp.com></b>
</font>
<br><font size=1 face="sans-serif">Sent by: rtems-users-bounces+aitor.viana.sanchez=esa.int@rtems.org</font>
<p><font size=1 face="sans-serif">31/08/2007 16:13</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Aitor.Viana.Sanchez@esa.int</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">RTEMS Users <rtems-users@rtems.org></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: Two UARTS</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br><font size=2><tt>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>
</tt></font>
<br><font size=2><tt>I assume you still have the console device driver
configured since they<br>
are in the same driver.<br>
</tt></font>
<br><font size=2><tt>--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>
</tt></font>
<br><font size=2><tt>_______________________________________________<br>
rtems-users mailing list<br>
rtems-users@rtems.com<br>
http://rtems.rtems.org/mailman/listinfo/rtems-users</tt></font>
<br>