diff --git a/makefiles/tools/openocd-adapters/buspirate.inc.mk b/makefiles/tools/openocd-adapters/buspirate.inc.mk new file mode 100644 index 0000000000..5f8135f7f8 --- /dev/null +++ b/makefiles/tools/openocd-adapters/buspirate.inc.mk @@ -0,0 +1,14 @@ +# Bus Pirate debug adapter +# +# For SWD mode connect: +# MOSI - SWDIO +# CLK - SWCLK + +ifeq ($(OS),Darwin) + PROG_DEV ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) +else + PROG_DEV ?= /dev/ttyUSB0 +endif + +OPENOCD_ADAPTER_INIT ?= -c 'source [find interface/buspirate.cfg]' \ + -c 'buspirate_port $(PROG_DEV)'