# compile... avr-gcc -c -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=1000000UL -Wa,-adhlns=static.lst -mmcu=attiny2313 -std=gnu99 static.c -o static.o # link... avr-gcc -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -DF_CPU=1000000UL -Wa,-adhlns=static.o -mmcu=attiny2313 -std=gnu99 static.o --output static.elf -Wl,-Map=.map,--cref -L. -lutil # check sizes so no surprises! avr-size static.elf # in case i want to debug at the assembly level... avr-nm static.elf | sort -u > static.nm # create hex file... avr-objcopy -O ihex -R .eeprom static.elf static.hex # burn, baby, burn... avrdude -p attiny2313 -c usbtiny -U flash:w:static.hex