<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hello Ajish,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>  I also passed through a similar issue some time ago. I currently have RTEMS 4.10 with the RCC-1.2.2 version installed.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style:
 normal;"><span>  In case you find it useful, here are part of my config:</span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: small;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br></span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: small;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span><span>...<br><span></span></span></span></span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: small;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span><span>#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER</span></span></span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size:
 13px;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span><span>...</span></span></span></span><br></div><span style="font-size: small;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"></span></span><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: 13px;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">    int dev_fd;</span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-size: 13px; font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-size: 13px;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">    struct termios newTerm;</span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-size: 13px; font-family: Courier
 New,courier,monaco,monospace,sans-serif;"><span style="font-size: 13px;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">...</span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-size: 13px; font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-size: 13px;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">...<br></span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-size: 13px; font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-size: 13px;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br></span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-size: 13px; font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-size: 13px;"><span
 style="font-family: Courier New,courier,monaco,monospace,sans-serif;">   /* Opening Communication devices (/dev/console_x) */ <br></span></span></div><span style="font-size: 13px;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span><span>   dev_fd = open("/dev/console", O_RDWR<span>);</span></span></span><br>    <br>   /* Get current configuration */<br>   tcgetattr(dev_fd, &newTerm);<br><br>   newTerm.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE|IEXTEN|ISIG);<br><br>   /* Local mode and receiver enabled */<br>   newTerm.c_cflag |= (CLOCAL | CREAD);<br><br>   /* 8 bits, enable receiver */<br>   newTerm.c_cflag |= CS8;<br><br>   /* Raw output */<br>   newTerm.c_oflag &= ~OPOST;<br><br>   /* Ignore breaks. */<br>   newTerm.c_iflag = 
 IGNBRK;<br>   newTerm.c_iflag &= ~INLCR; /*input modes*/<br><br>   /* Update driver's settings */<br>   tcsetattr(dev_fd, TCSANOW, &newTerm);<br>   tcflush(dev_fd, TCIOFLUSH);<br>}<br><span style="font-size: medium;"><span style="font-family: arial,helvetica,sans-serif;"><br>Hope it helps,<br>Elias<br></span></span></span></span><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-size: small;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><br></span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span></span></div><div><br></div>  <div
 style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">De:</span></b> Ajish Babu <babu.ajish@googlemail.com><br> <b><span style="font-weight: bold;">Para:</span></b> Cláudio Silva <claudiodcsilva@gmail.com> <br><b><span style="font-weight: bold;">CC:</span></b> rtems-users@rtems.org <br> <b><span style="font-weight: bold;">Enviado:</span></b> lunes, 19 de noviembre de 2012 10:00<br> <b><span style="font-weight: bold;">Asunto:</span></b> Re: leon3 console driver output processing<br> </font> </div> <br>Hello Claudio,<br><br>Thanks a lot ... Half of the problem is fixed now. '\n' is not appended <br>with '\r' anymore.<br><br>But I still have the problem that 0x7D is appended with 0x5D or 0x5E. <br>Where is this happening? How do I diable
 it?<br><br>regards<br>Ajish<br><br><br>On 11/19/2012 12:46 PM, Cláudio Silva wrote:<br>> Hello, Ajish,<br>><br>> Sorry, that documentation is for Gaisler's RTEMS version that is not<br>> yet merged to RTEMS and has the driver manager.<br>><br>> You can find the older documentation here:<br>> <a href="http://gaisler.com/anonftp/rcc/doc/rtems-gaisler-drivers-1.0.2.pdf" target="_blank">http://gaisler.com/anonftp/rcc/doc/rtems-gaisler-drivers-1.0.2.pdf</a><br>><br>> You will need to register the apbuart driver using:<br>> "apbuart_register(&amba_conf)" as described in the above document.<br>> Using the apbuart driver concurrently with the regular console<br>> (printf...) may lead to problems....<br>><br>> Alternatively, you can edit the console code so it stops appending the<br>> '\r'. I think you can do so by editing the following file:<br>> <a
 href="https://github.com/RTEMS/rtems/blob/master/c/src/lib/libbsp/sparc/leon3/console/printk_support.c" target="_blank">https://github.com/RTEMS/rtems/blob/master/c/src/lib/libbsp/sparc/leon3/console/printk_support.c</a><br>> and changing the line 146 from "apbuart_outbyte_polled(dbg_uart, c, 1,<br>> 1);" to "apbuart_outbyte_polled(dbg_uart, c, 0, 1);"<br>><br>> Regards,<br>> Cláudio<br>><br>><br>> On Mon, Nov 19, 2012 at 11:21 AM, Ajish Babu <<a ymailto="mailto:babu.ajish@googlemail.com" href="mailto:babu.ajish@googlemail.com">babu.ajish@googlemail.com</a>> wrote:<br>>> Hello,<br>>><br>>> Claudio ... thanks for your response.<br>>><br>>> I still can't get it to work. I tried int fd = open("/dev/apbuart0", O_RDWR)<br>>> with different uart numbers, but it could not find anything. According to<br>>> the driver documentation, I should use the driver-manager, but<br>>>
 <drvmgr/drvmgr_confdefs.h> is not found.<br>>><br>>> How can I enable this apbuart driver? I am using rtems version 4.11.<br>>><br>>> regards<br>>> Ajish<br>>><br>>><br>>> _______________________________________________<br>>> rtems-users mailing list<br>>> <a ymailto="mailto:rtems-users@rtems.org" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>>> <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>>><br><br>_______________________________________________<br>rtems-users mailing list<br><a ymailto="mailto:rtems-users@rtems.org" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br><a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br><br><br> </div> </div>  </div></body></html>