Merge pull request #15983 from aabadie/pr/make/supported_programmers
boards: make: introduce mechanism to define supported programmers
This commit is contained in:
commit
2e06957e3b
@ -410,6 +410,17 @@ endif
|
|||||||
# Include common programmer logic if available
|
# Include common programmer logic if available
|
||||||
-include $(RIOTMAKE)/tools/$(PROGRAMMER).inc.mk
|
-include $(RIOTMAKE)/tools/$(PROGRAMMER).inc.mk
|
||||||
|
|
||||||
|
# Check if programmer is supported by the board, only if PROGRAMMERS_SUPPORTED
|
||||||
|
# is set and if programmer is not iotlab
|
||||||
|
ifneq (iotlab,$(PROGRAMMER))
|
||||||
|
ifneq (,$(PROGRAMMERS_SUPPORTED))
|
||||||
|
ifeq (,$(filter $(PROGRAMMER),$(PROGRAMMERS_SUPPORTED)))
|
||||||
|
$(info '$(PROGRAMMER)' programmer is not supported by this board. \
|
||||||
|
Supported programmers: '$(PROGRAMMERS_SUPPORTED)')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't
|
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't
|
||||||
# provide this macro
|
# provide this macro
|
||||||
TOOLCHAINS_SUPPORTED ?= gnu
|
TOOLCHAINS_SUPPORTED ?= gnu
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# use pic32prog by default to program this board
|
# use pic32prog by default to program this board
|
||||||
PROGRAMMER ?= pic32prog
|
PROGRAMMER ?= pic32prog
|
||||||
|
PROGRAMMERS_SUPPORTED += pic32prog
|
||||||
ifeq ($(PROGRAMMER),pic32prog)
|
ifeq ($(PROGRAMMER),pic32prog)
|
||||||
# pic32prog
|
# pic32prog
|
||||||
#
|
#
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
PROGRAMMER ?= adafruit-nrfutil
|
PROGRAMMER ?= adafruit-nrfutil
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
PROGRAMMERS_SUPPORTED += adafruit-nrfutil
|
||||||
|
|
||||||
ifeq ($(PROGRAMMER),adafruit-nrfutil)
|
ifeq ($(PROGRAMMER),adafruit-nrfutil)
|
||||||
# The preinstalled bootloader must also be taken into account so
|
# The preinstalled bootloader must also be taken into account so
|
||||||
|
|||||||
@ -28,3 +28,4 @@ endif
|
|||||||
$(FLASHER) dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application $< $@
|
$(FLASHER) dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application $< $@
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
PROGRAMMERS_SUPPORTED += nrfutil
|
||||||
|
|||||||
@ -6,7 +6,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
STLINK_VERSION ?= 2
|
STLINK_VERSION ?= 2
|
||||||
|
|
||||||
PROGRAMMER = openocd
|
|
||||||
|
|
||||||
# include nrf51 boards common configuration
|
# include nrf51 boards common configuration
|
||||||
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
@ -13,6 +13,8 @@ ifeq ($(PROGRAMMER),bossa)
|
|||||||
PREFLASH_DELAY = 1
|
PREFLASH_DELAY = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += bossa
|
||||||
|
|
||||||
TESTRUNNER_CONNECT_DELAY ?= 2
|
TESTRUNNER_CONNECT_DELAY ?= 2
|
||||||
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
|
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,9 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
|||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# Add openocd as supported programmer
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
# this board can become un-flashable after a hardfault,
|
# this board can become un-flashable after a hardfault,
|
||||||
# use connect_assert_srst to always be able to flash or reset the board.
|
# use connect_assert_srst to always be able to flash or reset the board.
|
||||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||||
|
|||||||
@ -5,6 +5,9 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
|||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# Add openocd as supported programmer
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
# The board can become un-flashable after some execution,
|
# The board can become un-flashable after some execution,
|
||||||
# use connect_assert_srst to always be able to flash or reset the board.
|
# use connect_assert_srst to always be able to flash or reset the board.
|
||||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
# for this board we support flashing via openocd or pyocd
|
# for this board we support flashing via openocd or pyocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
|
||||||
|
# This board can be flashed with pyocd
|
||||||
|
PROGRAMMERS_SUPPORTED += pyocd
|
||||||
|
|
||||||
OPENOCD_DEBUG_ADAPTER = dap
|
OPENOCD_DEBUG_ADAPTER = dap
|
||||||
# PyOCD doesn't recognize automatically the board ID, so target type has to
|
# PyOCD doesn't recognize automatically the board ID, so target type has to
|
||||||
# be passed explicitly
|
# be passed explicitly
|
||||||
|
|||||||
@ -3,5 +3,6 @@ INCLUDES += -I$(RIOTBOARD)/common/arduino-due/include
|
|||||||
|
|
||||||
# setup flasher (using BOSSA)
|
# setup flasher (using BOSSA)
|
||||||
PROGRAMMER ?= bossa
|
PROGRAMMER ?= bossa
|
||||||
|
PROGRAMMERS_SUPPORTED += bossa
|
||||||
BOSSA_VERSION = 1.8
|
BOSSA_VERSION = 1.8
|
||||||
BOSSA_ARDUINO_PREFLASH = yes
|
BOSSA_ARDUINO_PREFLASH = yes
|
||||||
|
|||||||
@ -3,6 +3,9 @@ INCLUDES += -I$(RIOTBOARD)/common/atmega/include
|
|||||||
# Use avrdude programmer
|
# Use avrdude programmer
|
||||||
PROGRAMMER ?= avrdude
|
PROGRAMMER ?= avrdude
|
||||||
|
|
||||||
|
# Add avrdude as supported programmer
|
||||||
|
PROGRAMMERS_SUPPORTED += avrdude
|
||||||
|
|
||||||
# Use atmega board specific bootloader by default
|
# Use atmega board specific bootloader by default
|
||||||
ATMEGA_BOOTLOADER ?= $($(call uppercase_and_underscore,$(BOARD))_BOOTLOADER)
|
ATMEGA_BOOTLOADER ?= $($(call uppercase_and_underscore,$(BOARD))_BOOTLOADER)
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
# define the default flash-tool
|
# define the default flash-tool
|
||||||
PROGRAMMER ?= cc2538-bsl
|
PROGRAMMER ?= cc2538-bsl
|
||||||
|
|
||||||
|
# cc2538-bsl programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += cc2538-bsl
|
||||||
|
|
||||||
ifeq ($(PROGRAMMER),cc2538-bsl)
|
ifeq ($(PROGRAMMER),cc2538-bsl)
|
||||||
PROG_BAUD ?= 460800
|
PROG_BAUD ?= 460800
|
||||||
else ifeq ($(PROGRAMMER),jlink)
|
else ifeq ($(PROGRAMMER),jlink)
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
# configure the flash tool
|
# configure the flash tool
|
||||||
PROGRAMMER ?= uniflash
|
PROGRAMMER ?= uniflash
|
||||||
|
|
||||||
|
# uniflash and openocd programmers are supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd uniflash
|
||||||
|
|
||||||
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/cc26xx_cc13xx/dist/openocd.cfg
|
OPENOCD_CONFIG ?= $(RIOTBOARD)/common/cc26xx_cc13xx/dist/openocd.cfg
|
||||||
UNIFLASH_CONFIG ?= $(RIOTBOARD)/common/cc26xx_cc13xx/dist
|
UNIFLASH_CONFIG ?= $(RIOTBOARD)/common/cc26xx_cc13xx/dist
|
||||||
|
|||||||
@ -24,3 +24,6 @@ OPENOCD_PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield.sh
|
|||||||
# The board can become un-flashable after some execution,
|
# The board can become un-flashable after some execution,
|
||||||
# use connect_assert_srst to always be able to flash or reset the board.
|
# use connect_assert_srst to always be able to flash or reset the board.
|
||||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||||
|
|
||||||
|
# openocd programmer is supported with FRDM boards
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -5,6 +5,9 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*B)))
|
|||||||
# setup serial terminal
|
# setup serial terminal
|
||||||
BAUD ?= 500000
|
BAUD ?= 500000
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
# Use openocd by default
|
# Use openocd by default
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
|
||||||
|
|||||||
@ -7,3 +7,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
# setup flash tool
|
# setup flash tool
|
||||||
PROGRAMMER ?= mspdebug
|
PROGRAMMER ?= mspdebug
|
||||||
MSPDEBUG_PROGRAMMER ?= olimex
|
MSPDEBUG_PROGRAMMER ?= olimex
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += mspdebug
|
||||||
|
|||||||
@ -6,6 +6,8 @@ PORT_DARWIN ?= /dev/tty.usbserial-ARM
|
|||||||
# Use lpc2k_pgm programmer
|
# Use lpc2k_pgm programmer
|
||||||
PROGRAMMER ?= lpc2k_pgm
|
PROGRAMMER ?= lpc2k_pgm
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += lpc2k_pgm
|
||||||
|
|
||||||
# when using miniterm set RTS and DTR lines to 0, otherwise the board is reset
|
# when using miniterm set RTS and DTR lines to 0, otherwise the board is reset
|
||||||
MINITERMFLAGS += --rts 0 --dtr 0
|
MINITERMFLAGS += --rts 0 --dtr 0
|
||||||
|
|
||||||
|
|||||||
@ -16,3 +16,6 @@ else ifeq ($(PROGRAMMER),jlink)
|
|||||||
# setup JLink for flashing
|
# setup JLink for flashing
|
||||||
JLINK_DEVICE = nrf51822
|
JLINK_DEVICE = nrf51822
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Set openocd as default supported programmers
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -23,3 +23,6 @@ ifneq (,$(filter $(BOARD),ruuvitag thingy52))
|
|||||||
$(error Cannot use OpenOCD with $(BOARD) board)
|
$(error Cannot use OpenOCD with $(BOARD) board)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# set list of supported programmers
|
||||||
|
PROGRAMMERS_SUPPORTED += bmp openocd
|
||||||
|
|||||||
@ -5,6 +5,8 @@ CFLAGS += -DBOARD_NRFANTENNA_DEFAULT=BOARD_NRFANTENNA_$(BOARD_NRFANTENNA_DEFAULT
|
|||||||
# add the common header files to the include path
|
# add the common header files to the include path
|
||||||
INCLUDES += -I$(RIOTBOARD)/common/particle-mesh/include
|
INCLUDES += -I$(RIOTBOARD)/common/particle-mesh/include
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += dfu-util pyocd
|
||||||
|
|
||||||
ifeq (1,$(PARTICLE_MONOFIRMWARE))
|
ifeq (1,$(PARTICLE_MONOFIRMWARE))
|
||||||
CFLAGS += -DPARTICLE_MONOFIRMWARE
|
CFLAGS += -DPARTICLE_MONOFIRMWARE
|
||||||
ROM_OFFSET = 0x30000
|
ROM_OFFSET = 0x30000
|
||||||
@ -17,6 +19,9 @@ ifeq (1,$(PARTICLE_MONOFIRMWARE))
|
|||||||
# then again nothing can be done in that case anyway, and the preflash
|
# then again nothing can be done in that case anyway, and the preflash
|
||||||
# routines fall through without erring.
|
# routines fall through without erring.
|
||||||
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
||||||
|
|
||||||
|
# Only dfu-util is supported in this case
|
||||||
|
PROGRAMMERS_SUPPORTED = dfu-util
|
||||||
else
|
else
|
||||||
# This board uses a DAP-Link programmer
|
# This board uses a DAP-Link programmer
|
||||||
# Flashing support is provided through pyocd (default) and openocd.
|
# Flashing support is provided through pyocd (default) and openocd.
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
# of writing has not been merged in the tree and is only available at
|
# of writing has not been merged in the tree and is only available at
|
||||||
# http://openocd.zylin.com/#/c/5584/ .
|
# http://openocd.zylin.com/#/c/5584/ .
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
# Using dap or jlink depends on which firmware the OpenSDA debugger is running
|
# Using dap or jlink depends on which firmware the OpenSDA debugger is running
|
||||||
#OPENOCD_DEBUG_ADAPTER ?= dap
|
#OPENOCD_DEBUG_ADAPTER ?= dap
|
||||||
|
|||||||
@ -2,6 +2,10 @@
|
|||||||
# Bossa is the default programmer
|
# Bossa is the default programmer
|
||||||
PROGRAMMER ?= bossa
|
PROGRAMMER ?= bossa
|
||||||
|
|
||||||
|
# Add bossa as supported programmers. Boards that support more programmers
|
||||||
|
# should declare them in their own Makefile.include
|
||||||
|
PROGRAMMERS_SUPPORTED += bossa
|
||||||
|
|
||||||
ifeq ($(PROGRAMMER),bossa)
|
ifeq ($(PROGRAMMER),bossa)
|
||||||
# by default, we use BOSSA to flash this board and take into account the
|
# by default, we use BOSSA to flash this board and take into account the
|
||||||
# preinstalled Arduino bootloader. ROM_OFFSET skips the space taken by
|
# preinstalled Arduino bootloader. ROM_OFFSET skips the space taken by
|
||||||
|
|||||||
@ -3,5 +3,8 @@ INCLUDES += -I$(RIOTBOARD)/common/silabs/drivers/include
|
|||||||
|
|
||||||
PROGRAMMER ?= jlink
|
PROGRAMMER ?= jlink
|
||||||
|
|
||||||
|
# Silabs boards can use openocd programmer
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
JLINK_DEVICE ?= ${CPU_MODEL}
|
JLINK_DEVICE ?= ${CPU_MODEL}
|
||||||
OPENOCD_CONFIG ?= board/efm32.cfg
|
OPENOCD_CONFIG ?= board/efm32.cfg
|
||||||
|
|||||||
@ -1,2 +1,4 @@
|
|||||||
# this board uses openocd
|
# this board uses openocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -7,3 +7,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
|||||||
|
|
||||||
# this board uses openocd
|
# this board uses openocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -4,6 +4,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|||||||
|
|
||||||
# this board uses openocd with a custom reset command
|
# this board uses openocd with a custom reset command
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
OPENOCD_CMD_RESET_RUN =-c _reset
|
OPENOCD_CMD_RESET_RUN =-c _reset
|
||||||
|
|
||||||
# use our own openocd script to flash since HiFive1 has reset problems.
|
# use our own openocd script to flash since HiFive1 has reset problems.
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
# Set default programmer as jlink
|
# Set default programmer as jlink
|
||||||
PROGRAMMER ?= jlink
|
PROGRAMMER ?= jlink
|
||||||
|
PROGRAMMERS_SUPPORTED += jlink openocd
|
||||||
|
|
||||||
ifeq (openocd,$(PROGRAMMER))
|
ifeq (openocd,$(PROGRAMMER))
|
||||||
OPENOCD_DEBUG_ADAPTER = jlink
|
OPENOCD_DEBUG_ADAPTER = jlink
|
||||||
@ -10,8 +11,6 @@ else ifeq (jlink,$(PROGRAMMER))
|
|||||||
JLINK_DEVICE = FE310
|
JLINK_DEVICE = FE310
|
||||||
JLINK_IF = JTAG
|
JLINK_IF = JTAG
|
||||||
FLASH_ADDR = 0x20010000
|
FLASH_ADDR = 0x20010000
|
||||||
else
|
|
||||||
$(error Programmer '$(PROGRAMMER)' not supported for board '$(BOARD)')
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TESTRUNNER_RESET_DELAY = 1
|
TESTRUNNER_RESET_DELAY = 1
|
||||||
|
|||||||
@ -10,3 +10,5 @@ OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
|||||||
|
|
||||||
# this board uses openocd
|
# this board uses openocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -10,4 +10,7 @@ CFLAGS+=-DSX127X_RX_SWITCH
|
|||||||
|
|
||||||
# this board uses openocd
|
# this board uses openocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|||||||
@ -9,3 +9,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
STLINK_VERSION ?= 2
|
STLINK_VERSION ?= 2
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -14,3 +14,6 @@ PROGRAMMER ?= stm32loader
|
|||||||
STM32LOADER_FLAGS ?= -u -S -l 0x1ff
|
STM32LOADER_FLAGS ?= -u -S -l 0x1ff
|
||||||
|
|
||||||
PYTERMFLAGS += --set-rts 0
|
PYTERMFLAGS += --set-rts 0
|
||||||
|
|
||||||
|
# stm32loader programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += stm32loader
|
||||||
|
|||||||
@ -8,3 +8,6 @@ PROGRAMMER ?= openocd
|
|||||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||||
# By default, flash this board using an ST-link adapter
|
# By default, flash this board using an ST-link adapter
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -4,3 +4,6 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
|||||||
# this board uses openocd with st-link
|
# this board uses openocd with st-link
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
# for this board, flash with OpenOCD by default. PyOCD is also supported.
|
# for this board, flash with OpenOCD by default. PyOCD is also supported.
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += pyocd
|
||||||
|
|
||||||
# The board is not recognized automatically by pyocd, so the CPU target
|
# The board is not recognized automatically by pyocd, so the CPU target
|
||||||
# option is passed explicitly
|
# option is passed explicitly
|
||||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||||
|
|||||||
@ -3,6 +3,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
|
|
||||||
# for this board we support flashing via openocd or pyocd
|
# for this board we support flashing via openocd or pyocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += pyocd
|
||||||
|
|
||||||
OPENOCD_DEBUG_ADAPTER = dap
|
OPENOCD_DEBUG_ADAPTER = dap
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@ endif
|
|||||||
|
|
||||||
# this board uses openocd
|
# this board uses openocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
# Default debug adapter choice is to use the Mulle programmer board
|
# Default debug adapter choice is to use the Mulle programmer board
|
||||||
OPENOCD_DEBUG_ADAPTER ?= mulle
|
OPENOCD_DEBUG_ADAPTER ?= mulle
|
||||||
|
|||||||
@ -8,4 +8,7 @@ PROGRAMMER ?= pyocd
|
|||||||
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
PYOCD_FLASH_TARGET_TYPE ?= -t $(CPU)
|
||||||
OPENOCD_DEBUG_ADAPTER = dap
|
OPENOCD_DEBUG_ADAPTER = dap
|
||||||
|
|
||||||
|
# This board can also be flashed with pyocd
|
||||||
|
PROGRAMMERS_SUPPORTED += pyocd
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
|||||||
@ -16,4 +16,6 @@ ifeq (uf2conv,$(PROGRAMMER))
|
|||||||
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += uf2conv
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
|||||||
@ -8,4 +8,7 @@ PROGRAMMER ?= pyocd
|
|||||||
PYOCD_FLASH_TARGET_TYPE ?= -t nrf52840
|
PYOCD_FLASH_TARGET_TYPE ?= -t nrf52840
|
||||||
OPENOCD_DEBUG_ADAPTER = dap
|
OPENOCD_DEBUG_ADAPTER = dap
|
||||||
|
|
||||||
|
# This board can also be flashed with pyocd
|
||||||
|
PROGRAMMERS_SUPPORTED += pyocd
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
include $(RIOTBOARD)/common/nrf52/Makefile.include
|
||||||
|
|||||||
@ -22,6 +22,8 @@ ifeq (nrfutil,$(PROGRAMMER))
|
|||||||
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += nrfutil
|
||||||
|
|
||||||
%.hex.zip: %.hex
|
%.hex.zip: %.hex
|
||||||
$(call check_cmd,$(FLASHER),Flash program and preparation tool)
|
$(call check_cmd,$(FLASHER),Flash program and preparation tool)
|
||||||
$(FLASHER) pkg generate --hw-version 52 --sd-req 0x00 --application-version 1 --application $< $@
|
$(FLASHER) pkg generate --hw-version 52 --sd-req 0x00 --application-version 1 --application $< $@
|
||||||
|
|||||||
@ -9,3 +9,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
PROGRAMMER ?= dfu-util
|
PROGRAMMER ?= dfu-util
|
||||||
DFU_USB_ID = 0483:df11
|
DFU_USB_ID = 0483:df11
|
||||||
DFU_USE_DFUSE = 1
|
DFU_USE_DFUSE = 1
|
||||||
|
|
||||||
|
# dfu-util programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += dfu-util
|
||||||
|
|||||||
@ -3,6 +3,7 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
|||||||
|
|
||||||
# custom flasher to use with the bootloader
|
# custom flasher to use with the bootloader
|
||||||
PROGRAMMER ?= robotis-loader
|
PROGRAMMER ?= robotis-loader
|
||||||
|
PROGRAMMERS_SUPPORTED += robotis-loader
|
||||||
|
|
||||||
# Skip the space needed by the embedded bootloader
|
# Skip the space needed by the embedded bootloader
|
||||||
ROM_OFFSET ?= 0x3000
|
ROM_OFFSET ?= 0x3000
|
||||||
|
|||||||
@ -4,3 +4,6 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
|||||||
# this board uses openocd with st-link
|
# this board uses openocd with st-link
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# Only openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -13,6 +13,7 @@ endif
|
|||||||
|
|
||||||
# this board uses openocd
|
# this board uses openocd
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|
||||||
# We need special handling of the watchdog if we want to speed up the flash
|
# We need special handling of the watchdog if we want to speed up the flash
|
||||||
# verification by using the MCU to compute the image checksum after flashing.
|
# verification by using the MCU to compute the image checksum after flashing.
|
||||||
|
|||||||
@ -2,6 +2,7 @@ PORT_LINUX ?= /dev/ttyUSB0
|
|||||||
|
|
||||||
# use pic32prog by default to program this board
|
# use pic32prog by default to program this board
|
||||||
PROGRAMMER ?= pic32prog
|
PROGRAMMER ?= pic32prog
|
||||||
|
PROGRAMMERS_SUPPORTED += pic32prog jlink
|
||||||
|
|
||||||
ifeq ($(PROGRAMMER),pic32prog)
|
ifeq ($(PROGRAMMER),pic32prog)
|
||||||
# pic32prog
|
# pic32prog
|
||||||
|
|||||||
@ -7,5 +7,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
|
|
||||||
# this board is flashed using DFU
|
# this board is flashed using DFU
|
||||||
PROGRAMMER ?= dfu-util
|
PROGRAMMER ?= dfu-util
|
||||||
|
PROGRAMMERS_SUPPORTED += dfu-util
|
||||||
DFU_USB_ID = 1d50:607f
|
DFU_USB_ID = 1d50:607f
|
||||||
DFU_USE_DFUSE = 1
|
DFU_USE_DFUSE = 1
|
||||||
|
|||||||
@ -7,3 +7,6 @@ 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))
|
||||||
|
|||||||
@ -4,6 +4,7 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
|
|
||||||
# this board uses openocd with an HEXFILE
|
# this board uses openocd with an HEXFILE
|
||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
FLASHFILE ?= $(HEXFILE)
|
FLASHFILE ?= $(HEXFILE)
|
||||||
OPENOCD_DEBUG_ADAPTER ?= dap
|
OPENOCD_DEBUG_ADAPTER ?= dap
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
# by default, we use BOSSA to flash this board to take into account the
|
# by default, we use BOSSA to flash this board to take into account the
|
||||||
# pre-flashed Arduino bootloader
|
# pre-flashed Arduino bootloader
|
||||||
PROGRAMMER ?= bossa
|
PROGRAMMER ?= bossa
|
||||||
|
PROGRAMMERS_SUPPORTED += bossa
|
||||||
|
|
||||||
# setup the flash tool used
|
# setup the flash tool used
|
||||||
ifeq ($(PROGRAMMER),jlink)
|
ifeq ($(PROGRAMMER),jlink)
|
||||||
|
|||||||
@ -12,3 +12,5 @@ ROM_OFFSET ?= 0x5000
|
|||||||
PROGRAMMER ?= dfu-util
|
PROGRAMMER ?= dfu-util
|
||||||
DFU_USB_ID = 1d50:607f
|
DFU_USB_ID = 1d50:607f
|
||||||
DFU_USE_DFUSE = 1
|
DFU_USE_DFUSE = 1
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += dfu-util
|
||||||
|
|||||||
@ -9,3 +9,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
STLINK_VERSION ?= 2
|
STLINK_VERSION ?= 2
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -13,3 +13,6 @@ STLINK_VERSION ?= 2
|
|||||||
# The board can become un-flashable after some execution,
|
# The board can become un-flashable after some execution,
|
||||||
# use connect_assert_srst to always be able to flash or reset the board.
|
# use connect_assert_srst to always be able to flash or reset the board.
|
||||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -5,3 +5,6 @@ INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
|||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
# this board has an on-board ST-link adapter
|
# this board has an on-board ST-link adapter
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -12,3 +12,6 @@ STLINK_VERSION ?= 2
|
|||||||
|
|
||||||
# Tell renode on which UART stdio is available
|
# Tell renode on which UART stdio is available
|
||||||
RENODE_SYSBUS_UART ?= sysbus.uart2
|
RENODE_SYSBUS_UART ?= sysbus.uart2
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -6,3 +6,6 @@ PROGRAMMER ?= openocd
|
|||||||
|
|
||||||
# this board has an on-board ST-link adapter
|
# this board has an on-board ST-link adapter
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -6,3 +6,6 @@ PROGRAMMER ?= openocd
|
|||||||
|
|
||||||
# this board has an on-board ST-link adapter
|
# this board has an on-board ST-link adapter
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -9,3 +9,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -8,3 +8,6 @@ OPENOCD_DEBUG_ADAPTER ?= stlink
|
|||||||
# This board can become un-flashable after a hardfault,
|
# This board can become un-flashable after a hardfault,
|
||||||
# use connect_assert_srst to always be able to flash or reset the board.
|
# use connect_assert_srst to always be able to flash or reset the board.
|
||||||
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -7,3 +7,5 @@ BAUD ?= 9600
|
|||||||
# flash tool configuration
|
# flash tool configuration
|
||||||
PROGRAMMER ?= goodfet
|
PROGRAMMER ?= goodfet
|
||||||
GOODFET_FLAGS ?= --telosb
|
GOODFET_FLAGS ?= --telosb
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += goodfet
|
||||||
|
|||||||
@ -7,3 +7,6 @@ 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))
|
||||||
|
|||||||
@ -6,3 +6,6 @@ PROGRAMMER ?= openocd
|
|||||||
|
|
||||||
OPENOCD_DEBUG_ADAPTER ?= stlink
|
OPENOCD_DEBUG_ADAPTER ?= stlink
|
||||||
STLINK_VERSION ?= 2-1
|
STLINK_VERSION ?= 2-1
|
||||||
|
|
||||||
|
# openocd programmer is supported
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd
|
||||||
|
|||||||
@ -5,3 +5,5 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
|||||||
# setup flash tool
|
# setup flash tool
|
||||||
PROGRAMMER ?= goodfet
|
PROGRAMMER ?= goodfet
|
||||||
GOODFET_FLAGS ?= --z1
|
GOODFET_FLAGS ?= --z1
|
||||||
|
|
||||||
|
PROGRAMMERS_SUPPORTED += goodfet
|
||||||
|
|||||||
@ -83,3 +83,6 @@ SLOT0_LEN ?= $(shell printf "0x%x" $$((($(ROM_LEN:%K=%*1024)-$(RIOTBOOT_LEN)) /
|
|||||||
SLOT1_LEN ?= $(SLOT0_LEN)
|
SLOT1_LEN ?= $(SLOT0_LEN)
|
||||||
SLOT0_LEN := $(SLOT0_LEN)
|
SLOT0_LEN := $(SLOT0_LEN)
|
||||||
SLOT1_LEN := $(SLOT1_LEN)
|
SLOT1_LEN := $(SLOT1_LEN)
|
||||||
|
|
||||||
|
# JLink is able to flash any ARM CPUs
|
||||||
|
PROGRAMMERS_SUPPORTED += jlink
|
||||||
|
|||||||
@ -96,3 +96,6 @@ endif
|
|||||||
|
|
||||||
# All ESP are flashed using esptool
|
# All ESP are flashed using esptool
|
||||||
PROGRAMMER ?= esptool
|
PROGRAMMER ?= esptool
|
||||||
|
|
||||||
|
# Add esptool in the list supported programmers
|
||||||
|
PROGRAMMERS_SUPPORTED += esptool
|
||||||
|
|||||||
@ -18,6 +18,9 @@ endif
|
|||||||
# Default for these boards is to use a CMSIS-DAP programmer
|
# Default for these boards is to use a CMSIS-DAP programmer
|
||||||
OPENOCD_DEBUG_ADAPTER ?= dap
|
OPENOCD_DEBUG_ADAPTER ?= dap
|
||||||
|
|
||||||
|
# Increase the list of supported programmers
|
||||||
|
PROGRAMMERS_SUPPORTED += openocd edbg
|
||||||
|
|
||||||
# If no programmer is set, select a default programmer
|
# If no programmer is set, select a default programmer
|
||||||
ifeq ($(PROGRAMMER),)
|
ifeq ($(PROGRAMMER),)
|
||||||
# EDBG can only be used with a compatible Atmel programmer
|
# EDBG can only be used with a compatible Atmel programmer
|
||||||
|
|||||||
@ -1,10 +1,5 @@
|
|||||||
PROGRAMMER ?= openocd
|
PROGRAMMER ?= openocd
|
||||||
|
PROGRAMMERS_SUPPORTED += bmp dfu-util openocd stm32flash
|
||||||
PROGRAMMERS_SUPPORTED := bmp dfu-util openocd stm32flash jlink
|
|
||||||
|
|
||||||
ifeq (,$(filter $(PROGRAMMER), $(PROGRAMMERS_SUPPORTED)))
|
|
||||||
$(error Programmer $(PROGRAMMER) not supported)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (bmp,$(PROGRAMMER))
|
ifeq (bmp,$(PROGRAMMER))
|
||||||
# On Blackmagic Probe, the first ACM is used to connect to the gdb server,
|
# On Blackmagic Probe, the first ACM is used to connect to the gdb server,
|
||||||
|
|||||||
@ -3,7 +3,9 @@
|
|||||||
info-features-provided info-features-required \
|
info-features-provided info-features-required \
|
||||||
info-features-used \
|
info-features-used \
|
||||||
info-debug-variable-% info-toolchains-supported \
|
info-debug-variable-% info-toolchains-supported \
|
||||||
check-toolchain-supported
|
check-toolchain-supported \
|
||||||
|
info-programmers-supported \
|
||||||
|
#
|
||||||
|
|
||||||
info-objsize:
|
info-objsize:
|
||||||
@case "$(SORTROW)" in \
|
@case "$(SORTROW)" in \
|
||||||
@ -224,3 +226,6 @@ info-toolchains-supported:
|
|||||||
|
|
||||||
check-toolchain-supported:
|
check-toolchain-supported:
|
||||||
@exit $(if $(filter $(TOOLCHAIN),$(filter-out $(TOOLCHAINS_BLACKLIST),$(TOOLCHAINS_SUPPORTED))),0,1)
|
@exit $(if $(filter $(TOOLCHAIN),$(filter-out $(TOOLCHAINS_BLACKLIST),$(TOOLCHAINS_SUPPORTED))),0,1)
|
||||||
|
|
||||||
|
info-programmers-supported:
|
||||||
|
@echo $(sort $(PROGRAMMERS_SUPPORTED))
|
||||||
|
|||||||
@ -105,6 +105,8 @@ export HEXFILE # The 'intel hex' stripped result of the compilatio
|
|||||||
# DEBUGSERVER_FLAGS # The parameters to supply to DEBUGSERVER.
|
# DEBUGSERVER_FLAGS # The parameters to supply to DEBUGSERVER.
|
||||||
# RESET # The command to call on "make reset", this command resets/reboots the target.
|
# RESET # The command to call on "make reset", this command resets/reboots the target.
|
||||||
# RESET_FLAGS # The parameters to supply to RESET.
|
# RESET_FLAGS # The parameters to supply to RESET.
|
||||||
|
# PROGRAMMER # The programmer to use when flashing, resetting or debugging
|
||||||
|
# PROGRAMMERS_SUPPORTED # The list of programmers supported by a board
|
||||||
|
|
||||||
export DLCACHE # directory used to cache http downloads
|
export DLCACHE # directory used to cache http downloads
|
||||||
export DOWNLOAD_TO_FILE # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL)` to download `$(URL)` to `$(DESTINATION)`.
|
export DOWNLOAD_TO_FILE # Use `$(DOWNLOAD_TO_FILE) $(DESTINATION) $(URL)` to download `$(URL)` to `$(DESTINATION)`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user