Code size

Hi all!

I'm working on a Home Automation project with the Arduino. The code i produce is available on Code@google (so open source).

Unfortunatly the size of the compiled code has been growing steadily and is now too big for my Arduino (+/- 15kb). And i still want to expand even further.
I've tried to overcome this by removing duplicate code and implementing that code in a baseclass (inheritance). I've been unsuccesfull shrinking the compiled code size this way.

My inheritance is implemented like this:

  • ProtocolBase
    ---- HeaderedProtocolBase
    -------- X10Protocol
    ---- TerminatedProtocolBase
    --------- PT2262ProtocolBase
    ------------- ElroProtocol
    ------------- FranElecProtocol

Is the inheritance bloating my compiled code size?

Also i had to #include StdLib.h, because i've had to do some Malloc/Free calls for a dynamic buffer.

I would really appreciate some help..
Sander

Hi
First thing that pops in to my head is that you could remove unused functions in librarys, i.e. slave functions in twi if you only work as master and so on...
You could also remove the bootloader using an external programmer that way you may use all 16kb of space....

/Jon