X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/deb181ae2c27db872c471a77e85d7190f32962c3..refs/heads/master:/bin/firmware/Makefile diff --git a/bin/firmware/Makefile b/bin/firmware/Makefile index d2a60b736..de20edbf6 100644 --- a/bin/firmware/Makefile +++ b/bin/firmware/Makefile @@ -1,8 +1,15 @@ MCU_TARGET = atmega8 +F_CPU = 12000000 FLASHER = avrdude -c usbasp -p $(MCU_TARGET) usbasp: fuses - $(FLASHER) -B 1 -U flash:w:usbasp.atmega8.2011-05-28.hex +ifeq ($(F_CPU), 12000000) + $(FLASHER) -B 1 -U flash:w:usbasp.atmega8-12MHz.hex +else ifeq ($(F_CPU), 16000000) + $(FLASHER) -B 1 -U flash:w:usbasp.atmega8-16MHz.hex +else + $(error setting of F_CPU is not supported.) +endif fuses: $(FLASHER) -B 200 -U hfuse:w:0xC9:m -U lfuse:w:0xEF:m