From 0fd649de676dca7249ce837c43c19c4f0fcb36c2 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 1 May 2024 18:57:38 +0200 Subject: [PATCH] boards/mulle: fix OpenOCD config - use JTAG instead of SWD to restore old behavior - replace deprecated configuration names with new ones --- boards/mulle/Makefile.include | 1 + .../dist/openocd/mulle-programmer-0.60.cfg | 14 +++++++------- .../dist/openocd/mulle-programmer-0.70.cfg | 18 +++++++++--------- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/boards/mulle/Makefile.include b/boards/mulle/Makefile.include index e880c5cf8c..7d2b3383c2 100644 --- a/boards/mulle/Makefile.include +++ b/boards/mulle/Makefile.include @@ -6,6 +6,7 @@ endif # this board uses openocd PROGRAMMER ?= openocd PROGRAMMERS_SUPPORTED += openocd +OPENOCD_TRANSPORT := jtag # Default debug adapter choice is to use the Mulle programmer board OPENOCD_DEBUG_ADAPTER ?= mulle diff --git a/boards/mulle/dist/openocd/mulle-programmer-0.60.cfg b/boards/mulle/dist/openocd/mulle-programmer-0.60.cfg index 172bb8c5f2..7e418b0c86 100644 --- a/boards/mulle/dist/openocd/mulle-programmer-0.60.cfg +++ b/boards/mulle/dist/openocd/mulle-programmer-0.60.cfg @@ -6,23 +6,23 @@ # # Reduce this if you are having problems with losing connection to the Mulle -adapter_khz 1000 +adapter speed 1000 # JTAG interface configuration -interface ftdi +adapter driver ftdi ftdi_device_desc "Mulle Programmer v0.60" ftdi_vid_pid 0x0403 0x6010 -ftdi_channel 1 -ftdi_layout_init 0x0008 0x005b +ftdi channel 1 +ftdi layout_init 0x0008 0x005b # These are the pins that are used for SRST and TRST. Note that the Mulle # programming board inverts the reset signal between the FTDI chip and the MCU, # so we need to use -ndata here to tell OpenOCD that the signals are active HIGH. -ftdi_layout_signal nTRST -ndata 0x0010 -ftdi_layout_signal nSRST -ndata 0x0040 +ftdi layout_signal nTRST -ndata 0x0010 +ftdi layout_signal nSRST -ndata 0x0040 # In the eyes of OpenOCD, the reset signal is push-pull, because of the hardware # design however, it is actually open drain. -reset_config srst_push_pull +reset_config srst_push_pull srst_gates_jtag diff --git a/boards/mulle/dist/openocd/mulle-programmer-0.70.cfg b/boards/mulle/dist/openocd/mulle-programmer-0.70.cfg index f0c2b2c6b7..761244fb55 100644 --- a/boards/mulle/dist/openocd/mulle-programmer-0.70.cfg +++ b/boards/mulle/dist/openocd/mulle-programmer-0.70.cfg @@ -6,22 +6,22 @@ # # Reduce this if you are having problems with losing connection to the Mulle -adapter_khz 1000 +adapter speed 1000 # JTAG interface configuration -interface ftdi -ftdi_device_desc "Mulle Programmer v0.70" -ftdi_vid_pid 0x0403 0x6010 +adapter driver ftdi +ftdi device_desc "Mulle Programmer v0.70" +ftdi vid_pid 0x0403 0x6010 -ftdi_channel 1 -ftdi_layout_init 0x0008 0x005b +ftdi channel 1 +ftdi layout_init 0x0008 0x005b # These are the pins that are used for SRST and TRST. Active low on programmer # boards v0.70 and up (used to be active high on v0.60) -ftdi_layout_signal nTRST -data 0x0010 -ftdi_layout_signal nSRST -data 0x0040 +ftdi layout_signal nTRST -data 0x0010 +ftdi layout_signal nSRST -data 0x0040 # In the eyes of OpenOCD, the reset signal is push-pull, because of the hardware # design however, it is actually open drain. -reset_config srst_push_pull +reset_config srst_push_pull srst_gates_jtag