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

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

Re: [avr-gcc-list] Butterfly code ported to gcc with bugs...


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Butterfly code ported to gcc with bugs...
Date: Tue, 8 Jul 2003 15:44:53 +0200 (MET DST)

"Desi" <address@hidden> wrote:

> There is an structure in IAR called __flash, 
> and they declare a lot of variables with
> that structure, I'm too new in the AVR world,
> about a week... and I asume that this structure
> is used to write information to the flash memory,
> but there is no simil in the gcc... or has it???

OK, i knew it would take a while to actually look over all this.
Sorry, i know you're quite impatient, but finally, here it is.

You need a "patch" utility to apply this patch.  I've already
converted the line endings from Unix to DOS \r\n, so i hope the patch
will apply for you.

Actually, moving the tables from RAM to flash, while saving RAM,
increases the flash usage due to less effective code.  The biggest RAM
saving came out of converting adc.c right now (and, currently not yet
linked again, sound.c).  Most of the remaining occurances should
perhaps be converted back to use normal RAM tables, like the small
tables in rtc.c.  They are so small so they don't waste much RAM
anyway.

According to avr-nm --size -S, the biggest suckers are currently:

ADC_periphery() [add.c]
SetDate()       [rtc.c]
SetClock()      [rtc.c]
EnterName()     [vcard.c]
__vector_22()   [lcd_driver.c, SIGNAL(SIG_LCD)]

That's probably where optimization should start.

Without any of the sound code, it should just fit into the ATmega169.
Here, __data_load_end is at 0x3686 which is 0x1b43 word address; the
bootloader starts at word address 0x1c00.

The IAR's feature to use short (relative) jumps/calls where possible
saves them a lot of space they could burn for the songs in sound.c.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

Attachment: butterfly.patch
Description: Text document


reply via email to

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