Skip to content

Commit

Permalink
Download target cusomization
Browse files Browse the repository at this point in the history
Use DL_EXT and DL_DIR variables
  • Loading branch information
mar0x committed May 25, 2024
1 parent 6297bef commit d9d77c2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions firmware/Makefile.avr.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ upload: bin/dfu-$(MCU)-$(BOARD).ihex bin/hw-$(BOARD).ihex $(project).hex
-U eeprom:w:bin/hw-$(BOARD).ihex:i \
-U application:w:$(project).hex:i

DL_SFX ?= -dl.ihex:i
DL_DIR ?= ./

.PHONY: download
download:
$(AVRDUDE) -c avrispmkII \
-U flash:r:dfu-$(MCU)-$(BOARD)-dl.ihex:i \
-U fuse2:r:fuse2-$(MCU)-$(BOARD)-dl.ihex:i \
-U eeprom:r:hw-$(BOARD)-dl.ihex:i \
-U application:r:$(project)-dl.hex:i
$(AVRDUDE) -c avrispmkII -n \
-U flash:r:$(DL_DIR)dfu-$(MCU)-$(BOARD)$(DL_SFX) \
-U fuse2:r:$(DL_DIR)fuse2-$(MCU)-$(BOARD)$(DL_SFX) \
-U eeprom:r:$(DL_DIR)hw-$(BOARD)$(DL_SFX) \
-U application:r:$(DL_DIR)app-$(MCU)-$(BOARD)$(DL_SFX)

0 comments on commit d9d77c2

Please sign in to comment.