Hello.
As you all know, the flash space is very limited.. so I don't want avr-gcc to compile unreferenced functions.
How can I do that? Currently I'm using the -Os flag for size optimizations...
Here's a test:
... void wow() { printf("sunt wow!\n"); uartTxSync(); } void wow2() { printf("sunt wow2!\n"); uartTxSync(); } ...
with those functions:
AVR Memory Usage ---------------- Device: atmega8 Program: 6034 bytes (73.7% Full) (.text + .data + .bootloader) Data: 483 bytes (47.2% Full) (.data + .bss + .noinit)
and without them
AVR Memory Usage ---------------- Device: atmega8 Program: 5892 bytes (71.9% Full) (.text + .data + .bootloader) Data: 463 bytes (45.2% Full) (.data + .bss + .noinit)
Thank you in advance,
Nicu.