From 527354e56a0a96e92ca343b3fa436c715857cf03 Mon Sep 17 00:00:00 2001 From: Juan Carrano Date: Thu, 7 Mar 2019 12:42:25 +0100 Subject: [PATCH] tools/edbg: Use openocd to reset instead of edbg. A few commits ago edbg changed its behavior and now it resets the board twice. This makes some tests fail, as the start on the first reset, but shortly after the board is reset again. See: https://github.com/ataradov/edbg/issues/77 This comments out RESET and RESET_FLAGS in the edbg tool setting. Reset will now be done via OpenOCD, which is available and used anyways because it is needed for `make debug`. --- makefiles/tools/edbg.inc.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/makefiles/tools/edbg.inc.mk b/makefiles/tools/edbg.inc.mk index a66bc30f53dd..ef7e5880e271 100644 --- a/makefiles/tools/edbg.inc.mk +++ b/makefiles/tools/edbg.inc.mk @@ -19,5 +19,11 @@ FFLAGS ?= $(EDBG_ARGS) -t $(EDBG_DEVICE_TYPE) -b -v -p -f $(HEXFILE) ifeq ($(RIOT_EDBG),$(FLASHER)) FLASHDEPS += $(RIOT_EDBG) endif -RESET ?= $(EDBG) -RESET_FLAGS ?= $(EDBG_ARGS) -t $(EDBG_DEVICE_TYPE) + +## A few commits ago edbg changed its behavior and now it resets the board +## twice. This makes some tests fail, as the start on the first reset, but +## shortly after the board is reset again. +## See: https://github.com/ataradov/edbg/issues/77 +## Commenting this out causes RESET to be provided by OpenOCD instead. +# RESET ?= $(EDBG) +# RESET_FLAGS ?= $(EDBG_ARGS) -t $(EDBG_DEVICE_TYPE)