Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [avr-gcc-list] News on debugging Mega128? [RSS Feed]

#1 Nov. 22, 2005 11:49:00

Wolfgang W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] News on debugging Mega128?


Hi list,

hopefully I did not simply overlook anything on the list...

Are there any news about debug information for >64k flash size with
gcc?
Currently I have avr-gcc 3.4.3 from the latest official WinAVR
installed, with which it is not possible to debug a program with more
than 64k Code size. I am not sure if these restrictions are imposed
by the debug info format (probably not) or the handling inside the
compiler. I do not have much experience in embedded programming (I
mean the linking part, which is quite different from what I am used
to from the user-land part in unix), so I am not sure if I could help
in changing this situation, but am willing to provide testing and
more if somebody could tell me where to start.
Or is the restriction in AVRStudio, should I try to debug avarice to
use gdb? (It has some problems with my JTAG-Ice mk2)

Or is there a newer code-tree of avr-gcc that would be worthwhile
building from scratch? No problem to do so, but I read something that
the AVR part of gcc-4.0 was still not as good as 3.4.x? Is that true?

Any hints from somebody who knows more about gcc from the inside are
welcome!

Thank you,
Wolfgang



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Nov. 22, 2005 17:33:10

Haase B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] News on debugging Mega128?


>Hi list,
>
>hopefully I did not simply overlook anything on the list...
>
>Are there any news about debug information for >64k flash size with
>gcc?
No I don't think so. The basic problem is that the pointer size that is
used by the dwarf2 format currently is 16 bits. These pointers are byte
pointers and not word pointers so that you will be getting wrap-around
effects when using code above the 64k boundary :-(.

IMO, the way to solve this issue is to
1.) Make gcc use 32 bit pointers for the dwarf2 information.
2.) Change avrstudio and gdb so that they also use 32 bit pointers
3.) Teach avrstudio and gdb to ignore the most significant bits that
contain the information on the type of memory space.

As much as I know, this work has not been started to be done so far.

Yours,

Bjoern.


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#3 Nov. 22, 2005 20:03:24

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] News on debugging Mega128?


"Wolfgang Wegner" <> wrote:

> Or is the restriction in AVRStudio, should I try to debug avarice to
> use gdb? (It has some problems with my JTAG-Ice mk2)

The bug is in GCC, but only affects DWARF-2 and thus in particular
users of AVR Studio. (Well, for AVR Studio, you could still resort to
AVR-COFF, but that has other limitations in the debugging information
itself, as well as rather serious bugs in the COFF converter. But it
doesn't suffer from the 64 KB limitation.)

The good old stabs debug information (-gstabs) doesn't suffer from
that problem, so if avarice + GDB (+ any GDB frontend if you prefer)
is an option for you, that might indeed help you.

As for avarice with the JTAG ICE mkII, you need a version from CVS
(IIRC, there are snapshots available). As David Gay fixed the last
annoying bug in the mkII support just a few days ago (a breakpoint
reached wasn't always announced to GDB, so you need to hit ^C in GDB
even though the program already stopped correctly), I think it's now
also time to release the current code as avarice 2.4. I've got this
on my schedule (now that avr-libc 1.4.0 is finally out).

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#4 Nov. 23, 2005 16:31:57

Wolfgang W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] News on debugging Mega128?


Hi Jörg,

thank you very much for the answer! I already tried AVR-COFF once,
but did not find it very usable, too - although I have to admit I do
not remember what the exact problems were.
So gdb seems to be the way to go. I will try again with current
avarice version, but the last time, avarice could not even sync with
my JTAG ICE mkII.

Regards,
Wolfgang



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#5 Nov. 23, 2005 23:00:41

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] News on debugging Mega128?


"Wolfgang Wegner" <> wrote:

> So gdb seems to be the way to go. I will try again with current
> avarice version, but the last time, avarice could not even sync with
> my JTAG ICE mkII.

You need an avarice version that is mkII-ready, and remember to
specify the -2 option. The protocols are fundamentally different.

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#6 Nov. 25, 2005 21:46:16

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] News on debugging Mega128?


As Wolfgang Wegner wrote:

> So gdb seems to be the way to go. I will try again with current
> avarice version, but the last time, avarice could not even sync with
> my JTAG ICE mkII.

Remember to specify the -2 option. The protocols are completely
different, so I didn't make any attempt for an auto-detection (it
would take several seconds anyway).

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

  • Root
  • » AVR-GCC
  • » [avr-gcc-list] News on debugging Mega128? [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support