-
Notifications
You must be signed in to change notification settings - Fork 2
/
avrdude.mk
19 lines (13 loc) · 964 Bytes
/
avrdude.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
PROGRAMMER_FLAGS := -p$(build.mcu) -c$(program.protocol) $(program.extra_params)
read-fuses read-flash read-eeprom write-fuses write-eeprom: path = $(runtime.tools.$(upload.tool).path)
read-fuses read-flash read-eeprom write-fuses write-eeprom: cmd.path = $(tools.$(upload.tool).cmd.path)
read-fuses:
$(cmd.path) -C $(tools.$(upload.tool).config.path) $(PROGRAMMER_FLAGS) -U lfuse:r:-:h -U hfuse:r:-:h -U efuse:r:-:h -q -q
read-flash:
$(cmd.path) -C $(tools.$(upload.tool).config.path) $(PROGRAMMER_FLAGS) -U flash:r:$(SKETCH_BIN)
read-eeprom:
$(cmd.path) -C $(tools.$(upload.tool).config.path) $(PROGRAMMER_FLAGS) -U eeprom:r:$(SKETCH_EEP)
write-fuses:
$(cmd.path) -C $(tools.$(upload.tool).config.path) $(PROGRAMMER_FLAGS) -U lfuse:w:$(bootloader.low_fuses):m -U hfuse:w:$(bootloader.high_fuses):m -U efuse:w:$(bootloader.extended_fuses):m
write-eeprom:
$(cmd.path) -C $(tools.$(upload.tool).config.path) $(PROGRAMMER_FLAGS) -U eeprom:w:$(SKETCH_EEP)