[En-Nut-Discussion] Re: Re: JTAG debugging

Theodore A. Roth troth at openavr.org
Thu Jun 10 00:54:34 CEST 2004

On Wed, 9 Jun 2004, Dusan Ferbas wrote:

> Hi Theodore,
> sorry I did't mention that with gdb I already used .elf. But even with it
> it does not work in simulavr. Is it because of .text base address ? I
> assume that RAM variables are placed at addresses displayed in a .map file
> and this info is held in an .elf file ?
> We used following linker options:
> LDFLAGS = -Wl,-Map=$(TARGET).map,--cref,--defsym,__stack=0x10FF \
> -nostartfiles -nodefaultlibs -Ttext=0x01FC00

Simulavr might be having a problem with the >64K address in this case.
You could have simulavr do a core dump with the -C option and look at
the address where the .text ended up. I have a suspicion that it ended
up at 0xfc00 which would explain your problem. If that's the case, it's
a bug in simulavr.

I doubt that you will be able to get very far with simulavr though since
it is pretty weak in it support for peripherals. If you have a jtagice
box, you are better off using that with avarice and gdb for debugging
(which is what I use daily).

> Is there a line utility capable of burning code via JTAG ? I searched
> stk500 (used by avr-studio) and there are JTAGICE devices. (I am able to
> "upload" via avr-studio but not via stk500.)
> > > Did somebody tried running simulavr + gdb (avr-insight) ? I was not
> > > successfull at all even with 2kB code. All variables were zero all the
> > > time, their addresses were at 0x0.
> >...
> >
> >Don't use cof with gdb. Just load the elf file directly into gdb.

Ted Roth
PGP Key ID: 0x18F846E9
Jabber ID: troth at jabber.org

More information about the En-Nut-Discussion mailing list