1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 06:53:52 +01:00

makefiles/tools: Allow make reset via avrdude

In order to flash AVR devices, avrdude needs the ability to reset them:
Those using a bootloader will only enter it after a reset, and those programmed
via ISP also need a reset to enter ISP mode.

Sadly, avrdude has no option to reset the board. But running it without commands
will read and print the boards identification and fuse settings. For this, as
reset is needed. This commit uses this side-effect reset to implement make reset
for all AVR based boards
This commit is contained in:
Marian Buschsieweke 2019-11-17 14:46:48 +01:00
parent 61c6b071b2
commit 135a37a4d1
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -20,3 +20,4 @@ PROGRAMMER_FLAGS += $(FFLAGS_EXTRA)
# don't force to flash HEXFILE, but set it as default
FLASHFILE ?= $(HEXFILE)
FFLAGS += -c $(PROGRAMMER) $(PROGRAMMER_FLAGS) -U flash:w:$(FLASHFILE)
RESET ?= $(FLASHER) -c $(PROGRAMMER) $(PROGRAMMER_FLAGS)