From 32a1a79f9f5027e51813e7272a0481e9b1b122bf Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:20:33 +0200 Subject: [PATCH 01/10] make: allow override of RESET for boards/cc2538dk --- boards/cc2538dk/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/cc2538dk/Makefile.include b/boards/cc2538dk/Makefile.include index 363c58024c35..cca186c348b2 100644 --- a/boards/cc2538dk/Makefile.include +++ b/boards/cc2538dk/Makefile.include @@ -17,7 +17,7 @@ include $(RIOTMAKE)/tools/renode.inc.mk # debugger config DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh DEBUGSERVER = JLinkGDBServer -device CC2538SF53 -RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh +RESET ?= $(RIOTBOARD)/$(BOARD)/dist/reset.sh # Define the flash-tool and default port: export PROGRAMMER ?= cc2538-bsl @@ -33,6 +33,6 @@ endif OFLAGS = --gap-fill 0xff FLASHFILE ?= $(BINFILE) DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE) -RESET_FLAGS = $(BINDIR) +RESET_FLAGS ?= $(BINDIR) export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb From 44f8314a048b6fc93109ecd39608dc094e3f67c6 Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:21:11 +0200 Subject: [PATCH 02/10] make: allow override of RESET for boards/common/esp32 --- boards/common/esp32/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/common/esp32/Makefile.include b/boards/common/esp32/Makefile.include index 0fb3fb3c25c2..5087328682df 100644 --- a/boards/common/esp32/Makefile.include +++ b/boards/common/esp32/Makefile.include @@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) include $(RIOTMAKE)/tools/serial.inc.mk # reset tool configuration -RESET = esptool.py --before default_reset run +RESET ?= esptool.py --before default_reset run From 8766f8bf28d4d05544fb65a61eb1872bf79554fc Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:21:30 +0200 Subject: [PATCH 03/10] make: allow override of RESET for boards/common/esp8266 --- boards/common/esp8266/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/common/esp8266/Makefile.include b/boards/common/esp8266/Makefile.include index 4c60974b9a3a..44a141a366b3 100644 --- a/boards/common/esp8266/Makefile.include +++ b/boards/common/esp8266/Makefile.include @@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) include $(RIOTMAKE)/tools/serial.inc.mk # reset tool configuration -RESET = esptool.py --before default_reset run +RESET ?= esptool.py --before default_reset run From 3482bfaa2aadba76451bea20d4f21ec93c4373bb Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:21:49 +0200 Subject: [PATCH 04/10] make: allow override of RESET for boards/common/remote --- boards/common/remote/Makefile.include | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boards/common/remote/Makefile.include b/boards/common/remote/Makefile.include index baa8250b4c64..3b2f48f79f4b 100644 --- a/boards/common/remote/Makefile.include +++ b/boards/common/remote/Makefile.include @@ -12,7 +12,7 @@ ifeq ($(PROGRAMMER),cc2538-bsl) else ifeq ($(OS),Darwin) PORT_BSL ?= $(PORT_DARWIN) endif - RESET = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py -p "$(PORT_BSL)" + RESET ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py -p "$(PORT_BSL)" FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py FFLAGS = -p "$(PORT_BSL)" -e -w -v -b 115200 $(FLASHFILE) else ifeq ($(PROGRAMMER),jlink) @@ -20,8 +20,8 @@ else ifeq ($(PROGRAMMER),jlink) FFLAGS = $(BINDIR) $(FLASHFILE) DEBUGGER = $(RIOTBOARD)/common/remote/dist/debug.sh DEBUGSERVER = JLinkGDBServer -device CC2538SF53 - RESET = $(RIOTBOARD)/common/remote/dist/reset.sh - RESET_FLAGS = $(BINDIR) + RESET ?= $(RIOTBOARD)/common/remote/dist/reset.sh + RESET_FLAGS ?= $(BINDIR) endif OFLAGS = --gap-fill 0xff From 458b178d46c25e35c82478629596cddc4e32afc4 Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:22:14 +0200 Subject: [PATCH 05/10] make: allow override of RESET for boards/common/stm32f103c8 --- boards/common/stm32f103c8/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/common/stm32f103c8/Makefile.include b/boards/common/stm32f103c8/Makefile.include index 087851a95c91..da91db4ef78b 100644 --- a/boards/common/stm32f103c8/Makefile.include +++ b/boards/common/stm32f103c8/Makefile.include @@ -25,7 +25,7 @@ ifeq ($(PROGRAMMER),dfu-util) export ROM_OFFSET ?= 0x2000 # Skip the space needed by the embedded bootloader FLASHER = dfu-util DEBUGGER = # no debugger - RESET = # dfu-util has no support for resetting the device + RESET ?= # dfu-util has no support for resetting the device HEXFILE = $(BINFILE) FFLAGS = -d 1eaf:0003 -a 2 -D "$(HEXFILE)" From 41869e85c58fa5917c01f143dc611e0d9fc45ab3 Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:22:36 +0200 Subject: [PATCH 06/10] make: allow override of RESET for boards/nz32-sc151 --- boards/nz32-sc151/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/nz32-sc151/Makefile.include b/boards/nz32-sc151/Makefile.include index 2e780acaeeff..3a5afa200d1d 100644 --- a/boards/nz32-sc151/Makefile.include +++ b/boards/nz32-sc151/Makefile.include @@ -11,7 +11,7 @@ export ID ?= 0483:df11 FLASHER = dfu-util DEBUGGER = # dfu-util has no debugger -RESET = # dfu-util has no support for resetting the device +RESET ?= # dfu-util has no support for resetting the device HEXFILE = $(BINFILE) FFLAGS = -d $(ID) -a 0 -s 0x08000000:leave -D "$(HEXFILE)" From 3182e693ceac4b018e4b630c530fc07b32acca86 Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:23:00 +0200 Subject: [PATCH 07/10] make: allow override of RESET for boards/openmote-b --- boards/openmote-b/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/openmote-b/Makefile.include b/boards/openmote-b/Makefile.include index 49978e45cef5..6ecb7decf395 100644 --- a/boards/openmote-b/Makefile.include +++ b/boards/openmote-b/Makefile.include @@ -23,12 +23,12 @@ else ifeq ($(PROGRAMMER),jlink) FFLAGS = $(BINDIR) $(FLASHFILE) DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh DEBUGSERVER = JLinkGDBServer -device CC2538SF53 - RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh + RESET ?= $(RIOTBOARD)/$(BOARD)/dist/reset.sh endif FLASHFILE ?= $(BINFILE) DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE) -RESET_FLAGS = $(BINDIR) +RESET_FLAGS ?= $(BINDIR) export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb # setup serial terminal From 36ef5a32908f5e8c933de93969c9d0929daebec9 Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:23:20 +0200 Subject: [PATCH 08/10] make: allow override of RESET for boards/spark-core --- boards/spark-core/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boards/spark-core/Makefile.include b/boards/spark-core/Makefile.include index 6203e36a8031..d81284c9a046 100644 --- a/boards/spark-core/Makefile.include +++ b/boards/spark-core/Makefile.include @@ -9,7 +9,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk FLASHER = dfu-util DEBUGGER = # spark core has no debugger -RESET = # dfu-util has no support for resetting the device +RESET ?= # dfu-util has no support for resetting the device HEXFILE = $(BINFILE) FFLAGS = -d 1d50:607f -a 0 -s 0x08005000:leave -D "$(HEXFILE)" From 9dd48d9f0ef51424cf1fc965269c8d3b62d5e135 Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:25:20 +0200 Subject: [PATCH 09/10] make: allow override of RESET for jlink --- makefiles/tools/jlink.inc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/tools/jlink.inc.mk b/makefiles/tools/jlink.inc.mk index b7f04be2fc42..66ff520077fa 100644 --- a/makefiles/tools/jlink.inc.mk +++ b/makefiles/tools/jlink.inc.mk @@ -1,7 +1,7 @@ FLASHER = $(RIOTTOOLS)/jlink/jlink.sh DEBUGGER = $(RIOTTOOLS)/jlink/jlink.sh DEBUGSERVER = $(RIOTTOOLS)/jlink/jlink.sh -RESET = $(RIOTTOOLS)/jlink/jlink.sh +RESET ?= $(RIOTTOOLS)/jlink/jlink.sh FLASHFILE ?= $(BINFILE) From 34c2eac840815ea46c544e5921c70b01b2c9b981 Mon Sep 17 00:00:00 2001 From: Sebastian Meiling Date: Thu, 6 Jun 2019 16:25:30 +0200 Subject: [PATCH 10/10] make: allow override of RESET for uniflash --- makefiles/tools/uniflash.inc.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makefiles/tools/uniflash.inc.mk b/makefiles/tools/uniflash.inc.mk index 7025acea9c01..554939c62426 100644 --- a/makefiles/tools/uniflash.inc.mk +++ b/makefiles/tools/uniflash.inc.mk @@ -12,13 +12,13 @@ ifneq ("$(wildcard $(UNIFLASH_PATH)/dslite.sh)","") _XDS110RESET_4_0_4_3 ?= $(UNIFLASH_PATH)/simplelink/gen2/bin/xds110reset _XDS110RESET ?= $(UNIFLASH_PATH)/simplelink/imagecreator/bin/xds110reset XDS110RESET ?= $(firstword $(wildcard $(_XDS110RESET) $(_XDS110RESET_4_0_4_3)) xds110reset) - RESET = $(XDS110RESET) + RESET ?= $(XDS110RESET) else FLASHER = $(UNIFLASH_PATH)/uniflash.sh FFLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -program $(FLASHFILE) # configure uniflash for resetting target - RESET = $(UNIFLASH_PATH)/uniflash.sh - RESET_FLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -reset + RESET ?= $(UNIFLASH_PATH)/uniflash.sh + RESET_FLAGS ?= -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -reset endif # configure the debug server DEBUGSERVER = $(UNIFLASH_PATH)/ccs_base/common/uscif/gdb_agent_console