1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #13567 from aabadie/pr/boards/jlink_export_cleanup

boards: remove exports of jlink related variables
This commit is contained in:
Francisco 2020-03-10 18:46:58 +01:00 committed by GitHub
commit db0452201d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 52 additions and 28 deletions

View File

@ -7,7 +7,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# setup the flash tool used
ifeq ($(PROGRAMMER),jlink)
# in case J-Link is attached to SWD pins, use a plain CPU memory model
export JLINK_DEVICE := $(MKR_JLINK_DEVICE)
JLINK_DEVICE = $(MKR_JLINK_DEVICE)
include $(RIOTMAKE)/tools/jlink.inc.mk
else
# by default, we use BOSSA to flash this board and take into account the

View File

@ -15,6 +15,6 @@ ifeq ($(PROGRAMMER),openocd)
include $(RIOTMAKE)/tools/openocd.inc.mk
else ifeq ($(PROGRAMMER),jlink)
# setup JLink for flashing
export JLINK_DEVICE := nrf51822
JLINK_DEVICE = nrf51822
include $(RIOTMAKE)/tools/jlink.inc.mk
endif

View File

@ -14,12 +14,12 @@ include $(RIOTBOARD)/$(BOARD)/Makefile.dep
PROGRAMMER ?= jlink
ifeq (jlink,$(PROGRAMMER))
# setup JLink for flashing
export JLINK_DEVICE := nrf52
JLINK_DEVICE = nrf52
# special options when using SoftDevice
ifneq (,$(filter nordic_softdevice_ble,$(USEPKG)))
export JLINK_PRE_FLASH := loadfile $(BINDIR)/softdevice.hex
export FLASH_ADDR := 0x1f000
JLINK_PRE_FLASH = loadfile $(BINDIR)/softdevice.hex
FLASH_ADDR = 0x1f000
LINKER_SCRIPT ?= $(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL)_sd.ld
# murdock: softdevice.hex file is used for flashing
# It must be taken into account for the test input hash and

View File

@ -3,7 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/silabs/drivers/include
PROGRAMMER ?= jlink
export JLINK_DEVICE ?= ${CPU_MODEL}
JLINK_DEVICE ?= ${CPU_MODEL}
OPENOCD_CONFIG ?= board/efm32.cfg
ifeq ($(PROGRAMMER),jlink)

View File

@ -11,7 +11,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# setup JLink for flashing
include $(RIOTBOARD)/common/slwstk6000b/slwstk6000b.info.mk
export JLINK_DEVICE = $(word 2, $(SLWSTK6000B_MAINBOARD_VARS_$(BOARD_MODULE)))
JLINK_DEVICE = $(word 2, $(SLWSTK6000B_MAINBOARD_VARS_$(BOARD_MODULE)))
# include board common
include $(RIOTBOARD)/common/silabs/Makefile.include

View File

@ -7,7 +7,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# setup the flash tool used
ifeq ($(PROGRAMMER),jlink)
# in case J-Link is attached to SWD pins, use a plain CPU memory model
export JLINK_DEVICE := atsamd21
JLINK_DEVICE = atsamd21
include $(RIOTMAKE)/tools/jlink.inc.mk
else
# by default, we use BOSSA to flash this board to take into account the

View File

@ -1,5 +1,5 @@
# debugger config
export JLINK_DEVICE := atsamr21e18a
JLINK_DEVICE = atsamr21e18a
OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
OFLAGS := --gap-fill 0xff

View File

@ -7,9 +7,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# setup JLink for flashing
# export JLINK := JLink
export JLINK_DEVICE := FE310
export JLINK_IF := JTAG
export FLASH_ADDR := 0x20010000
JLINK_DEVICE = FE310
JLINK_IF = JTAG
FLASH_ADDR = 0x20010000
include $(RIOTMAKE)/tools/jlink.inc.mk
TESTRUNNER_RESET_DELAY = 1

View File

@ -3,7 +3,7 @@ PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup JLink for flashing
export JLINK_DEVICE := EFR32MG1PxxxF256
JLINK_DEVICE = EFR32MG1PxxxF256
include $(RIOTMAKE)/tools/jlink.inc.mk
# setup serial terminal

View File

@ -21,10 +21,10 @@ ifeq ($(PROGRAMMER),cc2538-bsl)
include $(RIOTMAKE)/tools/cc2538-bsl.inc.mk
else ifeq ($(PROGRAMMER),jlink)
# Special flashing and reset scripts are required due to board hardware
export FLASH_ADDR = 0x200000
export JLINK_DEVICE = CC2538SF53
export JLINK_IF = JTAG
export JLINK_RESET_FILE = $(RIOTBOARD)/openmote-b/dist/hw_reset.seg
FLASH_ADDR = 0x200000
JLINK_DEVICE = CC2538SF53
JLINK_IF = JTAG
JLINK_RESET_FILE = $(RIOTBOARD)/openmote-b/dist/hw_reset.seg
include $(RIOTMAKE)/tools/jlink.inc.mk
endif

