Squeezing code

clickety clickety…

:!make clean ; make
rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.bin *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=attiny2313  -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=attiny2313  -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=attiny2313  -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=attiny2313  -c main.c -o main.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=attiny2313  -o main.bin usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.bin main.hex
./checksize main.bin
ROM: 1992 bytes (data=4)
RAM: 61 bytes

…hack hack clickety clickety hack…

:!make clean ; make
[snip]
*** code size 2051 exceeds limit of 2048
RAM: 61 bytes
make: *** [main.hex] Error 1

argh… por tres f*ing bytes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.