0
votes

I am trying to use the qemu-system-arm.exe on Windows 10 to simulate an ARM environment.

I use below command to disable serial and graphic:

qemu-system-arm -machine versatilepb -kernel t.bin -nographic -serial none

I set the -serial none because my t.bin doesn't touch the serial port of the QEMU virtual machine. So there should be no data on the serial line.

But when I type commands in the (qemu) prompt, it contains many unexpected control characters. Though the command seems still working.

QEMU 4.0.95 monitor - type 'help' for more information

(qemu) h[K[Dhe[K[D[Dhel[K[D[D[Dhelp[K

I also tried to use com0com to create a pair of virtual serial ports. And connect them as below.

enter image description here

But both ends show nothing as I type commands. I guess it was due to incorrect baud rate. So I tried a few but still no luck. As said above, I think the serial line is quite because there's serial communication happening.

I launched qemu the same way on Linux, the (qemu) prompt works perfect. Only Windows has such mess characters.

So how to redirect (qemu) output to Windows cmd console properly? I just want to check some machine states.

2

2 Answers

0
votes

(Well, this is just a work around...)

I launch exactly the same command within a Cygwin shell, the mess characters disappear now...

0
votes

ANSI support is missing in the Windows command console (before Windows 10 Terminal app).

Your com0com solution works just fine, at least for me (QEMU on Windows 8.1 emulating Debian MIPS).

All I had to do was to add the following, and then connect with PuTTY to COM9:

-chardev tty,path=COM8,id=hostcom8 -device pci-serial,chardev=hostcom8 -append "console=ttyS2" (I had ttyS0 and ttyS1 virtual serial ports)