Skip to content

Instantly share code, notes, and snippets.

@Lytol
Created June 1, 2011 17:30
Show Gist options
  • Save Lytol/1002818 to your computer and use it in GitHub Desktop.
Save Lytol/1002818 to your computer and use it in GitHub Desktop.
TARGET=pomodoro
MCU=attiny13
CC=/usr/bin/avr-gcc
CFLAGS=-g -Os -Wall -mcall-prologues -mmcu=$(MCU)
OBJ2HEX=/usr/bin/avr-objcopy
AVRDUDE=/usr/bin/avrdude
program : $(TARGET).hex
sudo $(AVRDUDE) -c usbtiny -p$(MCU) -U flash:w:$(TARGET).hex
%.obj : %.c
$(CC) $(CFLAGS) $< -o $@
%.hex : %.obj
$(OBJ2HEX) -R .eeprom -O ihex $< $@
clean :
rm -f *.hex *.obj *.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment