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

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

[avr-gcc-list] code size: .text vs .data


From: Pat Deegan
Subject: [avr-gcc-list] code size: .text vs .data
Date: Fri, 11 Jun 2004 13:09:49 -0400

Greetings,

I am currently creating my first AVR program that goes beyond the
classic uC "hello world" program (flashing LEDs).

I am hitting an unexpected barrier in terms of executable size.  I'm
compiling for the ATmega32 and the program size is now

$ avr-size a.out
   text    data     bss     dec     hex filename
   7654     512     162    8328    2088 a.out

Adding any more functionality causes the linker to barf out an
        ld: region text is full (a.out section .text)
error.  

I'd expected the 32k flash of this chip to give me plenty of room but it
looks like I'm hitting an 8k limit for code size, while the data segment
is sitting there, empty.

My questions are:

- Is there a way to increase the .text space?

- Failing that, is there a way to executing OPs loaded in registers? 
Basically storing assembly in the .data segment and "interpreting" it
from there.

- Can you give me any hints on minimizing use of .text/moving stuff into
.data?


TIA

Regards,
-- 
Pat Deegan
http://www.psychogenic.com/
PGP Key: http://www.keyserver.net 0x03F86A50



reply via email to

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