X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/00bb9c112fa6dfa84d3571659527c13af7170279..7e397056b12b16fbb9a65f37a2e1aa75174c9fe8:/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