From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33102 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqmqO-0002p1-Pu for qemu-devel@nongnu.org; Wed, 01 Sep 2010 08:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqmqM-0002xC-9J for qemu-devel@nongnu.org; Wed, 01 Sep 2010 08:55:12 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:42320) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqmqM-0002wu-6C for qemu-devel@nongnu.org; Wed, 01 Sep 2010 08:55:10 -0400 Received: by iwn38 with SMTP id 38so6881017iwn.4 for ; Wed, 01 Sep 2010 05:55:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4C7E46AB.1010006@gmail.com> References: <4C7E46AB.1010006@gmail.com> From: Anitha Boyapati Date: Wed, 1 Sep 2010 18:24:41 +0530 Message-ID: Subject: Re: [Qemu-devel] Qemu as Instruction Set Simulator without any OS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Robin Randhawa Hello Robin, >> 1. For a microcontroller which doesn't have any OS support, can QEMU be >> ported without any OS ? > > On the other hand, if your question could be rephrased as 'I want to add = support for a new microcontroller to qemu but I only want to run "bare-meta= l" (not an OS or an application under an OS) software on the model', I thin= k that is certainly possible. > Yes, this is what I have been looking for. Adding support for a new micro-controller which doesn't support any OS yet. >> 2. Can QEMU be used as a simple instruction set simulator with probably >> gdb support for remote debugging? My guess is this would require a >> bootloader to load the application to run the application program (full >> system emulation mode or just machine emulation if there is something >> like that). If yes, what else can be the blocker to have gdb support? > > IMHO, gdb support if available, is available irrespective of the type and= nature of the software being run on qemu. For example, you can create a ba= re-metal application that executes from the reset vector for say, the ARM o= r the MIPS models and have gdb support right from the outset. There is no e= xplicit need for running boot firmware and/or a loader to load an applicati= on program. Not sure if that's what you were after. > My exact requirement is to test a gcc cross-compiler using DejaGnu for a given target (AVR32). While the cross-compiler is ready, there is no simulator. Since there is not much of OS support, I am trying to evaluate if Qemu can still be considered for this purpose. The usage scenario probably goes like this: 1. Qemu-target should be invoked with the application (yes, bare-metal) waiting for some gdb connection. 2. target-gdb is invoked with the same application I am referring to the example given in http://wiki.qemu.org/download/qemu-doc.html#gdb_005fusage : > qemu -s -kernel arch/i386/boot/bzImage -hda root-2.4.20.img -append "root= =3D/dev/hda" However, in my case kernel image doesn't exist. As to the requirement of bootloader, I need to investigate further as various types of memories (FLASH & SRAM for program and data sections) exist. > This does require system-mode emulation support as opposed to user-mode e= mulation for your microcontroller to be implemented. Agreed. System-mode emulation is what is required. Thanks Anitha