Peter Mueller wrote:

Hi,

I want to use gcc instead of IAR. My application is around 3k with IAR but about 4k with gcc. I tried -Os and -O2 with gcc. Any other compiler switches that further reduce code size?

Thanks,
Peter

If you use floating point (even one single definition of a floating point value) a binary produced by IAR is considerably smaller than one produced by GCC. It is also faster. This is because we have never done any significant work to optimise the floating point library. However, with -O2 most integer only programs compile to a smaller binary using GCC. Not every program is the same, though. I have found examples which are a few percent bigger using GCC. A integer only binary which is 1/3rd bigger using GCC would be strange.

Regards,
Steve


Reply via email to