IAR and gcc are different compilers. Therefore one has to expect code size
difference. Other things are also different:-)

Yes, gcc produces larger images, yet more things go inline apart from iar's.
Floating point operations are performed via library calls. FP library is big
and inefficient (nobody takes care of it). However, if you link your code
against optimized FP library (-lm flag to linker) you might expect smaller
code size.

 

msp430-gcc -mmcu=msp430x149 -oout.elf ./RemoteDisp.o ./TempAnalysis.o
./main.o /system.o -lm

 

~d

 

 

  _____  

From: [email protected]
[mailto:[email protected]] On Behalf Of Christo Malan
Sent: Monday, July 25, 2005 3:29 PM
To: [email protected]
Subject: [Mspgcc-users] floating point

 

Hi

 

I have ported code with floating point operations for the IAR compiler to
mspgcc. The code complied with IAR was just under 4k, but with mspgcc the
code is almost 7k. The code is supposed to fit into an msp430f1121 device.

Is there a compiler or linker flag missing?

msp430-gcc -O2 -g3 -Wall -c -fmessage-length=0 -mmcu=msp430x149 -osystem.o
./system.c

msp430-gcc -mmcu=msp430x149 -oout.elf ./RemoteDisp.o ./TempAnalysis.o
./main.o /system.o

I am using the mspgcc-20050614.exe installer on WinXP.

 

 

Reply via email to