From 78133304e0646995ed3286849cdc79c9b0772076 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Fri, 3 Jan 2020 20:41:04 +0100 Subject: Rename stepper driver directory Signed-off-by: Michael Buesch --- stepper_driver/estop/firmware/Makefile | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 stepper_driver/estop/firmware/Makefile (limited to 'stepper_driver/estop/firmware/Makefile') diff --git a/stepper_driver/estop/firmware/Makefile b/stepper_driver/estop/firmware/Makefile new file mode 100644 index 0000000..333c179 --- /dev/null +++ b/stepper_driver/estop/firmware/Makefile @@ -0,0 +1,43 @@ +ASM ?= avra +AVRDUDE ?= avrdude +AVRDUDE_ARCH ?= m8 +AVRDUDE_SPEED ?= 1 +PROGRAMMER ?= avrisp2 +PROGPORT ?= usb + +LFUSE = 0x04 +HFUSE = 0x99 + + +NAME = estop +HEX = $(NAME).S.hex + +all: $(HEX) + +$(HEX): estop.S m8def.inc + $(ASM) estop.S + -srec_cat $(HEX) -Intel -Output $(NAME).S.bin -Binary + @echo + @echo "Successfully built the firmware" + +install: all + $(AVRDUDE) -B $(AVRDUDE_SPEED) -p $(AVRDUDE_ARCH) \ + -c $(PROGRAMMER) -P $(PROGPORT) -U flash:w:$(HEX) + +avrdude: + $(AVRDUDE) -B $(AVRDUDE_SPEED) -p $(AVRDUDE_ARCH) \ + -c $(PROGRAMMER) -P $(PROGPORT) -t + +reset: + $(AVRDUDE) -B $(AVRDUDE_SPEED) -p $(AVRDUDE_ARCH) \ + -c $(PROGRAMMER) -P $(PROGPORT) \ + -U signature:r:/dev/null:i -q -q + +writefuse: + $(AVRDUDE) -B 10 -p $(AVRDUDE_ARCH) \ + -c $(PROGRAMMER) -P $(PROGPORT) -q -q \ + -U lfuse:w:$(LFUSE):m \ + -U hfuse:w:$(HFUSE):m + +clean: + -rm -f *~ *.cof *.hex *.obj *.bin *.bak *.cache.* *.o -- cgit v1.2.3