leon3 console driver output processing

Espúreo Fernandez-Ulloa estados_espureos at yahoo.com.ar
Mon Nov 19 15:13:31 UTC 2012


Hello Ajish,

  I also passed through a similar issue some time ago. I currently have RTEMS 4.10 with the RCC-1.2.2 version installed.

  In case you find it useful, here are part of my config:

...

#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
...

    int dev_fd;
    struct termiosnewTerm;
...
...


   /* Opening Communication devices (/dev/console_x) */ 
   dev_fd = open("/dev/console", O_RDWR);
    
   /* Get current configuration */
   tcgetattr(dev_fd, &newTerm);

   newTerm.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE|IEXTEN|ISIG);

   /* Local mode and receiver enabled */
   newTerm.c_cflag |= (CLOCAL | CREAD);

   /* 8 bits, enable receiver */
   newTerm.c_cflag |= CS8;

   /* Raw output */
   newTerm.c_oflag &= ~OPOST;

   /* Ignore breaks. */
   newTerm.c_iflag =  IGNBRK;
   newTerm.c_iflag &= ~INLCR; /*input modes*/

   /* Update driver's settings */
   tcsetattr(dev_fd, TCSANOW, &newTerm);
   tcflush(dev_fd, TCIOFLUSH);
}

Hope it helps,
Elias






________________________________
 De: Ajish Babu <babu.ajish at googlemail.com>
Para: Cláudio Silva <claudiodcsilva at gmail.com> 
CC: rtems-users at rtems.org 
Enviado: lunes, 19 de noviembre de 2012 10:00
Asunto: Re: leon3 console driver output processing
 
Hello Claudio,

Thanks a lot ... Half of the problem is fixed now. '\n' is not appended 
with '\r' anymore.

But I still have the problem that 0x7D is appended with 0x5D or 0x5E. 
Where is this happening? How do I diable it?

regards
Ajish


On 11/19/2012 12:46 PM, Cláudio Silva wrote:
> Hello, Ajish,
>
> Sorry, that documentation is for Gaisler's RTEMS version that is not
> yet merged to RTEMS and has the driver manager.
>
> You can find the older documentation here:
> http://gaisler.com/anonftp/rcc/doc/rtems-gaisler-drivers-1.0.2.pdf
>
> You will need to register the apbuart driver using:
> "apbuart_register(&amba_conf)" as described in the above document.
> Using the apbuart driver concurrently with the regular console
> (printf...) may lead to problems....
>
> Alternatively, you can edit the console code so it stops appending the
> '\r'. I think you can do so by editing the following file:
> https://github.com/RTEMS/rtems/blob/master/c/src/lib/libbsp/sparc/leon3/console/printk_support.c
> and changing the line 146 from "apbuart_outbyte_polled(dbg_uart, c, 1,
> 1);" to "apbuart_outbyte_polled(dbg_uart, c, 0, 1);"
>
> Regards,
> Cláudio
>
>
> On Mon, Nov 19, 2012 at 11:21 AM, Ajish Babu <babu.ajish at googlemail.com> wrote:
>> Hello,
>>
>> Claudio ... thanks for your response.
>>
>> I still can't get it to work. I tried int fd = open("/dev/apbuart0", O_RDWR)
>> with different uart numbers, but it could not find anything. According to
>> the driver documentation, I should use the driver-manager, but
>> <drvmgr/drvmgr_confdefs.h> is not found.
>>
>> How can I enable this apbuart driver? I am using rtems version 4.11.
>>
>> regards
>> Ajish
>>
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
>>

_______________________________________________
rtems-users mailing list
rtems-users at rtems.org
http://www.rtems.org/mailman/listinfo/rtems-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20121119/48aef735/attachment.html>


More information about the users mailing list