mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tools/avarice: deduce debugger from AVRDUDE_PROGRAMMER
If `AVRDUDE_PROGRAMMER` is already set to a programmer that is also capable of debugging, we can assume that typically the user will want to use the same hardware for debugging. Thus, let `AVR_DEBUGDEVICE` default to the matching hardware.
This commit is contained in:
parent
04b7ea59fd
commit
7df2bc2072
@ -3,9 +3,15 @@ DIST_PATH = $(BOARDDIR)/dist
|
||||
AVARICE_PATH = $(RIOTTOOLS)/avarice
|
||||
DEBUGSERVER_PORT = 4242
|
||||
DEBUGSERVER ?= $(AVARICE_PATH)/debug_srv.sh
|
||||
# Allow choosing debugger hardware via AVR_DEBUGDEVICE, default to Atmel ICE,
|
||||
# which is compatible to all AVR devices and since the AVR Dragon is no longer
|
||||
# produced, the least expensive option
|
||||
# Allow choosing debugger hardware via AVR_DEBUGDEVICE. If the
|
||||
# AVRDUDE_PROGRAMMER however is also capable of debugging, use that by default
|
||||
ifneq (,$(filter $(AVRDUDE_PROGRAMMER),atmelice xplainedpro xplainedpro_pdi))
|
||||
AVR_DEBUGDEVICE ?= --edbg
|
||||
endif
|
||||
ifneq (,$(filter dragon%,$(AVRDUDE_PROGRAMMER)))
|
||||
AVR_DEBUGDEVICE ?= --dragon
|
||||
endif
|
||||
# Atmel ICE / EDBG is the most sensible fallback
|
||||
AVR_DEBUGDEVICE ?= --edbg
|
||||
AVR_DEBUGINTERFACE ?= usb
|
||||
ifneq (,$(filter $(CPU),atmega328p))
|
||||
|
Loading…
Reference in New Issue
Block a user