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

Merge pull request #18631 from maribu/tools/avarice

tools/avarice: deduce debugger from AVRDUDE_PROGRAMMER
This commit is contained in:
Marian Buschsieweke 2022-09-23 20:36:00 +02:00 committed by GitHub
commit f03e71a509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))