Skip to content

Commit a8ffb34

Browse files
authored
Merge pull request #20599 from crasbe/pr/nrf52840_jlink
boards/nRF52xx: correctly set JLINK_DEVICE
2 parents 5a7bcc9 + 6f0e81f commit a8ffb34

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

boards/common/nrf52/Makefile.include

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ else
1818
PROGRAMMER ?= openocd
1919
endif
2020

21-
# setup JLink for flashing
22-
JLINK_DEVICE = nrf52
2321
# setup OpenOCD for flashing. Version 0.10 of OpenOCD doesn't contain support
2422
# for nrf52dk and nrf52840dk boards. To use OpenOCD with these a version
2523
# build from source (master > 2018, August the 13rd) is required.

cpu/nrf52/Makefile.include

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ ifneq (,$(filter nrf52840xxaa,$(CPU_MODEL)))
3535
RAM_LEN ?= 0x40000
3636
endif
3737

38+
# Set the target for the JLink programmer for flashing, JLINK expects an
39+
# underscore in the target, like "nrf52832_xxaa".
40+
# Boards that do not use a JLink ignore the flag.
41+
JLINK_DEVICE = $(subst xx,_xx,$(CPU_MODEL))
42+
3843
VECTORS_O ?= $(BINDIR)/nrf52_vectors/vectors_$(CPU_MODEL).o
3944

4045
include $(RIOTCPU)/nrf5x_common/Makefile.include

0 commit comments

Comments
 (0)