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