RTEMS on QEMU with virtual serial device

Joel Sherrill joel.sherrill at oarcorp.com
Wed Oct 1 14:18:39 UTC 2014


On 10/1/2014 7:42 AM, Мороз Олег wrote:
> I think thats all that i've changed. But a can send it as patch if you 
> can say me how do it.

http://wiki.rtems.org/wiki/index.php/Git_Users has instructions on
simple branches and submitting a patch.  Hopefully it is enough.
>
> On 01.10.2014 16:40, Sebastian Huber wrote:
>> On 01/10/14 14:35, Мороз Олег wrote:
>>> I've solved my problem using code changes
>>>
>>> diff --git a/c/src/lib/libbsp/i386/shared/comm/uart.c
>>> b/c/src/lib/libbsp/i386/shared/comm/uart.c
>>>
>>> index 3c4d42a..3552fe6 100644
>>>
>>> --- a/c/src/lib/libbsp/i386/shared/comm/uart.c
>>>
>>> +++ b/c/src/lib/libbsp/i386/shared/comm/uart.c
>>>
>>> @@ -568,12 +568,13 @@ BSP_uart_termios_read_com2(int uart)
>>>
>>> ssize_t
>>>
>>> BSP_uart_termios_write_com1(int minor, const char *buf, size_t len)
>>>
>>> {
>>>
>>> + if(len <= 0)
>>>
>>> + {
>>>
>>> + return 0;
>>>
>>> + }
>>>
>>> assert(buf != NULL);
>>>
>>> - if(len <= 0)
>>>
>>> - {
>>>
>>> - return 0;
>>>
>>> - }
>>>
>>> +
>>>
>>> /* If there TX buffer is busy - something is royally screwed up */
>>>
>>> assert((uread(BSP_UART_COM1, LSR) & THRE) != 0);
>>>
>>> @@ -602,13 +603,13 @@ BSP_uart_termios_write_com1(int minor, const 
>>> char *buf,
>>> size_t len)
>>>
>>> ssize_t
>>>
>>> BSP_uart_termios_write_com2(int minor, const char *buf, size_t len)
>>>
>>> {
>>>
>>> - assert(buf != NULL);
>>>
>>> +
>>>
>>> if(len <= 0)
>>>
>>> {
>>>
>>> return 0;
>>>
>>> }
>>>
>>> -
>>>
>>> + assert(buf != NULL);
>>>
>>> /* If there TX buffer is busy - something is royally screwed up */
>>>
>>> assert((uread(BSP_UART_COM2, LSR) & THRE) != 0);
>>>
>>>
>>>
>>>
>>> Is it alright?
>> Yes, this looks all right, can you please send a complete patch.
>>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list