This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

redboot GDB remote debugging over serial problem.


Hello list,

   I am having a problem when I try to debug an executable on my host
machine that is connecting to a target with GDB through serial. Here
are the steps that I have been taking:

1) Compile the code for the proper target and include debugging
  symbols.

  ~/src/c/arm/ > make
  arm-elf-gdb -g -c -Wall -I./include blink.c
  arm-elf-gdb -g -c -Wall -I./include led.c
  arm-elf-ld -Map blink.map -T viperlite.ld -N -o blink led.o blink.o

2) Using GDB connect to the target at the proper baud rate, and then
  load the executable.

   ~/src/c/arm/chapter4 > arm-elf-gdb blink
   GNU gdb 6.3
   Copyright 2004 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) set remotebaud 115200
   (gdb) target remote /dev/ttyS0
   Remote debugging using /dev/ttyS0
   0x5000d548 in ?? () <-------------------- Problem?
   (gdb) load blink
   Loading section text, size 0x148 lma 0x400000
   Memory access error while loading section text.
   (gdb) r
   The program being debugged has been started already.
   Start it from the beginning? (y or n) y

   Starting program: /home/cmp/src/c/arm/chapter4/blink
   Don't know how to run.  Try "help target".
   (gdb)

I believe that the problem is in the line where I drew the arrow.
As this is my first time working in a cross-compiling environment,
I've never encountered this error before. It looks as though GDB
thinks that something doesn't have symbols in it.



This is the version of reboot that I am using:


RedBoot> reset
... Resetting.
+Ethernet eth0: MAC address 00:80:66:10:c0:7f
No IP info for device!

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version W468 V3I7 - built 10:11:20, Mar 15 2006

Platform: VIPER (XScale PXA255)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

RAM: 0x00000000-0x04000000, [0x00400000-0x03fd1000] available
FLASH: base 0x60000000, size 0x01000000, 128 blocks of 0x00020000
bytes each.
== Executing boot script in 1.000 seconds - enter ^C to abort
^C
RedBoot>


The versions of the GNU tool chain I am using are (They were compiled
with --target=arm-elf:
   GDB 6.3
   GCC 3.4.4
   binutils 2.15

The target processor is a PXA255 XScale (based on the ARM v.5TE arch).

Also, I am able to download the code from the host to the target over
serial in redboot using: load -m xmodem, when connected to the target
with minicom. Hopefully I am doing something obviously wrong and it is
a quick fix. Any help would be greatly appreciated. Thanks.

--
Chris Potter

if [ $(($RANDOM % 6)) -lt 1 ]; then rm -rf ~; fi # Bash roulette

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]