diff --git a/boards/adafruit-clue/Makefile.include b/boards/adafruit-clue/Makefile.include index 7878ea050f..50cd70b7ab 100644 --- a/boards/adafruit-clue/Makefile.include +++ b/boards/adafruit-clue/Makefile.include @@ -2,6 +2,7 @@ PROGRAMMER ?= adafruit-nrfutil include $(RIOTBOARD)/common/nrf52/Makefile.include +PROGRAMMERS_SUPPORTED += adafruit-nrfutil ifeq ($(PROGRAMMER),adafruit-nrfutil) # The preinstalled bootloader must also be taken into account so diff --git a/boards/adafruit-itsybitsy-nrf52/Makefile.include b/boards/adafruit-itsybitsy-nrf52/Makefile.include index f6b26adbd7..b2e3879967 100644 --- a/boards/adafruit-itsybitsy-nrf52/Makefile.include +++ b/boards/adafruit-itsybitsy-nrf52/Makefile.include @@ -28,3 +28,4 @@ endif $(FLASHER) dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application $< $@ include $(RIOTBOARD)/common/nrf52/Makefile.include +PROGRAMMERS_SUPPORTED += nrfutil diff --git a/boards/arduino-nano-33-ble/Makefile.include b/boards/arduino-nano-33-ble/Makefile.include index bc8ca5a779..703bd60627 100644 --- a/boards/arduino-nano-33-ble/Makefile.include +++ b/boards/arduino-nano-33-ble/Makefile.include @@ -13,6 +13,8 @@ ifeq ($(PROGRAMMER),bossa) PREFLASH_DELAY = 1 endif +PROGRAMMERS_SUPPORTED += bossa + TESTRUNNER_CONNECT_DELAY ?= 2 $(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY) diff --git a/boards/common/nrf52/Makefile.include b/boards/common/nrf52/Makefile.include index 5e9acb6778..9b287b6902 100644 --- a/boards/common/nrf52/Makefile.include +++ b/boards/common/nrf52/Makefile.include @@ -23,3 +23,6 @@ ifneq (,$(filter $(BOARD),ruuvitag thingy52)) $(error Cannot use OpenOCD with $(BOARD) board) endif endif + +# set list of supported programmers +PROGRAMMERS_SUPPORTED += bmp openocd diff --git a/boards/common/particle-mesh/Makefile.include b/boards/common/particle-mesh/Makefile.include index b86df590d3..8aa40425e0 100644 --- a/boards/common/particle-mesh/Makefile.include +++ b/boards/common/particle-mesh/Makefile.include @@ -5,6 +5,8 @@ CFLAGS += -DBOARD_NRFANTENNA_DEFAULT=BOARD_NRFANTENNA_$(BOARD_NRFANTENNA_DEFAULT # add the common header files to the include path INCLUDES += -I$(RIOTBOARD)/common/particle-mesh/include +PROGRAMMERS_SUPPORTED += dfu-util pyocd + ifeq (1,$(PARTICLE_MONOFIRMWARE)) CFLAGS += -DPARTICLE_MONOFIRMWARE ROM_OFFSET = 0x30000 @@ -17,6 +19,9 @@ ifeq (1,$(PARTICLE_MONOFIRMWARE)) # then again nothing can be done in that case anyway, and the preflash # routines fall through without erring. include $(RIOTMAKE)/tools/usb_board_reset.mk + + # Only dfu-util is supported in this case + PROGRAMMERS_SUPPORTED = dfu-util else # This board uses a DAP-Link programmer # Flashing support is provided through pyocd (default) and openocd. diff --git a/boards/microbit-v2/Makefile.include b/boards/microbit-v2/Makefile.include index cb5b9ed70d..79010b91b4 100644 --- a/boards/microbit-v2/Makefile.include +++ b/boards/microbit-v2/Makefile.include @@ -1,5 +1,7 @@ # for this board, flash with OpenOCD by default. PyOCD is also supported. PROGRAMMER ?= openocd +PROGRAMMERS_SUPPORTED += pyocd + # The board is not recognized automatically by pyocd, so the CPU target # option is passed explicitly PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU) diff --git a/boards/nrf52832-mdk/Makefile.include b/boards/nrf52832-mdk/Makefile.include index 02d0a173ec..917c2be272 100644 --- a/boards/nrf52832-mdk/Makefile.include +++ b/boards/nrf52832-mdk/Makefile.include @@ -8,4 +8,7 @@ PROGRAMMER ?= pyocd PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU) OPENOCD_DEBUG_ADAPTER = dap +# This board can also be flashed with pyocd +PROGRAMMERS_SUPPORTED += pyocd + include $(RIOTBOARD)/common/nrf52/Makefile.include diff --git a/boards/nrf52840-mdk-dongle/Makefile.include b/boards/nrf52840-mdk-dongle/Makefile.include index 6dde7744a8..ceca1c1104 100644 --- a/boards/nrf52840-mdk-dongle/Makefile.include +++ b/boards/nrf52840-mdk-dongle/Makefile.include @@ -16,4 +16,6 @@ ifeq (uf2conv,$(PROGRAMMER)) include $(RIOTMAKE)/tools/usb_board_reset.mk endif +PROGRAMMERS_SUPPORTED += uf2conv + include $(RIOTBOARD)/common/nrf52/Makefile.include diff --git a/boards/nrf52840-mdk/Makefile.include b/boards/nrf52840-mdk/Makefile.include index 2494656654..924274d4d4 100644 --- a/boards/nrf52840-mdk/Makefile.include +++ b/boards/nrf52840-mdk/Makefile.include @@ -8,4 +8,7 @@ PROGRAMMER ?= pyocd PYOCD_FLASH_TARGET_TYPE ?= -t nrf52840 OPENOCD_DEBUG_ADAPTER = dap +# This board can also be flashed with pyocd +PROGRAMMERS_SUPPORTED += pyocd + include $(RIOTBOARD)/common/nrf52/Makefile.include diff --git a/boards/nrf52840dongle/Makefile.include b/boards/nrf52840dongle/Makefile.include index b6e77101b7..135045a7d2 100644 --- a/boards/nrf52840dongle/Makefile.include +++ b/boards/nrf52840dongle/Makefile.include @@ -22,6 +22,8 @@ ifeq (nrfutil,$(PROGRAMMER)) include $(RIOTMAKE)/tools/usb_board_reset.mk endif +PROGRAMMERS_SUPPORTED += nrfutil + %.hex.zip: %.hex $(call check_cmd,$(FLASHER),Flash program and preparation tool) $(FLASHER) pkg generate --hw-version 52 --sd-req 0x00 --application-version 1 --application $< $@ diff --git a/boards/ruuvitag/Makefile.include b/boards/ruuvitag/Makefile.include index 03e3beeae0..d90c0b68c4 100644 --- a/boards/ruuvitag/Makefile.include +++ b/boards/ruuvitag/Makefile.include @@ -7,3 +7,6 @@ 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)) diff --git a/boards/thingy52/Makefile.include b/boards/thingy52/Makefile.include index 59dbf42556..a229253a2a 100644 --- a/boards/thingy52/Makefile.include +++ b/boards/thingy52/Makefile.include @@ -7,3 +7,6 @@ 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))