boards/tools: remove exporting RESET/RESET_FLAGS

RESET and RESET_FLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.

This will also prevent evaluating 'PORT' for RESET_FLAGS when not needed.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `24 insertions(+), 24 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
This commit is contained in:
Gaëtan Harter 2019-05-17 13:52:34 +02:00
parent 95c07c507c
commit b88d1887c8
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B
13 changed files with 24 additions and 24 deletions

View File

@ -17,7 +17,7 @@ include $(RIOTMAKE)/tools/renode.inc.mk
# debugger config # debugger config
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
export DEBUGSERVER = JLinkGDBServer -device CC2538SF53 export DEBUGSERVER = JLinkGDBServer -device CC2538SF53
export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
# Define the flash-tool and default port: # Define the flash-tool and default port:
export PROGRAMMER ?= cc2538-bsl export PROGRAMMER ?= cc2538-bsl
@ -33,6 +33,6 @@ endif
OFLAGS = --gap-fill 0xff OFLAGS = --gap-fill 0xff
FLASHFILE ?= $(BINFILE) FLASHFILE ?= $(BINFILE)
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE) export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
export RESET_FLAGS = $(BINDIR) RESET_FLAGS = $(BINDIR)
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb

View File

@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
include $(RIOTMAKE)/tools/serial.inc.mk include $(RIOTMAKE)/tools/serial.inc.mk
# reset tool configuration # reset tool configuration
export RESET = esptool.py --before default_reset run RESET = esptool.py --before default_reset run

View File

@ -8,4 +8,4 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
include $(RIOTMAKE)/tools/serial.inc.mk include $(RIOTMAKE)/tools/serial.inc.mk
# reset tool configuration # reset tool configuration
export RESET = esptool.py --before default_reset run RESET = esptool.py --before default_reset run

View File

@ -12,7 +12,7 @@ ifeq ($(PROGRAMMER),cc2538-bsl)
else ifeq ($(OS),Darwin) else ifeq ($(OS),Darwin)
PORT_BSL ?= $(PORT_DARWIN) PORT_BSL ?= $(PORT_DARWIN)
endif endif
export 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 FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
FFLAGS = -p "$(PORT_BSL)" -e -w -v -b 115200 $(FLASHFILE) FFLAGS = -p "$(PORT_BSL)" -e -w -v -b 115200 $(FLASHFILE)
else ifeq ($(PROGRAMMER),jlink) else ifeq ($(PROGRAMMER),jlink)
@ -20,8 +20,8 @@ else ifeq ($(PROGRAMMER),jlink)
FFLAGS = $(BINDIR) $(FLASHFILE) FFLAGS = $(BINDIR) $(FLASHFILE)
export DEBUGGER = $(RIOTBOARD)/common/remote/dist/debug.sh export DEBUGGER = $(RIOTBOARD)/common/remote/dist/debug.sh
export DEBUGSERVER = JLinkGDBServer -device CC2538SF53 export DEBUGSERVER = JLinkGDBServer -device CC2538SF53
export RESET = $(RIOTBOARD)/common/remote/dist/reset.sh RESET = $(RIOTBOARD)/common/remote/dist/reset.sh
export RESET_FLAGS = $(BINDIR) RESET_FLAGS = $(BINDIR)
endif endif
OFLAGS = --gap-fill 0xff OFLAGS = --gap-fill 0xff

View File

@ -25,7 +25,7 @@ ifeq ($(PROGRAMMER),dfu-util)
export ROM_OFFSET ?= 0x2000 # Skip the space needed by the embedded bootloader export ROM_OFFSET ?= 0x2000 # Skip the space needed by the embedded bootloader
FLASHER = dfu-util FLASHER = dfu-util
export DEBUGGER = # no debugger export DEBUGGER = # no debugger
export RESET = # dfu-util has no support for resetting the device RESET = # dfu-util has no support for resetting the device
HEXFILE = $(BINFILE) HEXFILE = $(BINFILE)
FFLAGS = -d 1eaf:0003 -a 2 -D "$(HEXFILE)" FFLAGS = -d 1eaf:0003 -a 2 -D "$(HEXFILE)"

View File

@ -11,7 +11,7 @@ export ID ?= 0483:df11
FLASHER = dfu-util FLASHER = dfu-util
export DEBUGGER = # dfu-util has no debugger export DEBUGGER = # dfu-util has no debugger
export RESET = # dfu-util has no support for resetting the device RESET = # dfu-util has no support for resetting the device
HEXFILE = $(BINFILE) HEXFILE = $(BINFILE)
FFLAGS = -d $(ID) -a 0 -s 0x08000000:leave -D "$(HEXFILE)" FFLAGS = -d $(ID) -a 0 -s 0x08000000:leave -D "$(HEXFILE)"

View File

@ -23,12 +23,12 @@ else ifeq ($(PROGRAMMER),jlink)
FFLAGS = $(BINDIR) $(FLASHFILE) FFLAGS = $(BINDIR) $(FLASHFILE)
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
export DEBUGSERVER = JLinkGDBServer -device CC2538SF53 export DEBUGSERVER = JLinkGDBServer -device CC2538SF53
export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
endif endif
FLASHFILE ?= $(BINFILE) FLASHFILE ?= $(BINFILE)
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE) export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
export RESET_FLAGS = $(BINDIR) RESET_FLAGS = $(BINDIR)
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
# setup serial terminal # setup serial terminal

View File

@ -9,7 +9,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
FLASHER = dfu-util FLASHER = dfu-util
export DEBUGGER = # spark core has no debugger export DEBUGGER = # spark core has no debugger
export RESET = # dfu-util has no support for resetting the device RESET = # dfu-util has no support for resetting the device
HEXFILE = $(BINFILE) HEXFILE = $(BINFILE)
FFLAGS = -d 1d50:607f -a 0 -s 0x08005000:leave -D "$(HEXFILE)" FFLAGS = -d 1d50:607f -a 0 -s 0x08005000:leave -D "$(HEXFILE)"

View File

@ -1,11 +1,11 @@
FLASHER = $(RIOTTOOLS)/jlink/jlink.sh FLASHER = $(RIOTTOOLS)/jlink/jlink.sh
export DEBUGGER = $(RIOTTOOLS)/jlink/jlink.sh export DEBUGGER = $(RIOTTOOLS)/jlink/jlink.sh
export DEBUGSERVER = $(RIOTTOOLS)/jlink/jlink.sh export DEBUGSERVER = $(RIOTTOOLS)/jlink/jlink.sh
export RESET = $(RIOTTOOLS)/jlink/jlink.sh RESET = $(RIOTTOOLS)/jlink/jlink.sh
FLASHFILE ?= $(BINFILE) FLASHFILE ?= $(BINFILE)
FFLAGS ?= flash $(FLASHFILE) FFLAGS ?= flash $(FLASHFILE)
export DEBUGGER_FLAGS ?= debug $(ELFFILE) export DEBUGGER_FLAGS ?= debug $(ELFFILE)
export DEBUGSERVER_FLAGS ?= debug-server export DEBUGSERVER_FLAGS ?= debug-server
export RESET_FLAGS ?= reset RESET_FLAGS ?= reset

View File

@ -1,13 +1,13 @@
FLASHER ?= $(RIOTTOOLS)/openocd/openocd.sh FLASHER ?= $(RIOTTOOLS)/openocd/openocd.sh
export DEBUGGER = $(RIOTTOOLS)/openocd/openocd.sh export DEBUGGER = $(RIOTTOOLS)/openocd/openocd.sh
export DEBUGSERVER = $(RIOTTOOLS)/openocd/openocd.sh export DEBUGSERVER = $(RIOTTOOLS)/openocd/openocd.sh
export RESET ?= $(RIOTTOOLS)/openocd/openocd.sh RESET ?= $(RIOTTOOLS)/openocd/openocd.sh
FLASHFILE ?= $(ELFFILE) FLASHFILE ?= $(ELFFILE)
FFLAGS ?= flash $(FLASHFILE) FFLAGS ?= flash $(FLASHFILE)
export DEBUGGER_FLAGS ?= debug $(ELFFILE) export DEBUGGER_FLAGS ?= debug $(ELFFILE)
export DEBUGSERVER_FLAGS ?= debug-server export DEBUGSERVER_FLAGS ?= debug-server
export RESET_FLAGS ?= reset RESET_FLAGS ?= reset
ifneq (,$(DEBUG_ADAPTER)) ifneq (,$(DEBUG_ADAPTER))
include $(RIOTMAKE)/tools/openocd-adapters/$(DEBUG_ADAPTER).inc.mk include $(RIOTMAKE)/tools/openocd-adapters/$(DEBUG_ADAPTER).inc.mk

View File

@ -1,10 +1,10 @@
FLASHER ?= $(RIOTBASE)/dist/tools/pyocd/pyocd.sh FLASHER ?= $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
export DEBUGGER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh export DEBUGGER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
export DEBUGSERVER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh export DEBUGSERVER = $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
export RESET ?= $(RIOTBASE)/dist/tools/pyocd/pyocd.sh RESET ?= $(RIOTBASE)/dist/tools/pyocd/pyocd.sh
export OFLAGS ?= -O ihex export OFLAGS ?= -O ihex
FFLAGS ?= flash $(HEXFILE) FFLAGS ?= flash $(HEXFILE)
export DEBUGGER_FLAGS ?= debug $(ELFFILE) export DEBUGGER_FLAGS ?= debug $(ELFFILE)
export DEBUGSERVER_FLAGS ?= debug-server export DEBUGSERVER_FLAGS ?= debug-server
export RESET_FLAGS ?= reset RESET_FLAGS ?= reset

View File

@ -12,14 +12,14 @@ ifneq ("$(wildcard $(UNIFLASH_PATH)/dslite.sh)","")
_XDS110RESET_4_0_4_3 ?= $(UNIFLASH_PATH)/simplelink/gen2/bin/xds110reset _XDS110RESET_4_0_4_3 ?= $(UNIFLASH_PATH)/simplelink/gen2/bin/xds110reset
_XDS110RESET ?= $(UNIFLASH_PATH)/simplelink/imagecreator/bin/xds110reset _XDS110RESET ?= $(UNIFLASH_PATH)/simplelink/imagecreator/bin/xds110reset
XDS110RESET ?= $(firstword $(wildcard $(_XDS110RESET) $(_XDS110RESET_4_0_4_3)) xds110reset) XDS110RESET ?= $(firstword $(wildcard $(_XDS110RESET) $(_XDS110RESET_4_0_4_3)) xds110reset)
export RESET = $(XDS110RESET) RESET = $(XDS110RESET)
export RESET_FLAGS RESET_FLAGS
else else
FLASHER = $(UNIFLASH_PATH)/uniflash.sh FLASHER = $(UNIFLASH_PATH)/uniflash.sh
FFLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -program $(FLASHFILE) FFLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -program $(FLASHFILE)
# configure uniflash for resetting target # configure uniflash for resetting target
export RESET = $(UNIFLASH_PATH)/uniflash.sh RESET = $(UNIFLASH_PATH)/uniflash.sh
export RESET_FLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -reset RESET_FLAGS = -ccxml $(RIOTBOARD)/$(BOARD)/dist/$(CPU_MODEL)_$(XDEBUGGER).ccxml -reset
endif endif
# configure the debug server # configure the debug server
export DEBUGSERVER = $(UNIFLASH_PATH)/ccs_base/common/uscif/gdb_agent_console export DEBUGSERVER = $(UNIFLASH_PATH)/ccs_base/common/uscif/gdb_agent_console

View File

@ -82,8 +82,8 @@ export DEBUGGER # The command to call on "make debug", usually a sc
export DEBUGGER_FLAGS # The parameters to supply to DEBUGGER. export DEBUGGER_FLAGS # The parameters to supply to DEBUGGER.
export DEBUGSERVER # The command to call on "make debug-server", usually a script starting the GDB server. export DEBUGSERVER # The command to call on "make debug-server", usually a script starting the GDB server.
export DEBUGSERVER_FLAGS # The parameters to supply to DEBUGSERVER. export DEBUGSERVER_FLAGS # The parameters to supply to DEBUGSERVER.
export RESET # The command to call on "make reset", this command resets/reboots the target. # RESET # The command to call on "make reset", this command resets/reboots the target.
export RESET_FLAGS # The parameters to supply to RESET. # RESET_FLAGS # The parameters to supply to RESET.
export CCACHE_BASEDIR # ccache basedir, allows multiple riot build export CCACHE_BASEDIR # ccache basedir, allows multiple riot build
# directories to share a ccache directory # directories to share a ccache directory