For a 175 byte program, have the CCS generate assembler and use that as
you base.


On Fri, 2006-06-30 at 12:36 +0000, Richard Latter wrote:
Hello All,

I have an application which I am writiing for the
PIC14 range of processors. I have written the
application in SDCC C. I use the following line:

sdcc -mpic14 -p16f628.c myproc.c

The compiled .asm output seems to be quite bloated and
the .hex file is about 1200 bytes in length.

I have tried to optimize the code as much as possible,
but I can only get this down to 820 bytes.

The code is not that complicated <30loc and just seems
to be a bit big for my application. If I write anymore
code, I will blow the 1K limit on this!

I have asked a friend to try and compile my application
using CCS C compiler and the resultant code is only 175
bytes (optimized version). There seems to be a massive
difference size of the generated outputs.

I have tried the options --opt-code-size and
--opt-code-speed, but this seems to make no difference.

Is there any way I can optimize this to be even smaller?

Is there an FAQ on the subject, in particular using the
PIC range of chips.

Many thanks in advance,


Windows Live Messenger has arrived. Click here to download it for free!

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Sdcc-user mailing list