Forums

newbie gdb-JTAG question.

Started by c_hall2001 March 9, 2005

Please excuse this stupid question but I'm stuck. Is there a step-
by-step guide on basic debugging with the JTAG-WIGGLER-GDB tools?
I downloaded the 30 day trial of crossworks and it was very easy--
compiling, debugging, you name it. But until I can find $1000 to
purchase it I'm going to be punishing myself leaning the free stuff.
I'm slowly making progress with the ARM and the GNU tools. I can
compile and load programs with the flash utility but I'm
having 'brain lock' when dealing with the GDB tool. This is where
I'm at so far:

----windows command window (#1) ocdremote----
c:\cywwin\usr\local\bin>ocdremote cARM7TDMI-S dRAVEN a1 s7
OCDemon InitializeTarget Error : Not in Background

c:\cywwin\usr\local\bin>ocdremote cARM7TDMI-S dWIGGLER a1 s7
ocdremote 2.08: WIGGLER via LPT 1 at speed : 7
----strange RAVEN-WIGGLER trick to get things rolling----

----start up another command window (#2) GDB----
C:\eclipse\workspace\testgdb>arm-elf-gdb test.out
GNU gdb 6.1
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-cygwin --target=arm-
elf"...
(gdb) target remote :8888
Remote debugging using :8888
0x0000071c in ?? ()
(gdb)
----test.out was compiled with the -g option----
----window #1 responds with----
CPU[1] Accepted gdb connection on port 8888.
----now I'll load the program into the ARM----
(gdb) load test.out
Loading section startup, size 0x20 lma 0x40000000
Loading section prog, size 0x9c lma 0x40000020
Start address 0x40000020, load size 188
Transfer rate: 1504 bits in <1 sec, 94 bytes/write.
(gdb) step
Cannot find bounds of current function
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /cygdrive/c/eclipse/workspace/testgdb/test.out
Don't know how to run. Try "help target".
---------------

Obviously I'm missing something but I can't figure out what. Please
forgive me if this is one of those RTFM moments.
Thanks in advance.


An Engineer's Guide to the LPC2100 Series


<snip>

>Obviously I'm missing something but I can't figure out what. Please
> forgive me if this is one of those RTFM moments.
> Thanks in advance.


I have some instructions on using the prebuilt tools for Win32:

http://www.freertos.org/portlpc2106.html

This might provide some help - not the same setup as you but could
provide some clues. I used Insight (GDB GUI) rather than straight
GDB.

Regards.



Thank you for the link. I did discover one problem--I was sending
a 'run' command instead of a 'continue' command to get things
started. Apparently you need to use 'continue' with remote embedded
targets. This gem of info was found on a German site--thank god for
Google language translation. As for my setup, I was using eclipse
but the JTAG-gdb error codes are very general. The command windows
are just being used until I can work out the low level bugs in my
setup. It seems strange that so little info is available on the
wiggler-ocdcommander-gdb setup. Isn't this a very common hardware
setup? Anyway, I'm guessing lots of people must be having the same
problems I'm having so I plan to post a step-by-step when I get
things working.

--- In , "Richard" <nospam@F...> wrote:
>
> <snip>
>
> >Obviously I'm missing something but I can't figure out what.
Please
> > forgive me if this is one of those RTFM moments.
> > Thanks in advance. > I have some instructions on using the prebuilt tools for Win32:
>
> http://www.freertos.org/portlpc2106.html
>
> This might provide some help - not the same setup as you but could
> provide some clues. I used Insight (GDB GUI) rather than straight
> GDB.
>
> Regards.