Thank you for answering. You wrote what I wanted to read...
As my code will be very large, I'm thinking on change the platform (AVR) and use another free C compiler (avr-gcc). I'm still testing this free compiler to see how it optimizes the code's size.
I like SDCC, but I believe that the optimization of the code's size is something very important.


On 10/22/07, Vaclav Peroutka <> wrote:
> Thank you (Raphael) for having answered my question.
> I think something need to be added to my code or compilation command to
> reduce compilation code size, because the same program (using float
> variables) was compiled in IAR and MikroC and the results were about
> 4.8KBytes of code size (60%) on both compilers.
> I think SDCC is a good compiler, but it really optimes code size? I believe
> the answer is yes, but I don't know how... Any compiler directive?
> --opt-code-size didn't work...
> Thanks,
> Rogério

Hello Rogerio,

unfortunately bigger code is the "feature" of SDCC. I asked similar question and nobody could answer. I think that main problem is the optimization of variables in banks (at least for PIC14 port which I seldom use).

I would prefer better code optimization in SDCC as well. Currently I have to write one application which eats a lot of memory. And can not use SDCC because it can't fit into memory...

If somebody is able to optimize the SDCC code, i can test it. But I am not able to write a compiler ( or to extend it).


This email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>
Sdcc-user mailing list