avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] Initialized data and > 64k program


From: Geoffrey Wossum
Subject: [avr-gcc-list] Initialized data and > 64k program
Date: Fri, 8 Nov 2002 11:40:05 -0600

Hi,

I have a program on an ATmega103 that has now grown to over 64 kb in size.  It 
doesn't work anymore.  I think the problem is that the linker is putting 
.data (initialized data segment) at the very end of flash, past the 64 kb 
flash.  My guess is that the init code which copies the initial values from 
flash to RAM only works when the values are stored below 64 kb.

The simple solution would be modify the linker script to put this segment near 
the beginning of the .text section when it merges it in.  But the linker 
script kind of has me baffled.  What should I change to accomplish this?  It 
seems like this would be universal problem when programs get big.  Shouldn't 
it stick it the low flash page by default?

Also, I see avrmega103.* scripts, but no avrmega128.* scripts. Does the 
atmega128 target use the avr5.* scripts?

TIA,

--- 
Geoffrey Wossum 
Software Engineer 
Long Range Systems - http://www.pager.net


avr-gcc-list at http://avr1.org



reply via email to

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