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

Merge pull request #11725 from benpicco/sam0-jlink

sam0: allow flashing with JLinkExe
This commit is contained in:
Dylan Laduranty 2019-10-08 20:59:59 +02:00 committed by GitHub
commit cdcdaa63ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,8 +24,15 @@ DEBUG_ADAPTER ?= dap
# EDBG can only be used with a compatible Atmel programmer
ifeq ($(DEBUG_ADAPTER),dap)
# set this to either openocd or edbg
# set this to either openocd, jlink or edbg
PROGRAMMER ?= edbg
else ifeq ($(DEBUG_ADAPTER),jlink)
# only use JLinkExe if it's installed
ifneq (,$(shell command -v JLinkExe)))
PROGRAMMER ?= jlink
else
PROGRAMMER ?= openocd
endif
else
PROGRAMMER ?= openocd
endif
@ -37,5 +44,12 @@ ifeq ($(PROGRAMMER),edbg)
endif
endif
# this board uses J-Link for debug and possibly flashing
ifeq ($(PROGRAMMER),jlink)
include $(RIOTMAKE)/tools/jlink.inc.mk
endif
# this board uses openocd for debug and possibly flashing
include $(RIOTMAKE)/tools/openocd.inc.mk
ifeq ($(PROGRAMMER),openocd)
include $(RIOTMAKE)/tools/openocd.inc.mk
endif