qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QEMU]send key event from monitor


From: Mircea Cociuba
Subject: Re: [QEMU]send key event from monitor
Date: Tue, 25 Aug 2020 16:23:47 +0000 (UTC)

Hello again,

Reading the CharDev docus is teadious, and I am having trouble keeping up with it.
I am not asking for spoon feeding, but if my question is considered as such please ignore it(I will keep reading the docs)
What command must I specify to qemu to link the devices UART to a TCP chardev?(windows user here, I have to use windows)

Current command for starting qemu: 
qemu-system-arm -M lm3s6965evb -m 8K -nographic -kernel notmain.bin

if you can tell me this, I can use netcat to comunicate with it easly.

Br
Mircea Cociuba
"To be or not to be, that is not a question, it's FF".


On Monday, August 24, 2020, 01:26:00 PM GMT+3, Peter Maydell <peter.maydell@linaro.org> wrote:


On Mon, 24 Aug 2020 at 11:02, Mircea Cociuba <cociuba_mircea@yahoo.com> wrote:
> I get that, I also think that is the problem.
> How come the current console works then?

That's because your command line will (presumably; you don't
say what it is) be configuring QEMU to say "connect the
current stdin/stdout to this UART". You can alternatively
configure it to connect the UART to a TCP port, or to
display in the GUI window, or various other options (see the
docs about configuring 'chardev' backends, which is what the UART
emulation connects to:
https://www.qemu.org/docs/master/system/invocation.html#hxtool-6 )

> I mean, thinking about it makes sense that qemu "sees" something to send to the bare-metal program, how to do it from the monitor?

There isn't any support in the monitor for sending characters to
a chardev, I'm afraid (except for the special case of sending a
'break' event with "chardev-send-break"). Usually people who want
to automate sending things to a UART just set it up so the
chardev backend is a TCP socket or a file descriptor or similar
which the automation can then read/write. (Obviously this then
means you don't have the human-can-interact-with-it-too behaviour,
unless you put something on the other end of the socket/fd that
will multiplex human and automated input.) If you really need
to have something you can interact with from the monitor prompt
in particular then maybe the 'ringbuf' chardev backend and the
ringbuf_read/ringbuf_write monitor commands will be useful, but
I've never used them myself.


thanks
-- PMM


reply via email to

[Prev in Thread] Current Thread [Next in Thread]