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: Peter Maydell
Subject: Re: [QEMU]send key event from monitor
Date: Mon, 24 Aug 2020 11:25:40 +0100

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]