mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tools/avrdude: Fix make reset
with bootloader
The generic approach of calling avrdude to perform a reset with `make reset` does also work on board with a bootloader, but only if no other process is also accessing the serial (e.g. via `make term`). `make test` first accesses the serial and then performs `make reset` to not miss any output on the serial. This however blocks when `make reset` also wants to access that serial. As workaround, `make reset` is no only provided if the ATmega device is not programmed via bootloader. Normally, those boards reset anyway upon `make term`, which allows `make test` to work normally again.
This commit is contained in:
parent
d0d6e53ff4
commit
f44dd00276
@ -20,4 +20,9 @@ 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)
|
||||
|
||||
ifeq (,$(filter $(PROGRAMMER),arduino avr109 stk500v1 stk500v2 wiring))
|
||||
# Use avrdude to trigger a reset, if programming is not done via UART and a
|
||||
# bootloader.
|
||||
RESET ?= $(FLASHER) -c $(PROGRAMMER) $(PROGRAMMER_FLAGS)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user