From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24762 invoked by alias); 28 Sep 2005 18:31:56 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 23863 invoked by uid 22791); 28 Sep 2005 18:30:43 -0000 Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 28 Sep 2005 18:30:43 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1EKghT-0006RP-00; Wed, 28 Sep 2005 20:30:39 +0200 Date: Wed, 28 Sep 2005 23:56:00 -0000 To: Rutger Hofman Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20050928183039.GW8421@lunn.ch> Mail-Followup-To: Rutger Hofman , ecos-discuss@ecos.sourceware.org References: <433ADC4C.10706@few.vu.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <433ADC4C.10706@few.vu.nl> User-Agent: Mutt/1.5.10i From: Andrew Lunn Subject: Re: [ECOS] Newbie question: (gdb) target sim doesn't work for me X-SW-Source: 2005-09/txt/msg00252.txt.bz2 On Wed, Sep 28, 2005 at 08:09:16PM +0200, Rutger Hofman wrote: > Hi list, > > I'm trying to evaluate eCos for our Xscale board, but > I don't seem to be able to get started even using > the gdb simulator; the build seems OK, making the test > program seems OK, but running from gdb with 'target sim' > leads to prolonged silence. > > Details: > > I tried a number of templates, for StrongArm, Intel Xscale > boards, etc, just to see if I could run with the gdb > simulator, but all fail in the same way. > > Example: Intel StrongArm SA1100 board. > I configure this as if out-of-the box. Do build tree, make > (works both using configtool or command line tool). The > typical compile command within the build of eCos itself > is like: > > ------------------------------------------------------------------------- > arm-elf-gcc -c > -I/home/rutger/projects/rfid-guardian/ecos/strongArm/strongArm-sa1100_install/include > -I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0 > -I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/src > -I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/tests > -I. > -I/home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/src/ > -mcpu=strongarm1100 -Wall -Wpointer-arith -Wstrict-prototypes -Winline > -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections > -fno-rtti -fno-exceptions -fvtable-gc -finit-priority > -Wp,-MD,src/hal_diag.tmp -o src/hal_arm_sa11x0_var_hal_diag.o > /home/rutger/projects/rfid-guardian/ecos/ecos-2.0/packages/hal/arm/sa11x0/var/v2_0/src/hal_diag.c > ------------------------------------------------------------------------- > > So then I create my hello.c: > > ------------------------------------------------------------------------- > #include > > int main(int argc, char *argv[]) > { > printf("Hello world\n"); > return 0; > } > ------------------------------------------------------------------------- > > and compile this way: > > ------------------------------------------------------------------------- > /home/rutger/projects/rfid-guardian/ecos/gnutools/arm-elf/bin/arm-elf-gcc > -Wall -g2 -mcpu=strongarm1100 -Wpointer-arith -Wstrict-prototypes -Winline > -Wundef -Woverloaded-virtual -ffunction-sections -fdata-sections -fno-rtti > -fno-exceptions -fvtable-gc -finit-priority > -I/home/rutger/projects/rfid-guardian/ecos/strongArm/strongArm-sa1100_install/include > -L/home/rutger/projects/rfid-guardian/ecos/strongArm/strongArm-sa1100_install/lib > -Ttarget.ld -nostdlib hello.c -o hello > ------------------------------------------------------------------------- > > (borrowed all these flags from the standard eCos build, although methinks > that > arm-elf-gcc -g -I...._install/include -L...._install/lib -Ttarget.ld > -nostdlib > would work as well; in this case, fail in the same way). > > All successful. > > Then I follow the example in the User Manual: > > ------------------------------------------------------------------------- > $ arm-elf-gdb -nw hello > GNU gdb 5.3 (eCosCentric) > Copyright 2002 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"... > (gdb) target sim > Connected to the simulator. > (gdb) load > Loading section .rom_vectors, size 0x40 vma 0x40000000 > Loading section .text, size 0x10274 vma 0x40000040 > Loading section .rodata, size 0x29c vma 0x400102b4 > Loading section .data, size 0x564 vma 0x8000 > Start address 0x40000040 > Transfer rate: 546208 bits in <1 sec. > (gdb) run > > > ------------------------------------------------------------------------- > > Then prolonged silence. If I interrupt, the stack trace is typically: > > ------------------------------------------------------------------------- > Program received signal SIGINT, Interrupt. > 0x9da48ef8 in ?? () > ------------------------------------------------------------------------- > > > Where do I screw up? Or is gdb simulator usage impossible for a board > with devices, interrupt vectors etc that I don't have here? I think you are on the right lines with your last sentence. Check the documentation and see what the simulator actually simulates. Quite often they are just instruction set simulators are contain no simulation of devices. If you just want to get a feel of eCos without using any hardware i would recommend the synthetic target. http://ecos.sourceware.org/docs-latest/ref/hal-synth-arch.html Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss