Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/{thingy52,ruuvitag}: allow OpenOCD as programmer #18237

Merged
merged 1 commit into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))