I have written a rather complex sketch for the atmega168, which compiles to ~14.300 bytes, which means that there is no space left for more logic. However, I need approimately 300 - 500 bytes more.
Until now I did the following: * Shared (very short) string-constants * Maximized code-reuse * Used the smallest possible datatypes (and no floats) * Disabled some of the unused (non-decimal) serial-commands in wiring.c
(I use arduino 0007)
(I don't fear modifying some of the .c files for the board)
Now to my questions: * Is it possible to switch arduino 0007 to C instead of C++? * I found out that there are many string-functions like atoi, itoa, strcmp, strlen, ... compiled in. Many of them I do not use. Is there a possibility to disable them? * I do not use shiftOut, pulseIn, min, max, abs, constrain and external interrupts. What is the best way to disable them? * Is there any other way to get the sketch smaller?
Note: I do not want to overwrite the bootloader.