View File

@ -9,9 +9,9 @@ PROGRAMMER ?= cc2538-bsl
ifeq ($(PROGRAMMER),jlink)
# setup JLink for flashing
export JLINK_DEVICE := cc2538sf53
export FLASH_ADDR := 0x200000
export JLINK_IF := JTAG
JLINK_DEVICE = cc2538sf53
FLASH_ADDR = 0x200000
JLINK_IF = JTAG
export TUI := 1
include $(RIOTMAKE)/tools/jlink.inc.mk
else ifeq ($(PROGRAMMER),cc2538-bsl)

View File

@ -20,7 +20,7 @@ ifeq ($(PROGRAMMER),pic32prog)
include $(RIOTMAKE)/tools/pic32prog.inc.mk
else ifeq ($(PROGRAMMER),jlink)
FLASHFILE ?= $(HEXFILE)
export JLINK_DEVICE := PIC32MZ2048EFG100
export JLINK_IF := JTAG
JLINK_DEVICE = PIC32MZ2048EFG100
JLINK_IF = JTAG
include $(RIOTMAKE)/tools/jlink.inc.mk
endif

View File

@ -7,7 +7,7 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# setup the flash tool used
ifeq ($(PROGRAMMER),jlink)
# in case J-Link is attached to SWD pins, use a plain CPU memory model
export JLINK_DEVICE := atsamd21
JLINK_DEVICE = atsamd21
include $(RIOTMAKE)/tools/jlink.inc.mk
else
# by default, we use BOSSA to flash this board to take into account the

View File

@ -6,7 +6,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
include $(RIOTMAKE)/tools/serial.inc.mk
# setup JLink for flashing
export JLINK_PRE_FLASH = r
JLINK_PRE_FLASH = r
# include board common
include $(RIOTBOARD)/common/silabs/Makefile.include

View File

@ -6,7 +6,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
include $(RIOTMAKE)/tools/serial.inc.mk
# setup JLink for flashing
export JLINK_PRE_FLASH = r
JLINK_PRE_FLASH = r
# include board common
include $(RIOTBOARD)/common/silabs/Makefile.include

View File

@ -6,8 +6,8 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
include $(RIOTMAKE)/tools/serial.inc.mk
# setup JLink for flashing
export JLINK_DEVICE := EFR32MG1PxxxF256
export JLINK_PRE_FLASH = r
JLINK_DEVICE = EFR32MG1PxxxF256
JLINK_PRE_FLASH = r
# include board common
include $(RIOTBOARD)/common/silabs/Makefile.include

View File

@ -3,7 +3,7 @@ PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
# setup JLink for flashing
export JLINK_DEVICE := ezr32wg330f256
JLINK_DEVICE = ezr32wg330f256
include $(RIOTMAKE)/tools/jlink.inc.mk
# setup serial terminal

View File

@ -86,6 +86,8 @@ UNEXPORTED_VARIABLES+=('OPENOCD_CONFIG')
UNEXPORTED_VARIABLES+=('OPENOCD_RESET_USE_CONNECT_ASSERT_SRST')
UNEXPORTED_VARIABLES+=('FLASH_TARGET_TYPE')
UNEXPORTED_VARIABLES+=('PYOCD_ADAPTER_INIT')
UNEXPORTED_VARIABLES+=('JLINK_DEVICE' 'JLINK_IF')
UNEXPORTED_VARIABLES+=('JLINK_PRE_FLASH' 'JLINK_RESET_FILE')
EXPORTED_VARIABLES_ONLY_IN_VARS=()
EXPORTED_VARIABLES_ONLY_IN_VARS+=('APPDEPS')

View File

@ -12,6 +12,28 @@ RESET_FLAGS ?= reset
JLINK_SERIAL ?= $(DEBUG_ADAPTER_ID)
JLINK_IF ?=
JLINK_RESET_FILE ?=
JLINK_PRE_FLASH ?=
# Export JLINK_SERIAL to required targets
JLINK_TARGETS = debug% flash% reset term-rtt
$(call target-export-variables,$(JLINK_TARGETS),JLINK_SERIAL)
# Export JLINK_DEVICE to required targets
$(call target-export-variables,$(JLINK_TARGETS),JLINK_DEVICE)
ifneq (,$(JLINK_IF))
# Export JLINK_IF to required targets if not empty
$(call target-export-variables,$(JLINK_TARGETS),JLINK_IF)
endif
ifneq (,$(JLINK_RESET_FILE))
# Export JLINK_RESET_FILE to required targets if not empty
$(call target-export-variables,$(JLINK_TARGETS),JLINK_RESET_FILE)
endif
# Export JLINK_PRE_FLASH to flash targets only if not empty
ifneq (,$(JLINK_PRE_FLASH))
$(call target-export-variables,flash%,JLINK_PRE_FLASH)
endif