projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfix SPI-Clock too high for 16 MHz firmware
[pub/USBasp.git]
/
bin
/
firmware
/
Makefile
diff --git
a/bin/firmware/Makefile
b/bin/firmware/Makefile
index
d2a60b7
..
de20edb
100644
(file)
--- a/
bin/firmware/Makefile
+++ b/
bin/firmware/Makefile
@@
-1,8
+1,15
@@
MCU_TARGET = atmega8
MCU_TARGET = atmega8
+F_CPU = 12000000
FLASHER = avrdude -c usbasp -p $(MCU_TARGET)
usbasp: fuses
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
fuses:
$(FLASHER) -B 200 -U hfuse:w:0xC9:m -U lfuse:w:0xEF:m