[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] code size: .text vs .data
From: |
Theodore A. Roth |
Subject: |
RE: [avr-gcc-list] code size: .text vs .data |
Date: |
Fri, 11 Jun 2004 11:17:33 -0700 (PDT) |
On Fri, 11 Jun 2004, Pat Deegan wrote:
> Hello,
>
> On Fri, 2004-06-11 at 13:32, Dave Hylands wrote:
> > You need to modify your linker script. This is what defines how much
> > space goes where.
> >
> > What's the exact command that you used to link your program?
>
> Well, I'm using the generic Makefile we put together to build the
> program (see http://electrons.psychogenic.com/avr/linux/makefile.php).
>
> Using this, the final step is simply:
>
> avr-gcc -Wl,-Map,a.out.map -lm -o a.out a.o b.o c.o ...
>
> I am uncertain as to what's going on behind the scenes.
If you aren't passing the -mmcu=atmega32 option to the avr-gcc link
command, it will default to using the <= 8K linker script.
>
>
> Where can I find out how to tweak the linking or do you have any
> suggestions?
If you give avr-gcc all the right options, you shouldn't need to fiddle
with the linker scripts unless you are doing something very custom.
I've never had to tweak a linker script for any of my projects, so I
can't tell you how to do that or where to get the information. :-(
---
Ted Roth
PGP Key ID: 0x18F846E9
Jabber ID: address@hidden