From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12308 invoked by alias); 27 Mar 2008 14:39:13 -0000 Received: (qmail 12261 invoked by uid 22791); 27 Mar 2008 14:39:11 -0000 X-Spam-Check-By: sourceware.org Received: from smtp.silicomp.fr (HELO smtp.silicomp.fr) (194.51.78.40) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 27 Mar 2008 14:38:44 +0000 Received: from PC1475 ([172.16.6.128]) by smtp.silicomp.fr (8.13.8/8.12.10) with ESMTP id m2REcYVO002173; Thu, 27 Mar 2008 15:38:34 +0100 Message-Id: <200803271438.m2REcYVO002173@smtp.silicomp.fr> From: =?iso-8859-1?Q?J=E9r=E9my_Alles?= To: "'Gary Thomas'" Cc: "'eCos Discussion'" Date: Thu, 27 Mar 2008 14:55:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <47EB8F63.50609@mlbassoc.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (smtp.silicomp.fr [194.51.78.40]); Thu, 27 Mar 2008 15:38:34 +0100 (CET) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: RE: [ECOS] Configuring an eCos application to debug it using GDB X-SW-Source: 2008-03/txt/msg00176.txt.bz2 Thank you for your answers... After some check, I'm able to use GDB over serial line (and by loading properly the symbols as you describe).=20 However, it is quite long to load a 4.5MB programm...=20 Any idea why this is not working throught Ethernet ? Am I supposed to change something in eCos's configuration ? Jeremy -----Message d'origine----- De : ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] De la part de Gary Thomas Envoy=E9 : jeudi 27 mars 2008 13:13 =C0 : J=E9r=E9my Alles Cc : 'eCos Discussion' Objet : Re: [ECOS] Configuring an eCos application to debug it using GDB J=E9r=E9my Alles wrote: > Hi, >=20=20 > I'm trying to configure properly my eCos application in order to=20 > debug it using GDB (over Ethernet). I'm using an AT91 based=20 > development kit with Redboot already flashed on it (by someone else in=20 > my company). My board has IP 192.168.1.20, and I can successfully connect to it from arm-elf-gdb. >=20=20=20=20=20 > The problem is I think that I'm missing something in my configuration=20 > (ecos.ecc), as when my application starts, it returns 54321 and not=20 > something like $O3534313231#56+. That is why I think i'm doing=20 > something wrong. Where/when did you get this? If you load and run your application directly from RedBoot, then when you print (via diag_printf()) to the console, the mangling is disabled and you'll see the actual string. If you load and start your application via GDB (even if it's RedBoot providing the GDB support), then mangling is enabled and the strings are sent through the GDB protocol. Only if you somehow got eCos confused and it thought there was a GDB agent on the console would you ever see the $O..#.. line. >=20 > jalles@jalles1475:~/local_repository/drivers/led$ arm-elf-gdb GNU gdb=20 > 5.3 (eCosCentric) Copyright 2002 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and=20 > you are welcome to change it and/or distribute copies of it under=20 > 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=3Di686-pc-linux-gnu --target=3Darm-elf= ". > (gdb) target remote 192.168.1.20:9000 > Remote debugging using 192.168.1.20:9000 0x10027580 in ?? () > (gdb) load main.elf > Loading section .rom_vectors, size 0x40 lma 0x20040000 Loading section=20 > .text, size 0x6948 lma 0x20040040 Loading section .rodata, size 0x284=20 > lma 0x20046988 Loading section .data, size 0x6cc lma 0x20046c0c Start=20 > address 0x20040040, load size 29400 Transfer rate: 235200 bits/sec,=20 > 294 bytes/write. > (gdb) c > Continuing. >=20 > Moreover, if I want to use a break point, the load command is not > enough: >=20 > (gdb) load main.elf > Loading section .rom_vectors, size 0x40 lma 0x20040000 Loading section=20 > .text, size 0x7f07c lma 0x20040040 Loading section .rodata, size=20 > 0x4f5d4 lma 0x200bf0bc Loading section .data, size 0x5264 lma=20 > 0x2010e690 Start address 0x20040040, load size 866548 Transfer rate:=20 > 407787 bits/sec, 299 bytes/write. > (gdb) b main > No symbol table is loaded. Use the "file" command. >=20 > Whereas I build my application using the -g option... Any idea ? You've not told GDB about the symbols. It's much better to start GDB like this: $ arm-elf-gdb main.elf (gdb) target remote XYZ:9000 (gdb) load (gdb) b main (gdb) cont -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss