Two UARTS

Joel Sherrill joel.sherrill at oarcorp.com
Fri Aug 31 14:24:38 UTC 2007


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




More information about the users mailing list