[Top][All Lists]

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

[avr-gcc-list] Code optimistaion in AVR Tiny13

From: Robert von Knobloch
Subject: [avr-gcc-list] Code optimistaion in AVR Tiny13
Date: Mon, 16 Feb 2009 15:11:34 +0100
User-agent: Thunderbird (X11/20060911)


I write code for Tiny13 embedded applications using 'C' to improve
maintainability. Due to some small issues I decided to update my entire
toolchain to the latest (greatest?) versions. Upon going back to some
old projects I notice that re-compiling makes the code grow quite
horribly. In one case the 'main' function has increased from it's
original 0x10c Bytes to 0x15c Bytes (ca. 30%). This was especially
apparent because the code would no longer fit in the target device (1024
On inspection I find that the compiler has 'in-lined' at least 3
function calls that I had written as a function to achieve compactness.
Is there any way I can stop this, or is this a bug?

I am using:
avr-gcc compiled from gcc-core-4.3.2

My Makefile:

PRG            = ES04
OBJ            = $(PRG).o

MCU_TARGET     = attiny13

OPTIMIZE       = -Os

DEFS           =
LIBS           =

CC             = avr-gcc

override CFLAGS        = -g -Wall -Wno-main $(OPTIMIZE)
-mmcu=$(MCU_TARGET) $(DEFS)
override LDFLAGS       = -Wl,-Map,$(PRG).map

I would appreciate any thoughts before I think about returning to the
old compiler (whose version I have, of course, forgotten). I imagine
there will be quite a few people interested in small devices who also
will get bitten here.


Robert von Knobloch.

reply via email to

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