Skip to content

Commit

Permalink
Merge pull request #18237 from maribu/boards/thingy52
Browse files Browse the repository at this point in the history
boards/{thingy52,ruuvitag}: allow OpenOCD as programmer
  • Loading branch information
chrysn authored Jun 22, 2022
2 parents 4ed3b1a + e3f5ba9 commit fc6b12a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
25 changes: 7 additions & 18 deletions boards/common/nrf52/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,14 @@ ifeq (bmp,$(PROGRAMMER))
PORT_DARWIN ?= $(wordlist 2, 2, $(sort $(wildcard /dev/tty.usbmodem*)))
endif

ifneq (,$(filter $(BOARD),ruuvitag thingy52))
# openocd doesn't fully work with ruuvitag and thingy52
PROGRAMMER ?= jlink
ifeq (openocd,$(PROGRAMMER))
$(error Cannot use OpenOCD with $(BOARD) board)
endif
# set list of supported programmers
PROGRAMMERS_SUPPORTED += openocd bmp
# keep name of `JLINK` in sync with script jlink.sh in $(RIOTTOOLS)/jlink
JLINK ?= JLinkExe
ifneq (,$(command -v $(JLINK)))
PROGRAMMER ?= jlink
else
# no issues with OpenOCD for other nRF52 boards are known
PROGRAMMERS_SUPPORTED += openocd
# keep name of `JLINK` in sync with script jlink.sh in $(RIOTTOOLS)/jlink
JLINK ?= JLinkExe
ifneq (,$(command -v $(JLINK)))
PROGRAMMER ?= jlink
else
PROGRAMMER ?= openocd
endif
PROGRAMMER ?= openocd
endif

# setup JLink for flashing
Expand All @@ -33,6 +25,3 @@ JLINK_DEVICE = nrf52
# build from source (master > 2018, August the 13rd) is required.
OPENOCD_DEBUG_ADAPTER ?= jlink
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg

# set list of supported programmers
PROGRAMMERS_SUPPORTED += bmp
3 changes: 0 additions & 3 deletions boards/ruuvitag/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ endif

# use shared Makefile.include
include $(RIOTBOARD)/common/nrf52xxxdk/Makefile.include

# openocd doesn't fully work with this board
PROGRAMMERS_SUPPORTED := $(filter-out openocd,$(PROGRAMMERS_SUPPORTED))
3 changes: 0 additions & 3 deletions boards/thingy52/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ endif

# use shared Makefile.include
include $(RIOTBOARD)/common/nrf52/Makefile.include

# openocd doesn't fully work with this board
PROGRAMMERS_SUPPORTED := $(filter-out openocd,$(PROGRAMMERS_SUPPORTED))

0 comments on commit fc6b12a

Please sign in to comment.