mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/boards/sam0.inc.mk: Allow other programmers
Modified to allow including sam0.inc.mk even if none of the programmers handled their is used. This is useful for boards that by default are programmed via a bootloader. Still including sam0.inc.mk allows users to specify the `PROGRAMMER` to use jlink, openocd, or edgb instead of the bootloader.
This commit is contained in:
parent
8b9a98233e
commit
98824df68b
@ -22,30 +22,31 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
# Default for these boards is to use a CMSIS-DAP programmer
|
||||
DEBUG_ADAPTER ?= dap
|
||||
|
||||
# EDBG can only be used with a compatible Atmel programmer
|
||||
ifeq ($(DEBUG_ADAPTER),dap)
|
||||
# set this to either openocd, jlink or edbg
|
||||
PROGRAMMER ?= edbg
|
||||
else ifeq ($(DEBUG_ADAPTER),jlink)
|
||||
# only use JLinkExe if it's installed
|
||||
ifneq (,$(shell which JLinkExe))
|
||||
PROGRAMMER ?= jlink
|
||||
# If no programmer is set, select a default programmer
|
||||
ifeq ($(PROGRAMMER),)
|
||||
# EDBG can only be used with a compatible Atmel programmer
|
||||
ifeq ($(DEBUG_ADAPTER),dap)
|
||||
# set this to either openocd, jlink or edbg
|
||||
PROGRAMMER ?= edbg
|
||||
else ifeq ($(DEBUG_ADAPTER),jlink)
|
||||
# only use JLinkExe if it's installed
|
||||
ifneq (,$(shell which JLinkExe))
|
||||
PROGRAMMER ?= jlink
|
||||
else
|
||||
PROGRAMMER ?= openocd
|
||||
endif
|
||||
else
|
||||
PROGRAMMER ?= openocd
|
||||
endif
|
||||
else
|
||||
PROGRAMMER ?= openocd
|
||||
endif
|
||||
|
||||
# use edbg if selected and a device type has been set
|
||||
ifeq ($(PROGRAMMER),edbg)
|
||||
# use edbg for flashing
|
||||
include $(RIOTMAKE)/tools/edbg.inc.mk
|
||||
endif
|
||||
|
||||
ifeq ($(PROGRAMMER),jlink)
|
||||
else ifeq ($(PROGRAMMER),jlink)
|
||||
# this board uses J-Link for debug and possibly flashing
|
||||
include $(RIOTMAKE)/tools/jlink.inc.mk
|
||||
else
|
||||
else ifeq ($(PROGRAMMER),openocd)
|
||||
# this board uses openocd for debug and possibly flashing
|
||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user