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]

Re: redboot GDB remote debugging over serial problem.


On Wed, Jan 17, 2007 at 11:32:21AM -0800, Christopher Potter wrote:
> 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?

This will be the address in Redboot that is currently executing, at
least i think so.

>    (gdb) load blink
>    Loading section text, size 0x148 lma 0x400000
>    Memory access error while loading section text.
>    (gdb) r


This is wrong. You need to use continue. You might need to set the PC
to the entry point in your application.

You also should not use the start of RAM for your application. Redboot
needs some ram. Take a look at the eCos memory layout files for your
target. In particular, look at the RAM startup files. If you use the
same RAM address as eCos you will not have any problems.

   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


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