Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iunCq-0002TE-FL for mharc-qemu-riscv@gnu.org; Thu, 23 Jan 2020 19:52:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44450) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iunCn-0002LK-5O for qemu-riscv@nongnu.org; Thu, 23 Jan 2020 19:52:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iunCl-0005Op-My for qemu-riscv@nongnu.org; Thu, 23 Jan 2020 19:52:13 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:38253) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iunCi-0005Kz-Nz; Thu, 23 Jan 2020 19:52:08 -0500 Received: by mail-wm1-x341.google.com with SMTP id u2so137585wmc.3; Thu, 23 Jan 2020 16:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fA5rgQGS54xFWPpk3GrHrv/0dS1AA+Mxe8B0VggOsAw=; b=p2O27mzlsMk6bNhx8wzqb0ybxdWxeM39uoI0p5YD6ndKsdNNygoS1gLaeCehHKEQqQ +s07dzQJ2qAvNtF31dqWzGcEBHrCqkE3fkJkXVPCvNUrx56uCayMkvZWOJcCQ8G4sDLh MgfxlYCULkG3R0wZESjR42c3bdV3drrxkCTCPyrpzslFsPwaFSmIS1KIvdYftts0g5NP 68byu/GJb1teptGZaUj9PJY7LOaxgcC32mMA+JvyuwczoJkAek2B7nttPgdD0msVkstG V1iWNlI0Uc9aIPoO233EqfMvTb12Iz5H7DUdYVt2g5RG4z1G4xIYMZJUehJ+5LSaEzh+ gmIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fA5rgQGS54xFWPpk3GrHrv/0dS1AA+Mxe8B0VggOsAw=; b=lRziYZtG+ozjZCmLCdxPVYxTHERuRMZr6ptbpuMx4BJRaepPSLQIpdKlqUg/GTlZpe v4op/salnrJUvTNTQ3CE2dClX+XBXHTQC+/65m6KHBh+oVcOiInze9xX/HBQ7cInPN6c TkBKvgRhzILfplVKRWGseMuYi3Ck40Mv/p5qMazQ5DunV8FEUzC9YgSZ5/sF29obopSm dQcvdQt4ouy8vl9Zhq3s4AZcPaD3P+QZHNqZwCXsy324dBxkqe9mT9Ci++BqaCUuJNw9 4Abl0KoNbMuVZPuTQWBqaR+RXfC+tWkhQ5XwEhfLYTB43ArVdKIObge8dW01dGBWbZwQ BRyA== X-Gm-Message-State: APjAAAUE5zamIxl7O1LOGDUtnXQ6X4h4y+bmUvQ0rVxWFoXr91fXlYvS p92WSfA5dxj1eto6Sf8pJ63mFBcM X-Google-Smtp-Source: APXvYqwUeGdiYo+vlpIgHnaG0oY4EiOtnDLyxRyHFf32QyVGy9TmN9T22bn74ODBDTKBDm1FyfL1iA== X-Received: by 2002:a05:600c:20e:: with SMTP id 14mr576524wmi.104.1579827127586; Thu, 23 Jan 2020 16:52:07 -0800 (PST) Received: from x1w.redhat.com (113.red-83-57-172.dynamicip.rima-tde.net. [83.57.172.113]) by smtp.gmail.com with ESMTPSA id s139sm4598271wme.35.2020.01.23.16.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 16:52:06 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, mrolnik@gmail.com, richard.henderson@linaro.org, me@xcancerberox.com.ar Cc: Alistair Francis , Paolo Bonzini , S.E.Harris@kent.ac.uk, thuth@redhat.com, qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bastian Koppelmann , imammedo@redhat.com, Markus Armbruster , Laurent Vivier , Fam Zheng , Marcel Apfelbaum , Eric Blake , Sagar Karandikar , aleksandar.m.mail@gmail.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , dovgaluk@ispras.ru, Eduardo Habkost , Palmer Dabbelt , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH rc2 14/25] target/avr: Add section about AVR into QEMU documentation Date: Fri, 24 Jan 2020 01:51:20 +0100 Message-Id: <20200124005131.16276-15-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200124005131.16276-1-f4bug@amsat.org> References: <20200124005131.16276-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 00:52:14 -0000 From: Michael Rolnik Signed-off-by: Michael Rolnik Message-Id: <20200118191416.19934-16-mrolnik@gmail.com> Signed-off-by: Richard Henderson [PMD: Fixed typos] Signed-off-by: Philippe Mathieu-Daudé --- rc2: Fixed typos, s/sample/Arduino/, removed -serial section (thuth) --- qemu-doc.texi | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/qemu-doc.texi b/qemu-doc.texi index 39f950471f..89df1d325e 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -1741,6 +1741,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 @@ -2514,6 +2515,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 program.elf is compiled for +AVR cpu +@itemize + +@item Continuous non interrupted execution +@example +qemu-system-avr -kernel program.elf +@end example + +@item Continuous non interrupted execution with serial output into telnet window +@example +qemu-system-avr -kernel program.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 -kernel program.elf -s -S +@end example +and then in another shell +@example +avr-gdb program.elf +@end example +and then within GDB shell +@example +target remote :1234 +@end example + +@item Print out executed instructions +@example +qemu-system-avr -kernel program.elf -d in_asm +@end example + +@end itemize + @node QEMU User space emulator @chapter QEMU User space emulator -- 2.21.1