[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] ATmega48/88/168 linker script problem

From: Kevin Day
Subject: [avr-gcc-list] ATmega48/88/168 linker script problem
Date: Sun, 13 Mar 2005 15:37:44 -0500
User-agent: Mutt/1.3.28i


First of all I hope this is an appropriate list for reporting an 
AVR-related bug in binutils.

After expending a lot more effort than I expected, I have ported a design 
from the mega8 to the mega168.  Not surprisingly, I had to upgrade to the 
latest version of all of the tools, but there is one important change 
required in addition.  

(from binutils-2.15/ld/scripttempl/avr.sc)
  text   (rx)   : ORIGIN = 0, LENGTH = $TEXT_LENGTH
  data   (rw!x) : ORIGIN = 0x800060, LENGTH = $DATA_LENGTH
  eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K

The ORIGIN for the data page needs to be increased to 0x800100 for these
new chips.  This is because the mega48/88/168 have extended registers up 
to 0xFF.  As you can imagine, all sorts of weird things happen when parts 
of your data are overlaid over these new registers...

I would submit a patch, but it looks like some infrastructure work is
required in order to generate the linker scripts during the build
process, and autoconf and I don't get along (sorry!).

I am using binutils 2.15, avr-libc 1.2.3, and gcc 3.4.3.


P.S. If anyone knows where I can buy a few dozen mega168s in TQFP,
please let me know off-list.  Thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]