Skip to content

Commit

Permalink
boards/nRF52xx: correctly set JLINK_DEVICE
Browse files Browse the repository at this point in the history
  • Loading branch information
crasbe committed Apr 19, 2024
1 parent 3ba49d5 commit 3a76d18
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 0 additions & 2 deletions boards/common/nrf52/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 24 additions & 0 deletions cpu/nrf52/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,30 @@ ifneq (,$(filter nrf52840xxaa,$(CPU_MODEL)))
RAM_LEN ?= 0x40000
endif

# Set the target for the JLink programmer for flashing.
# Boards that do not use a JLink ignore the flag.
ifneq (,$(filter nrf52805xxaa,$(CPU_MODEL)))
JLINK_DEVICE = nrf52805_xxaa
endif
ifneq (,$(filter nrf52810xxaa,$(CPU_MODEL)))
JLINK_DEVICE = nrf52810_xxaa
endif
ifneq (,$(filter nrf52811xxaa,$(CPU_MODEL)))
JLINK_DEVICE = nrf52811_xxaa
endif
ifneq (,$(filter nrf52820xxaa,$(CPU_MODEL)))
JLINK_DEVICE = nrf52820_xxaa
endif
ifneq (,$(filter nrf52832xxaa,$(CPU_MODEL)))
JLINK_DEVICE = nrf52832_xxaa
endif
ifneq (,$(filter nrf52833xxaa,$(CPU_MODEL)))
JLINK_DEVICE = nrf52833_xxaa
endif
ifneq (,$(filter nrf52840xxaa,$(CPU_MODEL)))
JLINK_DEVICE = nrf52840_xxaa
endif

VECTORS_O ?= $(BINDIR)/nrf52_vectors/vectors_$(CPU_MODEL).o

include $(RIOTCPU)/nrf5x_common/Makefile.include
Expand Down

0 comments on commit 3a76d18

Please sign in to comment.