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

tools/edbg: update to latest upstream version

This version has changed the target names, so add a edbg-devices.inc.mk
to automatically select the right target.
This commit is contained in:
Benjamin Valentin 2020-01-29 18:40:27 +01:00
parent 57db6b7313
commit baea542532
3 changed files with 95 additions and 1 deletions

View File

@ -1,6 +1,6 @@
PKG_NAME=edbg
PKG_URL=https://github.com/ataradov/edbg
PKG_VERSION=4f5d490bfffc7fd10855e513e6e88be5a9a3f789
PKG_VERSION=99d15460fcff723f73b16c29c8ca14bff4b33b20
PKG_LICENSE=BSD-3-Clause
PKG_BUILDDIR=$(CURDIR)/bin

View File

@ -0,0 +1,92 @@
# Atmel SAM C/D/L/R series:
ifneq (,$(findstring samd09,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samd09
else ifneq (,$(findstring samd10,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samd10
else ifneq (,$(findstring samd11,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samd11
else ifneq (,$(findstring samd20,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samd20
else ifneq (,$(findstring samd21,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samd21
else ifneq (,$(findstring samc21,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samc21
else ifneq (,$(findstring saml21,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = saml21
else ifneq (,$(findstring saml22,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = saml22
else ifneq (,$(findstring samr21,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samr21
else ifneq (,$(findstring samr30,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samr30
else ifneq (,$(findstring samr34,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samr34
else ifneq (,$(findstring samr35,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samr35
else ifneq (,$(findstring samda1,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samda1
endif
# Atmel SAM3X/A/U series:
ifneq (,$(findstring samg51,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samg51
else ifneq (,$(findstring samg53,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samg53
else ifneq (,$(findstring samg54,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samg54
else ifneq (,$(findstring samg55,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samg55
else ifneq (,$(findstring sam4sd,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = sam4sd
else ifneq (,$(findstring sam4sa,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = sam4sa
else ifneq (,$(findstring sam4s,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = sam4s
else ifneq (,$(findstring sam4e,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = sam4e
else ifneq (,$(findstring sam4n,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = sam4n
endif
# Atmel SAM E7x/S7x/V7x series:
ifneq (,$(findstring same70,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = same70
else ifneq (,$(findstring sams70,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = sams70
else ifneq (,$(findstring samv71,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samv71
else ifneq (,$(findstring samv70,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samv70
endif
# Atmel SAM D5x/E5x:
ifneq (,$(findstring same51,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = same51
else ifneq (,$(findstring samd51,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = samd51
else ifneq (,$(findstring same53,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = same53
else ifneq (,$(findstring same54,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = same54
endif
# Microchip SAM L10/L11:
ifneq (,$(findstring saml10,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = saml10
else ifneq (,$(findstring saml11,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = saml11
endif
# STMicroelectronics STM32G0 series:
ifneq (,$(findstring stm32g0,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = stm32g0
endif
# GigaDevice GD32F4xx series:
ifneq (,$(findstring gd32f4,$(CPU_MODEL)))
EDBG_DEVICE_TYPE = gd32f4xx
endif
ifeq (,$(EDBG_DEVICE_TYPE))
$(error "Device not supported by edbg.")
endif

View File

@ -1,3 +1,5 @@
include $(RIOTMAKE)/tools/edbg-devices.inc.mk
RIOT_EDBG = $(RIOTTOOLS)/edbg/edbg
EDBG ?= $(RIOT_EDBG)
FLASHER ?= $(EDBG)