From 01227e76785845dae377a8808146ff51209f727a Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Thu, 1 Jul 2021 15:39:35 +0200 Subject: Makefile: add minipro flash and fuse targets --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 386814d..8e0d74e 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.3