Two UARTS

Joel Sherrill joel.sherrill at oarcorp.com
Fri Aug 31 14:13:56 UTC 2007


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  
>
>




More information about the users mailing list