On 11/02/11 13:51, Bernard Fouché wrote:
> 
> Le 11/02/2011 13:25, Massimiliano Cialdi a écrit :
>> I know that .data is to be considered belonging to sram, but its initial
>> image is hold in flash, and according to my opinion this fact must be
>> take into account, otherwise the binary may not work (as happened to my
>> real project)
>>
> 
> I ran into the same problem a few weeks ago (gcc 4.3.3 / binutils 2.19)
> and I agree with you, the linker should test the size of .text + the
> size of .data. Currently the linker reports an error only if the size of
> .text is bigger than the target flash space. However avrdude catches the
> error when it looks at the .hex file being programmed but earlier
> detection would be more efficient.
> 
>   Bernard
> 
> _______________________________________________
> AVR-chat mailing list
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/avr-chat
> 
The avr linker scripts are 'family' based and not precisely tailored fot
each avr model.
I use an edited linker script where this is a problem. It's very easy,
change your Makefile (or whatever you use) to add "-T link.ld" (where
link.ld is your edited linker script) to the linker flags.

HTH,

Robert

_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to