Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | Remote debugging on ARM7TDMI

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

Remote debugging on ARM7TDMI - joergendraeby - Oct 2 6:50:11 2008

I've build gdbserver on target (lpc2568) and it starts ok.
command line: gdbserver : hello
gdbserver responds:
Process hello created; pid = 21
Listening on port
I've build insight/gdb on the remote machine and it starts ok.
Target connection setup
Target: GDBserver/TCP
Hostname:
Port:

Loading the hello.gdb from insight.
By selecting Run->Connect to target the target gdbserver responds:
Remote debugging from host

Woops the source code is no longer visible in the Source Window.
Registers shows some values: ex. pc = 0xa0324044 which is the correct
location of the program on the target :-)

Here comes the problem:
It seems like insight thinks that the target program is located at
address 0x0. Breakpoints is shown as:

Address File Line Function
50 hello.c 7 testfunc
7c hello.c 17 main

By pressing Control->Continue nothing happens
By pressing Control->Step or Control->Next or Control->Finish nothing
happens.

By pressing Run->Disconnect the hello application runs on target.

Does anybody got a clue what's wrong. To me it seems like the remote
debugger is not aware of the absolute program locations on target.

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: Remote debugging on ARM7TDMI - jsm09a - Oct 2 8:47:04 2008

--- In l...@yahoogroups.com, "joergendraeby" wrote:

> Loading the hello.gdb from insight.
> By selecting Run->Connect to target the target gdbserver responds:
> Remote debugging from host

Is hello.gdb an ELF format file ?
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Remote debugging on ARM7TDMI - joergendraeby - Oct 2 8:53:13 2008

--- In l...@yahoogroups.com, "jsm09a" yahoo.e35f5f@...> wrote:
>
> --- In l...@yahoogroups.com, "joergendraeby" wrote:
>
> > Loading the hello.gdb from insight.
> > By selecting Run->Connect to target the target gdbserver responds:
> > Remote debugging from host Is hello.gdb an ELF format file ?
>
The file startes with 0x7f 0x45 0x4c 0x46 '.ELF'
So the hello.gdb must be an ELF format file.

I believe that the difference between hello and hello.gdb is symbols.

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Remote debugging on ARM7TDMI - jsm09a - Oct 2 10:55:38 2008

--- In l...@yahoogroups.com, "joergendraeby" wrote:
>
> --- In l...@yahoogroups.com, "jsm09a" > yahoo.e35f5f@> wrote:
> >
> > --- In l...@yahoogroups.com, "joergendraeby" wrote:
> >
> > > Loading the hello.gdb from insight.
> > > By selecting Run->Connect to target the target gdbserver responds:
> > > Remote debugging from host
> >
> > Is hello.gdb an ELF format file ?
> >
> The file startes with 0x7f 0x45 0x4c 0x46 '.ELF'
> So the hello.gdb must be an ELF format file.
>
> I believe that the difference between hello and hello.gdb is symbols.
>

Does the link map show the proper program addresses ?

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Remote debugging on ARM7TDMI - joergendraeby - Oct 3 3:50:54 2008

--- In l...@yahoogroups.com, "jsm09a" yahoo.e35f5f@...> wrote:
>
> --- In l...@yahoogroups.com, "joergendraeby" wrote:
> >
> > --- In l...@yahoogroups.com, "jsm09a" > > yahoo.e35f5f@> wrote:
> > >
> > > --- In l...@yahoogroups.com, "joergendraeby" wrote:
> > >
> > > > Loading the hello.gdb from insight.
> > > > By selecting Run->Connect to target the target gdbserver
responds:
> > > > Remote debugging from host
> > >
> > > Is hello.gdb an ELF format file ?
> > >
> > The file startes with 0x7f 0x45 0x4c 0x46 '.ELF'
> > So the hello.gdb must be an ELF format file.
> >
> > I believe that the difference between hello and hello.gdb is
symbols.
> > Does the link map show the proper program addresses ?
>

Please explain where to look for the link map.
To my knowlegde:
All applications is compiled with a start address 0x0 without respect
to the actual load address. The relocations are done at runtime.
If I could find the map file it would probably show addresses
starting from 0x00000000
Like any other uClinux system my applications resides in an romfs and
when loaded on target it's being "copied" into ram and the code
is "relocated" to this location.

It seems like insight/gdb is aware of this. Atleast the program
counter register reflects this.
Insight does not use this value of program counter register.

Do I miss something?
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )