diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-07-01 15:39:35 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-07-01 15:39:35 +0200 |
commit | 01227e76785845dae377a8808146ff51209f727a (patch) | |
tree | cd54fa87a17778fe8905c8de24bed8df0349d93d | |
parent | da3ebb99ab95e659f2dc3e51fd1182258878011c (diff) | |
download | analog_instruments-01227e76785845dae377a8808146ff51209f727a.tar.gz |
Makefile: add minipro flash and fuse targets
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,4 +1,5 @@ MCU = atmega8 +# only for avrdude PROGRAMMER = dragon_isp CPUFREQ = 8000000 #8MHz @@ -53,9 +54,18 @@ all: clean build flash: build @sudo avrdude -p $(MCU) -c $(PROGRAMMER) -U flash:w:$(BUILDDIR)/$(OUTPUT).hex:i +flash-minipro: build + @sudo minipro -p $(MCU) -w $(BUILDDIR)/$(OUTPUT).hex -f ihex + fuse: @sudo avrdude -p $(MCU) -c $(PROGRAMMER) -U lfuse:w:$(LFUSE):m -U hfuse:w:$(HFUSE):m +fuse-minipro: dir + @echo fuses_lo = $(LFUSE) > $(BUILDDIR)/fuses.conf + @echo fuses_hi = $(HFUSE) >> $(BUILDDIR)/fuses.conf + @echo lock_byte= 0xff >> $(BUILDDIR)/fuses.conf + @sudo minipro -p $(MCU) -c config -w $(BUILDDIR)/fuses.conf + devsetup: @echo "--target=avr -isystem /usr/avr/include/ $(CFLAGS)" | tr ' ' '\n' > compile_flags.txt |