From nobody Thu Nov 13 12:13:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1579827439; cv=none; d=zohomail.com; s=zohoarc; b=IKGkm9zS9sQelCNfOu32DQtVc0kdnrXI/AgHctW6pqPgBfGv1grsVBZAQdOxlh8IdURAGK4Lfd11Z7XgQQZX4rtlC6h8a22OBAJRP9Ai6tSPhmh/Gc3gZRDIUdVanQhcvcRGUUYV7qfGEmr1ZkcBL3n79qDpUZmzrAZ8DmLx35I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579827439; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fA5rgQGS54xFWPpk3GrHrv/0dS1AA+Mxe8B0VggOsAw=; b=GzaLyYUBLnPCGXEbzlpLlqzSLW/YxClJ1wRWI8xQn0rIQ9ddNsfjNJNxktn1B3N4hZu34UxHcmIrB5kS4t3qmSkurehWn+7dlq4BtEPxfv2QAzirW0e4BLL+VV9zslWqtAUsEgqRUjZqnK3aYQDa+UtFEHk/p/rZoFQrH3NTRok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579827439355119.54366012334845; Thu, 23 Jan 2020 16:57:19 -0800 (PST) Received: from localhost ([::1]:36078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iunHi-0005Bd-9v for importer@patchew.org; Thu, 23 Jan 2020 19:57:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44403) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iunCk-0002EK-Ak for qemu-devel@nongnu.org; Thu, 23 Jan 2020 19:52:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iunCi-0005MK-V2 for qemu-devel@nongnu.org; Thu, 23 Jan 2020 19:52:10 -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) 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) 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) 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 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: quoted-printable 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-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Fam Zheng , S.E.Harris@kent.ac.uk, qemu-riscv@nongnu.org, Eduardo Habkost , Sagar Karandikar , dovgaluk@ispras.ru, Bastian Koppelmann , thuth@redhat.com, Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Alistair Francis , imammedo@redhat.com, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , aleksandar.m.mail@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 --- 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 =20 @node PowerPC System emulator @@ -2514,6 +2515,56 @@ so should only be used with trusted guest OS. =20 @c man end =20 +@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 ma= chine +having one for the following cores: avr1, avr2, avr25, avr3, avr31, avr35,= avr4, +avr5, avr51, avr6, avrtiny, xmega2, xmega3, xmega4, xmega5, xmega6 and xme= ga7. + +As for now it supports few Arduino boards for educational and testing purp= oses. +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_A= TMega2560_GCC/demo.elf,,demo}) + +Following are examples of possible usages, assuming program.elf is compile= d 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 -nogra= phic +@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 =20 --=20 2.21.1