From 6f0e81fb3485fd190e829be526912555021ae1a3 Mon Sep 17 00:00:00 2001 From: crasbe Date: Fri, 19 Apr 2024 15:25:28 +0200 Subject: [PATCH] boards/nRF52xx: correctly set JLINK_DEVICE --- boards/common/nrf52/Makefile.include | 2 -- cpu/nrf52/Makefile.include | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/boards/common/nrf52/Makefile.include b/boards/common/nrf52/Makefile.include index 82ab6d0643..8e17d28b28 100644 --- a/boards/common/nrf52/Makefile.include +++ b/boards/common/nrf52/Makefile.include @@ -18,8 +18,6 @@ else PROGRAMMER ?= openocd endif -# setup JLink for flashing -JLINK_DEVICE = nrf52 # setup OpenOCD for flashing. Version 0.10 of OpenOCD doesn't contain support # for nrf52dk and nrf52840dk boards. To use OpenOCD with these a version # build from source (master > 2018, August the 13rd) is required. diff --git a/cpu/nrf52/Makefile.include b/cpu/nrf52/Makefile.include index e0dd3beefd..15d5174ef1 100644 --- a/cpu/nrf52/Makefile.include +++ b/cpu/nrf52/Makefile.include @@ -35,6 +35,11 @@ ifneq (,$(filter nrf52840xxaa,$(CPU_MODEL))) RAM_LEN ?= 0x40000 endif +# Set the target for the JLink programmer for flashing, JLINK expects an +# underscore in the target, like "nrf52832_xxaa". +# Boards that do not use a JLink ignore the flag. +JLINK_DEVICE = $(subst xx,_xx,$(CPU_MODEL)) + VECTORS_O ?= $(BINDIR)/nrf52_vectors/vectors_$(CPU_MODEL).o include $(RIOTCPU)/nrf5x_common/Makefile.include