RTEMS on QEMU with virtual serial device

Wendell Silva silvawp at gmail.com
Sun Sep 28 15:19:44 UTC 2014


Have you tried:
  qemu-system-i386 -serial file:/tmp/1.txt -serial file:/tmp/2.txt -kernel
...

Or open ttyS1 instead?

--Wendell.


2014-09-28 4:52 GMT-03:00 Олег Мороз <oleg.moroz at mcc.vniiem.ru>:

> Hello everyone, i'm trying to develop RTEMS app using QEMU VM. How can i
> use virtual serial device for two side data exchange between VM and host
> machine. I'm trying to use it in that way:
>
>
>
> #include <bsp.h> /* for device driver prototypes */
>
> #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
> #define CONFIGURE_APPLICATION_EXTRA_DRIVERS  TTY2_DRIVER_TABLE_ENTRY
> #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
> #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
> #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 6
>
> #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
> #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
> .....
>
>
> then in my app i'm trying to open /dev/ttyS2 device
>
>   unsigned char data[4] = {1,2,3,4};
>   int f =open("/dev/ttyS2", O_RDWR | O_NOCTTY | _FNDELAY);
>   if (f>0)
>   {
>       printf("write data %d\n",write(f,data,4));
>   }
>
> then start QEMU
> qemu-system-i386 -serial file:/tmp/1.txt -kernel zvezda_shell.exe
>
>
> In QEMU shell i've seen
> Device: /dev/ttyS2 initialized.
> write data 4
>
> But in fact file /tmp/1.txt has no data. How can i solve it and use QEMU
> -serial for both side data exchange?
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140928/0a14a3cf/attachment.html>


More information about the devel mailing list