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

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

Re: [avr-gcc-list] IAR vs GCC


From: Peter Bozzay
Subject: Re: [avr-gcc-list] IAR vs GCC
Date: Wed, 13 Jun 2001 16:57:18 +0200

Larry Barello wrote:
> 
[...] 
> Dilbert II (no float)     7414        ----      7325
> 
> Floating point support: My robot uses Michael Stumpf's floating point
> library (gcc -lm), when I enable the floating point support in Dilbert II
> here are the resulting sizes (mega163)
> 
> Dilbert II (with float)   9582        ----     10385

Is it possible to make a binary size less than 3928 bytes from code
below with gcc?
If it is, how, which flags to use?
I tried with the new version of gcc from www.combio.de/avr.

volatile unsigned int   D1;
volatile float          D2;
volatile char           T2;
volatile unsigned int   I2;

void main (void)
{
T2 = 22;
I2 = 1234;
D2 = (343.8 + (T2 - 20) * 0.5875) * I2 / 20000;
D1 = (int)D2;
}

The binary size, what CodeVisionAVR makes from this, is only 922
bytes. 

Regards,
Peter



reply via email to

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