This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: changing avr-ld linker script prom 2.19.1 to 2.10
- From: "Weddington, Eric" <Eric dot Weddington at atmel dot com>
- To: "Massimiliano Cialdi" <massimiliano dot cialdi at powersoft dot it>, <binutils at sourceware dot org>
- Date: Tue, 9 Mar 2010 14:45:52 -0700
- Subject: RE: changing avr-ld linker script prom 2.19.1 to 2.10
- References: <1268127448.4582.15.camel@lab7.powersoft.it>
> -----Original Message-----
> From: Massimiliano Cialdi [mailto:massimiliano.cialdi@powersoft.it]
> Sent: Tuesday, March 09, 2010 2:37 AM
> To: binutils@sourceware.org
> Subject: changing avr-ld linker script prom 2.19.1 to 2.10
>
> I have upgrade from binutils 1.19.1 to 2.20 (target
> architecture is avr)
>
> in the linker scripts in [...]/avr/lib/ldscripts/ are added
> some memory
> blocks, such like: fuse, lock and signature, all as big as 1K.
> Are also added sections, like:
> .fuse :
> {
> KEEP(*(.fuse))
> KEEP(*(.lfuse))
> KEEP(*(.hfuse))
> KEEP(*(.efuse))
> } > fuse
> .lock :
> {
> KEEP(*(.lock*))
> } > lock
> .signature :
> {
> KEEP(*(.signature*))
> } > signature
>
> there is an example of hoe to use thes new memry sections?
These sections are used in conjunction with special capabilities in avr-libc to store fuse information:
<http://www.nongnu.org/avr-libc/user-manual/group__avr__fuse.html>
This means that all information need to program an AVR is now stored in the ELF file: flash, eeprom, and fuses. The programming tool available in Atmel's AVR Studio can use this information to completely program an AVR device. Eventually it would be nice if the open source programming tool avrdude <http://savannah.nongnu.org/projects/avrdude> could also provide this functionality, but IIRC, it still needs to have modifications to be able to read ELF files directly.
> In old version I started from une of that files (eg. avr5.x)
> and I copy
> it to my project and edit it to match my micros feature.
You shouldn't have to edit the default linker scripts unless you're doing something really custom on your AVR device. Best to ask on the AVR Freaks website <http://www.avrfreaks.net/>, on the AVR GCC Forum for better help in this area.
Eric Weddington