mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-14 17:13:50 +01:00
boards/{thingy52,ruuvitag}: allow OpenOCD as programmer
This commit is contained in:
parent
03dfad899b
commit
e3f5ba90fd
@ -8,22 +8,14 @@ ifeq (bmp,$(PROGRAMMER))
|
|||||||
PORT_DARWIN ?= $(wordlist 2, 2, $(sort $(wildcard /dev/tty.usbmodem*)))
|
PORT_DARWIN ?= $(wordlist 2, 2, $(sort $(wildcard /dev/tty.usbmodem*)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter $(BOARD),ruuvitag thingy52))
|
# set list of supported programmers
|
||||||
# openocd doesn't fully work with ruuvitag and thingy52
|
PROGRAMMERS_SUPPORTED += openocd bmp
|
||||||
PROGRAMMER ?= jlink
|
# keep name of `JLINK` in sync with script jlink.sh in $(RIOTTOOLS)/jlink
|
||||||
ifeq (openocd,$(PROGRAMMER))
|
JLINK ?= JLinkExe
|
||||||
$(error Cannot use OpenOCD with $(BOARD) board)
|
ifneq (,$(command -v $(JLINK)))
|
||||||
endif
|
PROGRAMMER ?= jlink
|
||||||
else
|
else
|
||||||
# no issues with OpenOCD for other nRF52 boards are known
|
PROGRAMMER ?= openocd
|
||||||
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
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# setup JLink for flashing
|
# setup JLink for flashing
|
||||||
@ -33,6 +25,3 @@ JLINK_DEVICE = nrf52
|
|||||||
# build from source (master > 2018, August the 13rd) is required.
|
# build from source (master > 2018, August the 13rd) is required.
|
||||||
OPENOCD_DEBUG_ADAPTER ?= jlink
|
OPENOCD_DEBUG_ADAPTER ?= jlink
|
||||||
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
|
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
|
||||||
|
|
||||||
# set list of supported programmers
|
|
||||||
PROGRAMMERS_SUPPORTED += bmp
|
|
||||||
|
|||||||
@ -7,6 +7,3 @@ endif
|
|||||||
|
|
||||||
# use shared Makefile.include
|
# use shared Makefile.include
|
||||||
include $(RIOTBOARD)/common/nrf52xxxdk/Makefile.include
|
include $(RIOTBOARD)/common/nrf52xxxdk/Makefile.include
|
||||||
|
|
||||||
# openocd doesn't fully work with this board
|
|
||||||
PROGRAMMERS_SUPPORTED := $(filter-out openocd,$(PROGRAMMERS_SUPPORTED))
|
|
||||||
|
|||||||
@ -7,6 +7,3 @@ endif
|
|||||||
|
|
||||||
# use shared Makefile.include
|
# use shared Makefile.include
|
||||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
|
||||||
# openocd doesn't fully work with this board
|
|
||||||
PROGRAMMERS_SUPPORTED := $(filter-out openocd,$(PROGRAMMERS_SUPPORTED))
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user