[PATCH rc4 19/29] target/avr: Add section about AVR into QEMU documentation

Aleksandar Markovic posted 29 patches 5 years, 9 months ago
Maintainers: Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>, Sarah Harris <S.E.Harris@kent.ac.uk>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eduardo Habkost <ehabkost@redhat.com>, Fam Zheng <fam@euphon.net>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Michael Rolnik <mrolnik@gmail.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
[PATCH rc4 19/29] target/avr: Add section about AVR into QEMU documentation
Posted by Aleksandar Markovic 5 years, 9 months ago
From: Michael Rolnik <mrolnik@gmail.com>

Explains basic ways of using AVR target in QEMU.

Signed-off-by: Michael Rolnik <mrolnik@gmail.com>
Message-Id: <20200118191416.19934-16-mrolnik@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
[PMD: Fixed typos]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
---
 qemu-doc.texi | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/qemu-doc.texi b/qemu-doc.texi
index 2328e7e..aaf4e54 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1723,6 +1723,7 @@ differences are mentioned in the following sections.
 * Microblaze System emulator::
 * SH4 System emulator::
 * Xtensa System emulator::
+* AVR System emulator::
 @end menu
 
 @node PowerPC System emulator
@@ -2496,6 +2497,56 @@ so should only be used with trusted guest OS.
 
 @c man end
 
+@node AVR System emulator
+@section AVR System emulator
+@cindex system emulation (AVR)
+
+Use the executable @file{qemu-system-avr} to emulates a AVR 8 bit based machine
+having one for the following cores: avr1, avr2, avr25, avr3, avr31, avr35, avr4,
+avr5, avr51, avr6, avrtiny, xmega2, xmega3, xmega4, xmega5, xmega6 and xmega7.
+
+As for now it supports few Arduino boards for educational and testing purposes.
+These boards use a ATmega controller, which model is limited to USART & 16 bit
+timer devices, enought to run FreeRTOS based applications (like this @url{https://github.com/seharris/qemu-avr-tests/blob/master/free-rtos/Demo/AVR_ATMega2560_GCC/demo.elf,,demo})
+
+Following are examples of possible usages, assuming demo.elf is compiled for
+AVR cpu
+@itemize
+
+@item Continuous non interrupted execution
+@example
+qemu-system-avr -machine mega2560 -bios demo.elf
+@end example
+
+@item Continuous non interrupted execution with serial output into telnet window
+@example
+qemu-system-avr -machine mega2560 -bios demo.elf -serial tcp::5678,server,nowait -nographic
+@end example
+and then in another shell
+@example
+telnet localhost 5678
+@end example
+
+@item Debugging wit GDB debugger
+@example
+qemu-system-avr -machine mega2560 -bios demo.elf -s -S
+@end example
+and then in another shell
+@example
+avr-gdb demo.elf
+@end example
+and then within GDB shell
+@example
+target remote :1234
+@end example
+
+@item Print out executed instructions
+@example
+qemu-system-avr -machine mega2560 -bios demo.elf -d in_asm
+@end example
+
+@end itemize
+
 @node QEMU User space emulator
 @chapter QEMU User space emulator
 
-- 
2.7.4


Re: [PATCH rc4 19/29] target/avr: Add section about AVR into QEMU documentation
Posted by Aleksandar Markovic 5 years, 9 months ago
On Friday, January 31, 2020, Aleksandar Markovic <
aleksandar.markovic@rt-rk.com> wrote:

> From: Michael Rolnik <mrolnik@gmail.com>
>
> Explains basic ways of using AVR target in QEMU.
>
> Signed-off-by: Michael Rolnik <mrolnik@gmail.com>
> Message-Id: <20200118191416.19934-16-mrolnik@gmail.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> [PMD: Fixed typos]
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
> ---
>  qemu-doc.texi | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 51 insertions(+)
>
>
Reviewed-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com>


> diff --git a/qemu-doc.texi b/qemu-doc.texi
> index 2328e7e..aaf4e54 100644
> --- a/qemu-doc.texi
> +++ b/qemu-doc.texi
> @@ -1723,6 +1723,7 @@ differences are mentioned in the following sections.
>  * Microblaze System emulator::
>  * SH4 System emulator::
>  * Xtensa System emulator::
> +* AVR System emulator::
>  @end menu
>
>  @node PowerPC System emulator
> @@ -2496,6 +2497,56 @@ so should only be used with trusted guest OS.
>
>  @c man end
>
> +@node AVR System emulator
> +@section AVR System emulator
> +@cindex system emulation (AVR)
> +
> +Use the executable @file{qemu-system-avr} to emulates a AVR 8 bit based
> machine
> +having one for the following cores: avr1, avr2, avr25, avr3, avr31,
> avr35, avr4,
> +avr5, avr51, avr6, avrtiny, xmega2, xmega3, xmega4, xmega5, xmega6 and
> xmega7.
> +
> +As for now it supports few Arduino boards for educational and testing
> purposes.
> +These boards use a ATmega controller, which model is limited to USART &
> 16 bit
> +timer devices, enought to run FreeRTOS based applications (like this @url{
> https://github.com/seharris/qemu-avr-tests/blob/master/free-rtos/Demo/AVR_
> ATMega2560_GCC/demo.elf,,demo})
> +
> +Following are examples of possible usages, assuming demo.elf is compiled
> for
> +AVR cpu
> +@itemize
> +
> +@item Continuous non interrupted execution
> +@example
> +qemu-system-avr -machine mega2560 -bios demo.elf
> +@end example
> +
> +@item Continuous non interrupted execution with serial output into telnet
> window
> +@example
> +qemu-system-avr -machine mega2560 -bios demo.elf -serial
> tcp::5678,server,nowait -nographic
> +@end example
> +and then in another shell
> +@example
> +telnet localhost 5678
> +@end example
> +
> +@item Debugging wit GDB debugger
> +@example
> +qemu-system-avr -machine mega2560 -bios demo.elf -s -S
> +@end example
> +and then in another shell
> +@example
> +avr-gdb demo.elf
> +@end example
> +and then within GDB shell
> +@example
> +target remote :1234
> +@end example
> +
> +@item Print out executed instructions
> +@example
> +qemu-system-avr -machine mega2560 -bios demo.elf -d in_asm
> +@end example
> +
> +@end itemize
> +
>  @node QEMU User space emulator
>  @chapter QEMU User space emulator
>
> --
> 2.7.4
>
>