# give (prefix of) source code file name #### THIS MUST BE CHANGED TO WORK WITH A DIFFERENT SOURCE FILE ### FILE=blink # define the assembler we will use (avra-1.2.2) ASSEMBLER=/usr/local/bin/avra # define the software "programmer" and its config file (avrdude-5.4) CONFIG=/usr/local/etc/avrdude.conf AVRDUDE=/usr/local/bin/avrdude # RULES ------------------------------------------------------------- all: %.hex %.hex: $(FILE).asm $(ASSEMBLER) $(FILE).asm # program the ATmega8515L via STK500 board program: $(FILE).hex $(AVRDUDE) -y \ -C $(CONFIG) \ -p m8515 \ -c stk500v2 \ -P /dev/ttyS0 \ -U flash:w:$(FILE).hex read: $(AVRDUDE) \ -p m8515 \ -c stk500v2 \ -C $(CONFIG) \ -P /dev/ttyS0 \ -U flash:r:fromavr.hex:i clean: rm -f *.hex *.cof *.eep.hex *~