[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] some help with gcc/gdb/avarice?
From: |
Bernard Fouché |
Subject: |
[avr-gcc-list] some help with gcc/gdb/avarice? |
Date: |
Wed, 15 Sep 2004 17:10:59 +0200 |
Hi there.
(I dunno if it's the correct place to post such a request, sorry if I sent
it to the wrong place).
I'm working with a STK500/501 with an atmega128. I try to run code working
well on a custom PCB with an atmega162. I've changed the mcu type on the
Makefile, I download the software, but things get weird, I'm only able to
switch on a few leds and then it seems that the program freezes or crash. So
I wanted to use avarice/gdb to understand what's going on.
I recently bought an olimex JTAG probe, so after having downloaded and
compiled avarice 2.2 & gdb 6.02, I tried to use them the following way:
1) I made a sym link from my tty connected to the probe to /dev/avrjtag and
I use AVARICE_ARGS=-B125KHz (BTW, there is a bug in main.cc in
avarice-2.2/src/main.cc: the -B option tests are performed with strncmp
instead of !strncmp, I just reported that on the avarice mailing list)
2) 'ice-insight myfile.hex' where myfile.hex is generated thru the Makefile
provided with WinAVR and working well for the atmega162. I kept the -g
option during compilation to keep debug infos. I don't see any 'strip'
command, however I dunno if the myfile.elf used is the correct format for
debugging.
3) ice-insight downloads the hex file to the STK500 and I see a red led
flashing on the Olimex, so I think that avarice is doing its job. Once done,
it says that it waits connections on a local port.
4) I run avr-gdb and type 'target remote localhost:port_number', and avr-gdb
seems happy: it says that the connection is opened and that it is, at the
moment at:
0x0000000 in ?? ()
However, from this point, I do not know what to do. I'm used to gdb on
Linux, so I type 's<return>', and gdb says 'Cannot find bounds of current
function'. 'bt' reports tons of '#<number> 0x0000000 in ??()'.
I must be missing something and any pointer is welcomed!
Bernard
- [avr-gcc-list] some help with gcc/gdb/avarice?,
Bernard Fouché <=