aboutsummaryrefslogtreecommitdiff
path: root/tcl
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2021-08-30 15:03:59 -0700
committerTim Newsome <tim@sifive.com>2021-08-30 15:03:59 -0700
commita1146731a8a26207815b7540d2a26c52d67514c1 (patch)
tree3e31558613f44bb910c3245b8e60886414e6a22b /tcl
parent13cfec45ccca35b3eb59631162147688c0127f8e (diff)
parent9a9e9e2c666dcb4987421f89d3b09ff9951cb0a1 (diff)
downloadriscv-openocd-a1146731a8a26207815b7540d2a26c52d67514c1.zip
riscv-openocd-a1146731a8a26207815b7540d2a26c52d67514c1.tar.gz
riscv-openocd-a1146731a8a26207815b7540d2a26c52d67514c1.tar.bz2
Merge branch 'master' into from_upstream
Conflicts: src/flash/nor/fespi.c src/jtag/drivers/ftdi.c src/rtos/FreeRTOS.c src/rtos/hwthread.c src/rtos/rtos.c src/rtos/rtos.h src/rtos/rtos_ecos_stackings.c src/rtos/rtos_embkernel_stackings.c src/rtos/rtos_standard_stackings.c src/rtos/rtos_standard_stackings.h src/rtos/rtos_ucos_iii_stackings.c src/server/gdb_server.c src/server/server.c src/target/riscv/riscv-013.c src/target/target.c src/target/target.h Change-Id: If0924a3e799260c33fae5feb85975b1273b45a0f
Diffstat (limited to 'tcl')
-rw-r--r--tcl/board/altera_sockit.cfg4
-rw-r--r--tcl/board/digilent_analog_discovery.cfg6
-rw-r--r--tcl/board/digilent_nexys_video.cfg10
-rw-r--r--tcl/board/dp_busblaster_v3.cfg2
-rw-r--r--tcl/board/dp_busblaster_v4.cfg2
-rw-r--r--tcl/board/gumstix-aerocore.cfg6
-rw-r--r--tcl/board/kasli.cfg8
-rw-r--r--tcl/board/kindle2.cfg2
-rw-r--r--tcl/board/lambdaconcept_ecpix-5.cfg27
-rw-r--r--tcl/board/microchip_sama5d27_som1_kit1.cfg19
-rw-r--r--tcl/board/nds32_corvettef1.cfg10
-rw-r--r--tcl/board/novena-internal-fpga.cfg2
-rw-r--r--tcl/board/numato_mimas_a7.cfg10
-rw-r--r--tcl/board/quark_d2000_refboard.cfg8
-rw-r--r--tcl/board/radiona_ulx3s.cfg27
-rw-r--r--tcl/board/reflexces_achilles_i-dev_kit_arria10.cfg2
-rw-r--r--tcl/board/rpi3.cfg13
-rw-r--r--tcl/board/rpi4b.cfg13
-rw-r--r--tcl/board/sayma_amc.cfg14
-rw-r--r--tcl/board/sifive-e31arty.cfg4
-rw-r--r--tcl/board/sifive-e51arty.cfg4
-rw-r--r--tcl/board/sifive-hifive1.cfg14
-rw-r--r--tcl/board/ti_tmdx570ls20susb.cfg2
-rw-r--r--tcl/fpga/lattice_ecp5.cfg28
-rw-r--r--tcl/interface/altera-usb-blaster.cfg6
-rw-r--r--tcl/interface/altera-usb-blaster2.cfg6
-rw-r--r--tcl/interface/buspirate.cfg10
-rw-r--r--tcl/interface/chameleon.cfg2
-rw-r--r--tcl/interface/dln-2-gpiod.cfg12
-rw-r--r--tcl/interface/flashlink.cfg4
-rw-r--r--tcl/interface/ft232r/radiona_ulx3s.cfg16
-rw-r--r--tcl/interface/ftdi/100ask-openjtag.cfg10
-rwxr-xr-xtcl/interface/ftdi/ashling-opella-ld-jtag.cfg20
-rwxr-xr-xtcl/interface/ftdi/ashling-opella-ld-swd.cfg19
-rw-r--r--tcl/interface/ftdi/axm0432.cfg10
-rw-r--r--tcl/interface/ftdi/c232hm.cfg18
-rw-r--r--tcl/interface/ftdi/calao-usb-a9260-c01.cfg10
-rw-r--r--tcl/interface/ftdi/calao-usb-a9260-c02.cfg10
-rw-r--r--tcl/interface/ftdi/cortino.cfg10
-rw-r--r--tcl/interface/ftdi/digilent-hs1.cfg8
-rw-r--r--tcl/interface/ftdi/digilent-hs2.cfg8
-rw-r--r--tcl/interface/ftdi/digilent_jtag_hs3.cfg8
-rw-r--r--tcl/interface/ftdi/digilent_jtag_smt2.cfg12
-rw-r--r--tcl/interface/ftdi/digilent_jtag_smt2_nc.cfg10
-rw-r--r--tcl/interface/ftdi/dlp-usb1232h.cfg10
-rw-r--r--tcl/interface/ftdi/dp_busblaster.cfg10
-rw-r--r--tcl/interface/ftdi/dp_busblaster_kt-link.cfg16
-rw-r--r--tcl/interface/ftdi/flossjtag-noeeprom.cfg10
-rw-r--r--tcl/interface/ftdi/flossjtag.cfg16
-rw-r--r--tcl/interface/ftdi/flyswatter.cfg14
-rw-r--r--tcl/interface/ftdi/flyswatter2.cfg14
-rw-r--r--tcl/interface/ftdi/ft232h-module-swd.cfg16
-rw-r--r--tcl/interface/ftdi/gw16042.cfg10
-rw-r--r--tcl/interface/ftdi/hie-jtag.cfg14
-rw-r--r--tcl/interface/ftdi/hilscher_nxhx10_etm.cfg10
-rw-r--r--tcl/interface/ftdi/hilscher_nxhx500_etm.cfg10
-rw-r--r--tcl/interface/ftdi/hilscher_nxhx500_re.cfg10
-rw-r--r--tcl/interface/ftdi/hilscher_nxhx50_etm.cfg10
-rw-r--r--tcl/interface/ftdi/hilscher_nxhx50_re.cfg10
-rw-r--r--tcl/interface/ftdi/hitex_lpc1768stick.cfg10
-rw-r--r--tcl/interface/ftdi/hitex_str9-comstick.cfg10
-rw-r--r--tcl/interface/ftdi/icebear.cfg10
-rw-r--r--tcl/interface/ftdi/imx8mp-evk.cfg22
-rw-r--r--tcl/interface/ftdi/incircuit-icprog.cfg8
-rw-r--r--tcl/interface/ftdi/iotlab-usb.cfg8
-rw-r--r--tcl/interface/ftdi/isodebug.cfg20
-rw-r--r--tcl/interface/ftdi/jtag-lock-pick_tiny_2.cfg16
-rw-r--r--tcl/interface/ftdi/jtagkey.cfg10
-rw-r--r--tcl/interface/ftdi/jtagkey2.cfg10
-rw-r--r--tcl/interface/ftdi/jtagkey2p.cfg10
-rw-r--r--tcl/interface/ftdi/kt-link.cfg16
-rw-r--r--tcl/interface/ftdi/lambdaconcept_ecpix-5.cfg14
-rw-r--r--tcl/interface/ftdi/lisa-l.cfg14
-rw-r--r--tcl/interface/ftdi/luminary-icdi.cfg12
-rw-r--r--tcl/interface/ftdi/luminary-lm3s811.cfg12
-rw-r--r--tcl/interface/ftdi/luminary.cfg12
-rw-r--r--tcl/interface/ftdi/m53evk.cfg12
-rw-r--r--tcl/interface/ftdi/mbftdi.cfg6
-rw-r--r--tcl/interface/ftdi/minimodule-swd.cfg20
-rw-r--r--tcl/interface/ftdi/minimodule.cfg8
-rw-r--r--tcl/interface/ftdi/minispartan6.cfg8
-rw-r--r--tcl/interface/ftdi/miniwiggler.cfg12
-rw-r--r--tcl/interface/ftdi/neodb.cfg12
-rw-r--r--tcl/interface/ftdi/ngxtech.cfg10
-rw-r--r--tcl/interface/ftdi/olimex-arm-jtag-swd.cfg4
-rw-r--r--tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg12
-rw-r--r--tcl/interface/ftdi/olimex-arm-usb-ocd.cfg12
-rw-r--r--tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg12
-rw-r--r--tcl/interface/ftdi/olimex-jtag-tiny.cfg12
-rw-r--r--tcl/interface/ftdi/oocdlink.cfg10
-rw-r--r--tcl/interface/ftdi/opendous_ftdi.cfg12
-rw-r--r--tcl/interface/ftdi/openocd-usb-hs.cfg10
-rw-r--r--tcl/interface/ftdi/openocd-usb.cfg10
-rw-r--r--tcl/interface/ftdi/openrd.cfg12
-rw-r--r--tcl/interface/ftdi/pipistrello.cfg8
-rw-r--r--tcl/interface/ftdi/pls_spc5.cfg12
-rw-r--r--tcl/interface/ftdi/redbee-econotag.cfg8
-rw-r--r--tcl/interface/ftdi/redbee-usb.cfg10
-rw-r--r--tcl/interface/ftdi/rowley-cc-arm-swd.cfg4
-rw-r--r--tcl/interface/ftdi/sheevaplug.cfg12
-rw-r--r--tcl/interface/ftdi/signalyzer-lite.cfg10
-rw-r--r--tcl/interface/ftdi/signalyzer.cfg10
-rw-r--r--tcl/interface/ftdi/snps_sdp.cfg6
-rw-r--r--tcl/interface/ftdi/steppenprobe.cfg20
-rw-r--r--tcl/interface/ftdi/stm32-stick.cfg10
-rw-r--r--tcl/interface/ftdi/swd-resistor-hack.cfg2
-rw-r--r--tcl/interface/ftdi/ti-icdi.cfg10
-rw-r--r--tcl/interface/ftdi/tumpa-lite.cfg8
-rw-r--r--tcl/interface/ftdi/tumpa.cfg8
-rw-r--r--tcl/interface/ftdi/turtelizer2-revB.cfg10
-rw-r--r--tcl/interface/ftdi/turtelizer2-revC.cfg12
-rw-r--r--tcl/interface/ftdi/um232h.cfg10
-rw-r--r--tcl/interface/ftdi/vpaclink.cfg10
-rw-r--r--tcl/interface/ftdi/xds100v2.cfg20
-rw-r--r--tcl/interface/ftdi/xds100v3.cfg2
-rw-r--r--tcl/interface/jtag_dpi.cfg4
-rw-r--r--tcl/interface/jtag_hat_rpi2.cfg38
-rw-r--r--tcl/interface/jtag_vpi.cfg4
-rw-r--r--tcl/interface/openjtag.cfg2
-rw-r--r--tcl/interface/parport.cfg4
-rw-r--r--tcl/interface/parport_dlc5.cfg4
-rw-r--r--tcl/interface/raspberrypi-native.cfg14
-rw-r--r--tcl/interface/raspberrypi2-native.cfg14
-rw-r--r--tcl/interface/sysfsgpio-raspberrypi.cfg8
-rw-r--r--tcl/interface/usb-jtag.cfg6
-rw-r--r--tcl/target/at91sama5d2.cfg28
-rw-r--r--tcl/target/stm32l5x.cfg93
-rw-r--r--tcl/target/stm32u5x.cfg207
-rw-r--r--tcl/target/stm32wlx.cfg143
129 files changed, 1215 insertions, 590 deletions
diff --git a/tcl/board/altera_sockit.cfg b/tcl/board/altera_sockit.cfg
index b7c7993..4d10aef 100644
--- a/tcl/board/altera_sockit.cfg
+++ b/tcl/board/altera_sockit.cfg
@@ -12,7 +12,7 @@ adapter driver usb_blaster
source [find target/altera_fpgasoc.cfg]
# If the USB Blaster II were supported, these settings would be needed
-#usb_blaster_vid_pid 0x09fb 0x6810
-#usb_blaster_device_desc "USB-Blaster II"
+#usb_blaster vid_pid 0x09fb 0x6810
+#usb_blaster device_desc "USB-Blaster II"
adapter speed 100
diff --git a/tcl/board/digilent_analog_discovery.cfg b/tcl/board/digilent_analog_discovery.cfg
index 954e540..64cdacf 100644
--- a/tcl/board/digilent_analog_discovery.cfg
+++ b/tcl/board/digilent_analog_discovery.cfg
@@ -8,10 +8,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Digilent USB Device"
-ftdi_vid_pid 0x0403 0x6014
+ftdi device_desc "Digilent USB Device"
+ftdi vid_pid 0x0403 0x6014
-ftdi_layout_init 0x8008 0x800b
+ftdi layout_init 0x8008 0x800b
adapter speed 25000
diff --git a/tcl/board/digilent_nexys_video.cfg b/tcl/board/digilent_nexys_video.cfg
index f171e24..b60ec91 100644
--- a/tcl/board/digilent_nexys_video.cfg
+++ b/tcl/board/digilent_nexys_video.cfg
@@ -6,19 +6,19 @@
adapter driver ftdi
adapter speed 30000
-ftdi_device_desc "Digilent USB Device"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Digilent USB Device"
+ftdi vid_pid 0x0403 0x6010
# channel 0 is dedicated for Digilent's DPTI Interface
# channel 1 is used for JTAG
-ftdi_channel 1
+ftdi channel 1
# just TCK TDI TDO TMS, no reset
-ftdi_layout_init 0x0088 0x008b
+ftdi layout_init 0x0088 0x008b
reset_config none
# Enable sampling on falling edge for high JTAG speeds.
-ftdi_tdo_sample_edge falling
+ftdi tdo_sample_edge falling
transport select jtag
diff --git a/tcl/board/dp_busblaster_v3.cfg b/tcl/board/dp_busblaster_v3.cfg
index a9974d9..b94b43a 100644
--- a/tcl/board/dp_busblaster_v3.cfg
+++ b/tcl/board/dp_busblaster_v3.cfg
@@ -8,6 +8,6 @@
#
source [find interface/ftdi/dp_busblaster.cfg]
-ftdi_channel 1
+ftdi channel 1
jtag newtap xc2c32a tap -expected-id 0x06e1c093 -irlen 8
diff --git a/tcl/board/dp_busblaster_v4.cfg b/tcl/board/dp_busblaster_v4.cfg
index 7b3bee8..2c2f0e9 100644
--- a/tcl/board/dp_busblaster_v4.cfg
+++ b/tcl/board/dp_busblaster_v4.cfg
@@ -14,6 +14,6 @@
#
source [find interface/ftdi/dp_busblaster.cfg]
-ftdi_channel 1
+ftdi channel 1
jtag newtap xc2c64a tap -expected-id 0x06e5c093 -irlen 8
diff --git a/tcl/board/gumstix-aerocore.cfg b/tcl/board/gumstix-aerocore.cfg
index f0103ed..565df4c 100644
--- a/tcl/board/gumstix-aerocore.cfg
+++ b/tcl/board/gumstix-aerocore.cfg
@@ -1,10 +1,10 @@
# JTAG for the STM32F4x chip used on the Gumstix AeroCore is available on
# the first interface of a Quad FTDI chip. nTRST is bit 4.
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6011
+ftdi vid_pid 0x0403 0x6011
-ftdi_layout_init 0x0000 0x001b
-ftdi_layout_signal nTRST -data 0x0010
+ftdi layout_init 0x0000 0x001b
+ftdi layout_signal nTRST -data 0x0010
source [find target/stm32f4x.cfg]
reset_config trst_only
diff --git a/tcl/board/kasli.cfg b/tcl/board/kasli.cfg
index d492249..7cfdcf2 100644
--- a/tcl/board/kasli.cfg
+++ b/tcl/board/kasli.cfg
@@ -1,8 +1,8 @@
adapter driver ftdi
-ftdi_device_desc "Quad RS232-HS"
-ftdi_vid_pid 0x0403 0x6011
-ftdi_channel 0
-ftdi_layout_init 0x0008 0x000b
+ftdi device_desc "Quad RS232-HS"
+ftdi vid_pid 0x0403 0x6011
+ftdi channel 0
+ftdi layout_init 0x0008 0x000b
# adapter usb location 1:8
reset_config none
diff --git a/tcl/board/kindle2.cfg b/tcl/board/kindle2.cfg
index a39f15c..71dca74 100644
--- a/tcl/board/kindle2.cfg
+++ b/tcl/board/kindle2.cfg
@@ -37,7 +37,7 @@ jtag_ntrst_delay 30
arm11 memwrite burst disable
adapter speed 1000
-ftdi_tdo_sample_edge falling
+ftdi tdo_sample_edge falling
proc kindle2_init {} {
imx3x_reset
diff --git a/tcl/board/lambdaconcept_ecpix-5.cfg b/tcl/board/lambdaconcept_ecpix-5.cfg
new file mode 100644
index 0000000..19b9c1c
--- /dev/null
+++ b/tcl/board/lambdaconcept_ecpix-5.cfg
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# LambdaConcept ECPIX-5
+# http://docs.lambdaconcept.com/ecpix-5/
+# Currently there are following board variants:
+# ECPIX-5 45F - LFE5UM5G-45F
+# ECPIX-5 85F - LFE5UM5G-85F
+#
+# This boards have two JTAG interfaces:
+# - CN4, micro USB port connected to FT2232HQ chip:
+# ADBUS0 TCK
+# ADBUS1 TDI
+# ADBUS2 TDO
+# ADBUS3 TMS
+# BDBUS0 UART_TXD
+# BDBUS1 UART_RXD
+# This interface should be used with following config:
+# interface/ftdi/lambdaconcept_ecpix-5.cfg
+# - CN3, 6 pin connector
+# See schematics for more details:
+# http://docs.lambdaconcept.com/ecpix-5/_static/resources/SCH_ECPIX-5_R02.PDF
+#
+# No reset lines are implemented. So it is not possible to remote reset the FPGA
+# by using any of this interfaces
+
+source [find interface/ftdi/lambdaconcept_ecpix-5.cfg]
+source [find fpga/lattice_ecp5.cfg]
diff --git a/tcl/board/microchip_sama5d27_som1_kit1.cfg b/tcl/board/microchip_sama5d27_som1_kit1.cfg
new file mode 100644
index 0000000..8e92040
--- /dev/null
+++ b/tcl/board/microchip_sama5d27_som1_kit1.cfg
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Microchip SAMA5D27-SOM1-EK1
+# https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ATSAMA5D27-SOM1-EK1
+# This board provide two jtag interfaces:
+# J11 - 10 pin interface
+# J10 - USB interface connected to the J-Link-OB.
+# This functionality is implemented with an ATSAM3U4C microcontroller and
+# provides JTAG functions and a bridge USB/Serial debug port (CDC).
+#
+# Jumper J7 disables the J-Link-OB-ATSAM3U4C JTAG functionality.
+# - Jumper J7 not installed: J-Link-OB-ATSAM3U4C is enabled and fully functional.
+# - Jumper J7 installed: J-Link-OB-ATSAM3U4C is disabled and an external JTAG
+# controller can be used through the 10-pin JTAG port J11.
+
+source [find interface/jlink.cfg]
+reset_config srst_only
+
+source [find target/at91sama5d2.cfg]
diff --git a/tcl/board/nds32_corvettef1.cfg b/tcl/board/nds32_corvettef1.cfg
index cec1723..7300ce0 100644
--- a/tcl/board/nds32_corvettef1.cfg
+++ b/tcl/board/nds32_corvettef1.cfg
@@ -7,12 +7,12 @@
adapter speed 10000
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
reset_config srst_only
source [find target/nds32v5.cfg]
diff --git a/tcl/board/novena-internal-fpga.cfg b/tcl/board/novena-internal-fpga.cfg
index 0e9ff5b..7805862 100644
--- a/tcl/board/novena-internal-fpga.cfg
+++ b/tcl/board/novena-internal-fpga.cfg
@@ -19,6 +19,6 @@ adapter driver sysfsgpio
transport select jtag
# TCK TMS TDI TDO
-sysfsgpio_jtag_nums 136 139 137 138
+sysfsgpio jtag_nums 136 139 137 138
source [find cpld/xilinx-xc6s.cfg]
diff --git a/tcl/board/numato_mimas_a7.cfg b/tcl/board/numato_mimas_a7.cfg
index d4012ba..12df891 100644
--- a/tcl/board/numato_mimas_a7.cfg
+++ b/tcl/board/numato_mimas_a7.cfg
@@ -8,13 +8,13 @@
# Therefore, prefer external power supply.
adapter driver ftdi
-ftdi_device_desc "Mimas Artix 7 FPGA Module"
-ftdi_vid_pid 0x2a19 0x1009
+ftdi device_desc "Mimas Artix 7 FPGA Module"
+ftdi vid_pid 0x2a19 0x1009
# channel 0 is for custom purpose by users (like uart, fifo etc)
# channel 1 is reserved for JTAG (by-default) or SPI (possible via changing solder jumpers)
-ftdi_channel 1
-ftdi_tdo_sample_edge falling
+ftdi channel 1
+ftdi tdo_sample_edge falling
# FTDI Pin Layout
@@ -28,7 +28,7 @@ ftdi_tdo_sample_edge falling
# OE_N is JTAG buffer output enable signal (active-low)
# PROG_B is not used, so left as input to FTDI.
#
-ftdi_layout_init 0x0008 0x004b
+ftdi layout_init 0x0008 0x004b
reset_config none
adapter speed 30000
diff --git a/tcl/board/quark_d2000_refboard.cfg b/tcl/board/quark_d2000_refboard.cfg
index 8b8314a..a89895d 100644
--- a/tcl/board/quark_d2000_refboard.cfg
+++ b/tcl/board/quark_d2000_refboard.cfg
@@ -2,11 +2,11 @@
# the board has an onboard FTDI FT232H chip
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6014
-ftdi_channel 0
+ftdi vid_pid 0x0403 0x6014
+ftdi channel 0
-ftdi_layout_init 0x0000 0x030b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0100
+ftdi layout_init 0x0000 0x030b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0100
source [find target/quark_d20xx.cfg]
diff --git a/tcl/board/radiona_ulx3s.cfg b/tcl/board/radiona_ulx3s.cfg
new file mode 100644
index 0000000..eb9b027
--- /dev/null
+++ b/tcl/board/radiona_ulx3s.cfg
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Radiona ULX3S
+# https://radiona.org/ulx3s/
+# Currently there are following board variants:
+# CS-ULX3S-01 - LFE5U 12F
+# CS-ULX3S-02 - LFE5U 45F
+# CS-ULX3S-03 - LFE5U 85F
+#
+# two JTAG interfaces:
+# - US1, micro USB port connected to FT231XQ
+# This interface should be used with following config:
+# interface/ft232r/radiona_ulx3s.cfg
+# - J4, 6 pin connector
+#
+# Both of this interfaces share the JTAG lines (TDI, TMS, TCK, TDO) between
+# Lattice ECP5 FPGA chip and ESP32 WiFi controller.
+# Note: TRST_N of the ESP32 is pulled up by default and can be pulled down over
+# J3 interface.
+# See schematics for more information:
+# https://github.com/emard/ulx3s/blob/master/doc/schematics_v308.pdf
+# https://github.com/emard/ulx3s/blob/master/doc/schematics_v314.pdf
+# https://github.com/emard/ulx3s/blob/master/doc/schematics_v315.pdf
+# https://github.com/emard/ulx3s/blob/master/doc/schematics_v316.pdf
+
+source [find interface/ft232r/radiona_ulx3s.cfg]
+source [find fpga/lattice_ecp5.cfg]
diff --git a/tcl/board/reflexces_achilles_i-dev_kit_arria10.cfg b/tcl/board/reflexces_achilles_i-dev_kit_arria10.cfg
index a6e8065..c9f8d36 100644
--- a/tcl/board/reflexces_achilles_i-dev_kit_arria10.cfg
+++ b/tcl/board/reflexces_achilles_i-dev_kit_arria10.cfg
@@ -6,7 +6,7 @@ if { [info exists USE_EXTERNAL_DEBUGGER] } {
echo "Using external debugger"
} else {
source [find interface/altera-usb-blaster2.cfg]
- usb_blaster_device_desc "Arria10 IDK"
+ usb_blaster device_desc "Arria10 IDK"
}
source [find fpga/altera-10m50.cfg]
diff --git a/tcl/board/rpi3.cfg b/tcl/board/rpi3.cfg
new file mode 100644
index 0000000..fd93a9d
--- /dev/null
+++ b/tcl/board/rpi3.cfg
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# This is the Raspberry Pi 3 board with BCM2837 chip
+# https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2837/README.md
+#
+# Enable JTAG GPIO on Raspberry Pi boards
+# https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md
+
+source [find target/bcm2837.cfg]
+transport select jtag
+
+# Raspberry Pi boards only expose Test Reset (TRST) pin, no System Reset (SRST)
+reset_config trst_only
diff --git a/tcl/board/rpi4b.cfg b/tcl/board/rpi4b.cfg
new file mode 100644
index 0000000..5b046af
--- /dev/null
+++ b/tcl/board/rpi4b.cfg
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# This is the Raspberry Pi 4 model B board with BCM2711 chip
+# https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/README.md
+#
+# Enable JTAG GPIO on Raspberry Pi boards
+# https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md
+
+source [find target/bcm2711.cfg]
+transport select jtag
+
+# Raspberry Pi boards only expose Test Reset (TRST) pin, no System Reset (SRST)
+reset_config trst_only
diff --git a/tcl/board/sayma_amc.cfg b/tcl/board/sayma_amc.cfg
index 64c0854..0bd76ba 100644
--- a/tcl/board/sayma_amc.cfg
+++ b/tcl/board/sayma_amc.cfg
@@ -11,19 +11,19 @@
# which features an Artix 7 FPGA.
adapter driver ftdi
-ftdi_device_desc "Quad RS232-HS"
-ftdi_vid_pid 0x0403 0x6011
-ftdi_channel 0
+ftdi device_desc "Quad RS232-HS"
+ftdi vid_pid 0x0403 0x6011
+ftdi channel 0
# Use this to distinguish multiple boards by topology
#adapter usb location 5:1
# sampling on falling edge generally seems to work and accelerates things but
# is not fully tested
-#ftdi_tdo_sample_edge falling
+#ftdi tdo_sample_edge falling
# EN_USB_JTAG on ADBUS7: out, high
# USB_nTRST on ADBUS4: out, high, but R46 is DNP
-ftdi_layout_init 0x0098 0x008b
-#ftdi_layout_signal EN_USB -data 0x0080
-#ftdi_layout_signal nTRST -data 0x0010
+ftdi layout_init 0x0098 0x008b
+#ftdi layout_signal EN_USB -data 0x0080
+#ftdi layout_signal nTRST -data 0x0010
reset_config none
adapter speed 5000
diff --git a/tcl/board/sifive-e31arty.cfg b/tcl/board/sifive-e31arty.cfg
index b7a255e..8e701f1 100644
--- a/tcl/board/sifive-e31arty.cfg
+++ b/tcl/board/sifive-e31arty.cfg
@@ -14,8 +14,8 @@ $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-
flash bank spi0 fespi 0x40000000 0 0 0 $_TARGETNAME.0 0x20004000
init
if {[ info exists pulse_srst]} {
- ftdi_set_signal nSRST 0
- ftdi_set_signal nSRST z
+ ftdi set_signal nSRST 0
+ ftdi set_signal nSRST z
}
halt
flash protect 0 64 last off
diff --git a/tcl/board/sifive-e51arty.cfg b/tcl/board/sifive-e51arty.cfg
index 20ad575..a543987 100644
--- a/tcl/board/sifive-e51arty.cfg
+++ b/tcl/board/sifive-e51arty.cfg
@@ -14,8 +14,8 @@ $_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 10000 -work-
flash bank spi0 fespi 0x40000000 0 0 0 $_TARGETNAME.0 0x20004000
init
if {[ info exists pulse_srst]} {
- ftdi_set_signal nSRST 0
- ftdi_set_signal nSRST z
+ ftdi set_signal nSRST 0
+ ftdi set_signal nSRST z
}
halt
flash protect 0 64 last off
diff --git a/tcl/board/sifive-hifive1.cfg b/tcl/board/sifive-hifive1.cfg
index 196f540..c47485b 100644
--- a/tcl/board/sifive-hifive1.cfg
+++ b/tcl/board/sifive-hifive1.cfg
@@ -1,15 +1,15 @@
adapter speed 10000
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0008 0x001b
-ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020
+ftdi layout_init 0x0008 0x001b
+ftdi layout_signal nSRST -oe 0x0020 -data 0x0020
#Reset Stretcher logic on FE310 is ~1 second long
#This doesn't apply if you use
-# ftdi_set_signal, but still good to document
+# ftdi set_signal, but still good to document
#adapter srst delay 1500
set _CHIPNAME riscv
@@ -23,8 +23,8 @@ flash bank onboard_spi_flash fespi 0x20000000 0 0 0 $_TARGETNAME
init
#reset -- This type of reset is not implemented yet
if {[ info exists pulse_srst]} {
- ftdi_set_signal nSRST 0
- ftdi_set_signal nSRST z
+ ftdi set_signal nSRST 0
+ ftdi set_signal nSRST z
#Wait for the reset stretcher
#It will work without this, but
#will incur lots of delays for later commands.
diff --git a/tcl/board/ti_tmdx570ls20susb.cfg b/tcl/board/ti_tmdx570ls20susb.cfg
index 87cab26..e71136c 100644
--- a/tcl/board/ti_tmdx570ls20susb.cfg
+++ b/tcl/board/ti_tmdx570ls20susb.cfg
@@ -12,5 +12,5 @@ reset_config trst_only
# xds100v2 config says add this to the end
init
-ftdi_set_signal PWR_RST 1
+ftdi set_signal PWR_RST 1
jtag arp_init
diff --git a/tcl/fpga/lattice_ecp5.cfg b/tcl/fpga/lattice_ecp5.cfg
new file mode 100644
index 0000000..a94ada7
--- /dev/null
+++ b/tcl/fpga/lattice_ecp5.cfg
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $_CHIPNAME
+} else {
+ set _CHIPNAME ecp5
+}
+
+# Lattice ECP5 family
+# TAP IDs are extracted from BSDL files found on this page:
+# https://www.latticesemi.com/Products/FPGAandCPLD/ECP5
+#
+# 0x01111043 - LAE5UM_25F/LFE5UM_25F
+# 0x01112043 - LAE5UM_45F/LFE5UM_45F
+# 0x01113043 - LAE5UM_85F/LFE5UM_85
+# 0x21111043 - LFE5U_12F
+# 0x41111043 - LFE5U_25F
+# 0x41112043 - LFE5U_45F
+# 0x41113043 - LFE5U_85F
+# 0x81111043 - LFE5UM5G-25
+# 0x81112043 - LFE5UM5G-45
+# 0x81113043 - LFE5UM5G-85
+
+jtag newtap $_CHIPNAME tap -irlen 8 -irmask 0x83 -ircapture 0x1 \
+ -expected-id 0x01111043 -expected-id 0x01112043 -expected-id 0x01113043 \
+ -expected-id 0x21111043 -expected-id 0x41111043 -expected-id 0x41112043 \
+ -expected-id 0x41113043 -expected-id 0x81111043 -expected-id 0x81112043 \
+ -expected-id 0x81113043
diff --git a/tcl/interface/altera-usb-blaster.cfg b/tcl/interface/altera-usb-blaster.cfg
index 84e77b1..cb4ca9a 100644
--- a/tcl/interface/altera-usb-blaster.cfg
+++ b/tcl/interface/altera-usb-blaster.cfg
@@ -5,7 +5,7 @@
#
adapter driver usb_blaster
-usb_blaster_lowlevel_driver ftdi
+usb_blaster lowlevel_driver ftdi
# These are already the defaults.
-# usb_blaster_vid_pid 0x09FB 0x6001
-# usb_blaster_device_desc "USB-Blaster"
+# usb_blaster vid_pid 0x09FB 0x6001
+# usb_blaster device_desc "USB-Blaster"
diff --git a/tcl/interface/altera-usb-blaster2.cfg b/tcl/interface/altera-usb-blaster2.cfg
index 4642b1d..05b0519 100644
--- a/tcl/interface/altera-usb-blaster2.cfg
+++ b/tcl/interface/altera-usb-blaster2.cfg
@@ -3,6 +3,6 @@
#
adapter driver usb_blaster
-usb_blaster_vid_pid 0x09fb 0x6010 0x09fb 0x6810
-usb_blaster_lowlevel_driver ublast2
-usb_blaster_firmware /path/to/quartus/blaster_6810.hex
+usb_blaster vid_pid 0x09fb 0x6010 0x09fb 0x6810
+usb_blaster lowlevel_driver ublast2
+usb_blaster firmware /path/to/quartus/blaster_6810.hex
diff --git a/tcl/interface/buspirate.cfg b/tcl/interface/buspirate.cfg
index 265e37e..20761d1 100644
--- a/tcl/interface/buspirate.cfg
+++ b/tcl/interface/buspirate.cfg
@@ -7,19 +7,19 @@
adapter driver buspirate
# you need to specify port on which BP lives
-#buspirate_port /dev/ttyUSB0
+#buspirate port /dev/ttyUSB0
# communication speed setting
-buspirate_speed normal ;# or fast
+buspirate speed normal ;# or fast
# voltage regulator Enabled = 1 Disabled = 0
-#buspirate_vreg 0
+#buspirate vreg 0
# pin mode normal or open-drain (jtag only)
-#buspirate_mode normal
+#buspirate mode normal
# pullup state Enabled = 1 Disabled = 0
-#buspirate_pullup 0
+#buspirate pullup 0
# this depends on the cable, you are safe with this option
reset_config srst_only
diff --git a/tcl/interface/chameleon.cfg b/tcl/interface/chameleon.cfg
index 1cb1d61..97bf98d 100644
--- a/tcl/interface/chameleon.cfg
+++ b/tcl/interface/chameleon.cfg
@@ -5,4 +5,4 @@
#
adapter driver parport
-parport_cable chameleon
+parport cable chameleon
diff --git a/tcl/interface/dln-2-gpiod.cfg b/tcl/interface/dln-2-gpiod.cfg
index 5407a24..cd6061f 100644
--- a/tcl/interface/dln-2-gpiod.cfg
+++ b/tcl/interface/dln-2-gpiod.cfg
@@ -17,11 +17,11 @@
adapter driver linuxgpiod
-linuxgpiod_gpiochip 0
-linuxgpiod_jtag_nums 2 3 4 1
-linuxgpiod_trst_num 5
-linuxgpiod_swd_nums 2 3
-linuxgpiod_srst_num 0
-linuxgpiod_led_num 6
+linuxgpiod gpiochip 0
+linuxgpiod jtag_nums 2 3 4 1
+linuxgpiod trst_num 5
+linuxgpiod swd_nums 2 3
+linuxgpiod srst_num 0
+linuxgpiod led_num 6
reset_config trst_and_srst separate srst_push_pull
diff --git a/tcl/interface/flashlink.cfg b/tcl/interface/flashlink.cfg
index e0a4b97..b7ec0bb 100644
--- a/tcl/interface/flashlink.cfg
+++ b/tcl/interface/flashlink.cfg
@@ -12,5 +12,5 @@ if { [info exists PARPORTADDR] } {
}
adapter driver parport
-parport_port $_PARPORTADDR
-parport_cable flashlink
+parport port $_PARPORTADDR
+parport cable flashlink
diff --git a/tcl/interface/ft232r/radiona_ulx3s.cfg b/tcl/interface/ft232r/radiona_ulx3s.cfg
new file mode 100644
index 0000000..424777e
--- /dev/null
+++ b/tcl/interface/ft232r/radiona_ulx3s.cfg
@@ -0,0 +1,16 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# This adapter is integrated in to Radiona ULX3S board:
+# board/radiona_ulx3s.cfg
+# See schematics for the ft232r layout:
+# https://github.com/emard/ulx3s/blob/master/doc/schematics_v316.pdf
+
+adapter driver ft232r
+adapter speed 1000
+ft232r_vid_pid 0x0403 0x6015
+ft232r_tck_num DSR
+ft232r_tms_num DCD
+ft232r_tdi_num RI
+ft232r_tdo_num CTS
+ft232r_trst_num RTS
+ft232r_srst_num DTR
diff --git a/tcl/interface/ftdi/100ask-openjtag.cfg b/tcl/interface/ftdi/100ask-openjtag.cfg
index 3cbd37e..a12df97 100644
--- a/tcl/interface/ftdi/100ask-openjtag.cfg
+++ b/tcl/interface/ftdi/100ask-openjtag.cfg
@@ -8,9 +8,9 @@
#
adapter driver ftdi
-ftdi_device_desc "USB<=>JTAG&RS232"
-ftdi_vid_pid 0x1457 0x5118
+ftdi device_desc "USB<=>JTAG&RS232"
+ftdi vid_pid 0x1457 0x5118
-ftdi_layout_init 0x0f08 0x0f1b
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_init 0x0f08 0x0f1b
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
diff --git a/tcl/interface/ftdi/ashling-opella-ld-jtag.cfg b/tcl/interface/ftdi/ashling-opella-ld-jtag.cfg
new file mode 100755
index 0000000..6256aa0
--- /dev/null
+++ b/tcl/interface/ftdi/ashling-opella-ld-jtag.cfg
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Ashling Opella-LD
+#
+# https://www.ashling.com/Opella-LD/
+#
+
+adapter driver ftdi
+ftdi device_desc "Opella-LD Debug Probe"
+ftdi vid_pid 0x0B6B 0x0040
+ftdi tdo_sample_edge falling
+ftdi layout_init 0x0A68 0xFF7B
+ftdi channel 0
+ftdi layout_signal JTAGOE -ndata 0x0010
+ftdi layout_signal nTRST -data 0x0020
+ftdi layout_signal nSRST -data 0x0040
+ftdi layout_signal SWD_EN -data 0x0100
+ftdi layout_signal SWDIO_OE -data 0x0200
+ftdi layout_signal LED -ndata 0x0800
+transport select jtag
diff --git a/tcl/interface/ftdi/ashling-opella-ld-swd.cfg b/tcl/interface/ftdi/ashling-opella-ld-swd.cfg
new file mode 100755
index 0000000..4a4e4e0
--- /dev/null
+++ b/tcl/interface/ftdi/ashling-opella-ld-swd.cfg
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Ashling Opella-LD
+#
+# https://www.ashling.com/Opella-LD/
+#
+
+adapter driver ftdi
+ftdi device_desc "Opella-LD Debug Probe"
+ftdi vid_pid 0x0B6B 0x0040
+ftdi layout_init 0x0860 0x0b7b
+ftdi channel 0
+ftdi layout_signal JTAGOE -data 0x0010
+ftdi layout_signal nTRST -data 0x0020
+ftdi layout_signal nSRST -data 0x0040
+ftdi layout_signal SWD_EN -data 0x0100
+ftdi layout_signal SWDIO_OE -data 0x0200
+ftdi layout_signal LED -ndata 0x0800
+transport select swd
diff --git a/tcl/interface/ftdi/axm0432.cfg b/tcl/interface/ftdi/axm0432.cfg
index 6cc1752..84b77a6 100644
--- a/tcl/interface/ftdi/axm0432.cfg
+++ b/tcl/interface/ftdi/axm0432.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "Symphony SoundBite"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Symphony SoundBite"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0c08 0x0c2b
-ftdi_layout_signal nTRST -data 0x0800
-ftdi_layout_signal nSRST -data 0x0400
+ftdi layout_init 0x0c08 0x0c2b
+ftdi layout_signal nTRST -data 0x0800
+ftdi layout_signal nSRST -data 0x0400
diff --git a/tcl/interface/ftdi/c232hm.cfg b/tcl/interface/ftdi/c232hm.cfg
index 27cf766..25fcae1 100644
--- a/tcl/interface/ftdi/c232hm.cfg
+++ b/tcl/interface/ftdi/c232hm.cfg
@@ -14,18 +14,18 @@
# http://www.ftdichip.com/Support/Documents/AppNotes/AN_129_FTDI_Hi_Speed_USB_To_JTAG_Example.pdf
adapter driver ftdi
-#ftdi_device_desc "C232HM-DDHSL-0"
-#ftdi_device_desc "C232HM-EDHSL-0"
+#ftdi device_desc "C232HM-DDHSL-0"
+#ftdi device_desc "C232HM-EDHSL-0"
# Common PID for FT232H
-ftdi_vid_pid 0x0403 0x6014
+ftdi vid_pid 0x0403 0x6014
# Layout
# High data byte 0x40 configures red LED on ACBUS6 initially high (unlit, since active-low)
# Low data byte 0x08 configures TMS on ACBUS3 initially high (asserted); TCK, TDI low
# High direction byte 0x40 configures red LED on ACBUS6 as high (output)
# Low direction byte 0x0b configures TDO on ACBUS2 as low (input)
-ftdi_layout_init 0x4008 0x400b
+ftdi layout_init 0x4008 0x400b
# ---A*BUS-------CCCCCCCC|DDDDDDDD
# --------\______76543210|76543210
@@ -35,12 +35,12 @@ ftdi_layout_init 0x4008 0x400b
#GPIOL2 0x0040 = 00000000|01000000 = ADBUS6
#GPIOL3 0x0080 = 00000000|10000000 = ADBUS7
# -ndata treats the LED as active-low for expected behavior (toggle when transferring)
-ftdi_layout_signal LED -ndata 0x4000
+ftdi layout_signal LED -ndata 0x4000
# Available for aliasing as desired
-ftdi_layout_signal GPIOL0 -data 0x0010 -oe 0x0010
-ftdi_layout_signal GPIOL1 -data 0x0020 -oe 0x0020
-ftdi_layout_signal GPIOL2 -data 0x0040 -oe 0x0040
-ftdi_layout_signal GPIOL3 -data 0x0080 -oe 0x0080
+ftdi layout_signal GPIOL0 -data 0x0010 -oe 0x0010
+ftdi layout_signal GPIOL1 -data 0x0020 -oe 0x0020
+ftdi layout_signal GPIOL2 -data 0x0040 -oe 0x0040
+ftdi layout_signal GPIOL3 -data 0x0080 -oe 0x0080
# C232HM FT232H JTAG/Other
# Num Color Name Func
diff --git a/tcl/interface/ftdi/calao-usb-a9260-c01.cfg b/tcl/interface/ftdi/calao-usb-a9260-c01.cfg
index a23ddbf..41e5973 100644
--- a/tcl/interface/ftdi/calao-usb-a9260-c01.cfg
+++ b/tcl/interface/ftdi/calao-usb-a9260-c01.cfg
@@ -11,12 +11,12 @@ echo "experience with this file to openocd-devel mailing list, so it could be ma
echo "as working or fixed."
adapter driver ftdi
-ftdi_device_desc "USB-A9260"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "USB-A9260"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
script interface/calao-usb-a9260.cfg
script target/at91sam9260minimal.cfg
diff --git a/tcl/interface/ftdi/calao-usb-a9260-c02.cfg b/tcl/interface/ftdi/calao-usb-a9260-c02.cfg
index 67427c5..001aef5 100644
--- a/tcl/interface/ftdi/calao-usb-a9260-c02.cfg
+++ b/tcl/interface/ftdi/calao-usb-a9260-c02.cfg
@@ -11,12 +11,12 @@ echo "experience with this file to openocd-devel mailing list, so it could be ma
echo "as working or fixed."
adapter driver ftdi
-ftdi_device_desc "USB-A9260"
-ftdi_vid_pid 0x0403 0x6001
+ftdi device_desc "USB-A9260"
+ftdi vid_pid 0x0403 0x6001
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
script interface/calao-usb-a9260.cfg
script target/at91sam9260minimal.cfg
diff --git a/tcl/interface/ftdi/cortino.cfg b/tcl/interface/ftdi/cortino.cfg
index 2bc516c..c0eae31 100644
--- a/tcl/interface/ftdi/cortino.cfg
+++ b/tcl/interface/ftdi/cortino.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "Cortino"
-ftdi_vid_pid 0x0640 0x0032
+ftdi device_desc "Cortino"
+ftdi vid_pid 0x0640 0x0032
-ftdi_layout_init 0x0108 0x010b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0200 -oe 0x0200
+ftdi layout_init 0x0108 0x010b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0200 -oe 0x0200
diff --git a/tcl/interface/ftdi/digilent-hs1.cfg b/tcl/interface/ftdi/digilent-hs1.cfg
index dfba339..55391b9 100644
--- a/tcl/interface/ftdi/digilent-hs1.cfg
+++ b/tcl/interface/ftdi/digilent-hs1.cfg
@@ -2,10 +2,10 @@
# (the later being the OEM on-board version)
adapter driver ftdi
-ftdi_device_desc "Digilent Adept USB Device"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Digilent Adept USB Device"
+ftdi vid_pid 0x0403 0x6010
# channel 1 does not have any functionality
-ftdi_channel 0
+ftdi channel 0
# just TCK TDI TDO TMS, no reset
-ftdi_layout_init 0x0088 0x008b
+ftdi layout_init 0x0088 0x008b
reset_config none
diff --git a/tcl/interface/ftdi/digilent-hs2.cfg b/tcl/interface/ftdi/digilent-hs2.cfg
index ae6ba01..269eca0 100644
--- a/tcl/interface/ftdi/digilent-hs2.cfg
+++ b/tcl/interface/ftdi/digilent-hs2.cfg
@@ -1,10 +1,10 @@
# this supports JTAG-HS2 (and apparently Nexys4 as well)
adapter driver ftdi
-ftdi_device_desc "Digilent Adept USB Device"
-ftdi_vid_pid 0x0403 0x6014
+ftdi device_desc "Digilent Adept USB Device"
+ftdi vid_pid 0x0403 0x6014
-ftdi_channel 0
-ftdi_layout_init 0x00e8 0x60eb
+ftdi channel 0
+ftdi layout_init 0x00e8 0x60eb
reset_config none
diff --git a/tcl/interface/ftdi/digilent_jtag_hs3.cfg b/tcl/interface/ftdi/digilent_jtag_hs3.cfg
index 7160bed..ca2807f 100644
--- a/tcl/interface/ftdi/digilent_jtag_hs3.cfg
+++ b/tcl/interface/ftdi/digilent_jtag_hs3.cfg
@@ -3,11 +3,11 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6014
-ftdi_device_desc "Digilent USB Device"
+ftdi vid_pid 0x0403 0x6014
+ftdi device_desc "Digilent USB Device"
# From Digilent support:
# The SRST pin is [...] 0x20 and 0x10 is the /OE (active low output enable)
-ftdi_layout_init 0x2088 0x308b
-ftdi_layout_signal nSRST -data 0x2000 -noe 0x1000
+ftdi layout_init 0x2088 0x308b
+ftdi layout_signal nSRST -data 0x2000 -noe 0x1000
diff --git a/tcl/interface/ftdi/digilent_jtag_smt2.cfg b/tcl/interface/ftdi/digilent_jtag_smt2.cfg
index 493ed6a..f4ba27b 100644
--- a/tcl/interface/ftdi/digilent_jtag_smt2.cfg
+++ b/tcl/interface/ftdi/digilent_jtag_smt2.cfg
@@ -8,10 +8,10 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6014
+ftdi vid_pid 0x0403 0x6014
-ftdi_layout_init 0x2088 0x3f8b
-ftdi_layout_signal nSRST -data 0x2000
-ftdi_layout_signal GPIO2 -data 0x2000
-ftdi_layout_signal GPIO1 -data 0x0200
-ftdi_layout_signal GPIO0 -data 0x0100
+ftdi layout_init 0x20e8 0x3feb
+ftdi layout_signal nSRST -data 0x2000
+ftdi layout_signal GPIO2 -data 0x2000
+ftdi layout_signal GPIO1 -data 0x0200
+ftdi layout_signal GPIO0 -data 0x0100
diff --git a/tcl/interface/ftdi/digilent_jtag_smt2_nc.cfg b/tcl/interface/ftdi/digilent_jtag_smt2_nc.cfg
index bc783a4..a143cd7 100644
--- a/tcl/interface/ftdi/digilent_jtag_smt2_nc.cfg
+++ b/tcl/interface/ftdi/digilent_jtag_smt2_nc.cfg
@@ -8,11 +8,11 @@
# https://www.xilinx.com/products/boards-and-kits/kcu105.html#documentation
#
# Note that the digilent_jtag_smt2 layout does not work and hangs while
-# the ftdi_device_desc from digilent_hs2 is wrong.
+# the ftdi device_desc from digilent_hs2 is wrong.
adapter driver ftdi
-ftdi_device_desc "Digilent USB Device"
-ftdi_vid_pid 0x0403 0x6014
-ftdi_channel 0
-ftdi_layout_init 0x00e8 0x60eb
+ftdi device_desc "Digilent USB Device"
+ftdi vid_pid 0x0403 0x6014
+ftdi channel 0
+ftdi layout_init 0x00e8 0x60eb
reset_config none
diff --git a/tcl/interface/ftdi/dlp-usb1232h.cfg b/tcl/interface/ftdi/dlp-usb1232h.cfg
index 9ddc2c8..e9651dd 100644
--- a/tcl/interface/ftdi/dlp-usb1232h.cfg
+++ b/tcl/interface/ftdi/dlp-usb1232h.cfg
@@ -13,9 +13,9 @@ echo "in ft2232.c. Please report your experience with this file to openocd-devel
echo "mailing list, so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0008 0x000b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0040 -oe 0x0040
+ftdi layout_init 0x0008 0x000b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0040 -oe 0x0040
diff --git a/tcl/interface/ftdi/dp_busblaster.cfg b/tcl/interface/ftdi/dp_busblaster.cfg
index 86ab4d8..420f788 100644
--- a/tcl/interface/ftdi/dp_busblaster.cfg
+++ b/tcl/interface/ftdi/dp_busblaster.cfg
@@ -12,9 +12,9 @@ echo "Info : If you need SWD support, flash KT-Link buffer from https://github.c
and use dp_busblaster_kt-link.cfg instead"
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
diff --git a/tcl/interface/ftdi/dp_busblaster_kt-link.cfg b/tcl/interface/ftdi/dp_busblaster_kt-link.cfg
index d49a4c9..4924d26 100644
--- a/tcl/interface/ftdi/dp_busblaster_kt-link.cfg
+++ b/tcl/interface/ftdi/dp_busblaster_kt-link.cfg
@@ -10,12 +10,12 @@
#
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x8c28 0xff3b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
-ftdi_layout_signal LED -ndata 0x8000
-ftdi_layout_signal SWD_EN -ndata 0x0020 -oe 0x2000
-ftdi_layout_signal SWDIO_OE -ndata 0x1000
+ftdi layout_init 0x8c28 0xff3b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_signal LED -ndata 0x8000
+ftdi layout_signal SWD_EN -ndata 0x0020 -oe 0x2000
+ftdi layout_signal SWDIO_OE -ndata 0x1000
diff --git a/tcl/interface/ftdi/flossjtag-noeeprom.cfg b/tcl/interface/ftdi/flossjtag-noeeprom.cfg
index 42ed18e..7083e63 100644
--- a/tcl/interface/ftdi/flossjtag-noeeprom.cfg
+++ b/tcl/interface/ftdi/flossjtag-noeeprom.cfg
@@ -18,9 +18,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0008 0x000b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0040 -oe 0x0040
+ftdi layout_init 0x0008 0x000b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0040 -oe 0x0040
diff --git a/tcl/interface/ftdi/flossjtag.cfg b/tcl/interface/ftdi/flossjtag.cfg
index c4ad81d..2e3cfca 100644
--- a/tcl/interface/ftdi/flossjtag.cfg
+++ b/tcl/interface/ftdi/flossjtag.cfg
@@ -18,12 +18,12 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
-ftdi_device_desc "FLOSS-JTAG"
-#ftdi_serial "FJ000001"
+ftdi vid_pid 0x0403 0x6010
+ftdi device_desc "FLOSS-JTAG"
+#ftdi serial "FJ000001"
-ftdi_layout_init 0x0008 0x180b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0040 -oe 0x0040
-ftdi_layout_signal LED -data 0x0800
-ftdi_layout_signal LED2 -data 0x1000
+ftdi layout_init 0x0008 0x180b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0040 -oe 0x0040
+ftdi layout_signal LED -data 0x0800
+ftdi layout_signal LED2 -data 0x1000
diff --git a/tcl/interface/ftdi/flyswatter.cfg b/tcl/interface/ftdi/flyswatter.cfg
index 5e9d481..bfa015b 100644
--- a/tcl/interface/ftdi/flyswatter.cfg
+++ b/tcl/interface/ftdi/flyswatter.cfg
@@ -1,14 +1,14 @@
#
# TinCanTools Flyswatter
#
-# http://www.tincantools.com/product.php?productid=16134
+# http://web.archive.org/web/20150419072034/http://www.tincantools.com/JTAG/Flyswatter.html
#
adapter driver ftdi
-ftdi_device_desc "Flyswatter"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Flyswatter"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0818 0x0cfb
-ftdi_layout_signal nTRST -data 0x0010
-ftdi_layout_signal nSRST -oe 0x0020
-ftdi_layout_signal LED -data 0x0c00
+ftdi layout_init 0x0818 0x0cfb
+ftdi layout_signal nTRST -data 0x0010
+ftdi layout_signal nSRST -oe 0x0020
+ftdi layout_signal LED -data 0x0c00
diff --git a/tcl/interface/ftdi/flyswatter2.cfg b/tcl/interface/ftdi/flyswatter2.cfg
index 45dd0ba..0b4a8ef 100644
--- a/tcl/interface/ftdi/flyswatter2.cfg
+++ b/tcl/interface/ftdi/flyswatter2.cfg
@@ -1,14 +1,14 @@
#
# TinCanTools Flyswatter2
#
-# http://www.tincantools.com/product.php?productid=16153
+# https://www.tincantools.com/product/flyswatter2/
#
adapter driver ftdi
-ftdi_device_desc "Flyswatter2"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Flyswatter2"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0538 0x057b
-ftdi_layout_signal LED -ndata 0x0400
-ftdi_layout_signal nTRST -data 0x0010
-ftdi_layout_signal nSRST -data 0x0020 -noe 0x0100
+ftdi layout_init 0x0538 0x057b
+ftdi layout_signal LED -ndata 0x0400
+ftdi layout_signal nTRST -data 0x0010
+ftdi layout_signal nSRST -data 0x0020 -noe 0x0100
diff --git a/tcl/interface/ftdi/ft232h-module-swd.cfg b/tcl/interface/ftdi/ft232h-module-swd.cfg
index 98a8c84..7fa4283 100644
--- a/tcl/interface/ftdi/ft232h-module-swd.cfg
+++ b/tcl/interface/ftdi/ft232h-module-swd.cfg
@@ -8,27 +8,27 @@
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6014
+ftdi vid_pid 0x0403 0x6014
# data MSB..LSB direction (1:out) MSB..LSB
# 0000'0000'0011'0000 0000'0000'0011'1011
-ftdi_layout_init 0x0030 0x003b
+ftdi layout_init 0x0030 0x003b
# 0xfff8 0xfffb
# Those signal are only required on some platforms or may required to be
# enabled explicitly (e.g. nrf5x chips).
-ftdi_layout_signal nSRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nTRST -data 0x0020 -oe 0x0020
+ftdi layout_signal nSRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nTRST -data 0x0020 -oe 0x0020
# swd enable
-ftdi_layout_signal SWD_EN -data 0
+ftdi layout_signal SWD_EN -data 0
# tri-state (configure as input) TDO/TIO when reading
-ftdi_layout_signal SWDIO_OE -data 0
+ftdi layout_signal SWDIO_OE -data 0
transport select swd
# re-configure TDO as tri-state
-#ftdi_layout_signal TDO -data 0x0002 -oe 0x0002
-#ftdi_layout_signal TDI -data 0x0004
+#ftdi layout_signal TDO -data 0x0002 -oe 0x0002
+#ftdi layout_signal TDI -data 0x0004
# Adafruit FT232H JTAG SWD
# Name Pin Name Func Func
diff --git a/tcl/interface/ftdi/gw16042.cfg b/tcl/interface/ftdi/gw16042.cfg
index 1288f77..ef31829 100644
--- a/tcl/interface/ftdi/gw16042.cfg
+++ b/tcl/interface/ftdi/gw16042.cfg
@@ -18,9 +18,9 @@
#
adapter driver ftdi
-ftdi_device_desc "USB-JTAG"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "USB-JTAG"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0058 0x007b
-ftdi_layout_signal nTRST -data 0x0010
-ftdi_layout_signal nSRST -oe 0x0020
+ftdi layout_init 0x0058 0x007b
+ftdi layout_signal nTRST -data 0x0010
+ftdi layout_signal nSRST -oe 0x0020
diff --git a/tcl/interface/ftdi/hie-jtag.cfg b/tcl/interface/ftdi/hie-jtag.cfg
index 39af87d..6694df0 100644
--- a/tcl/interface/ftdi/hie-jtag.cfg
+++ b/tcl/interface/ftdi/hie-jtag.cfg
@@ -6,15 +6,15 @@
#
adapter driver ftdi
-ftdi_channel 0
-ftdi_vid_pid 0x0403 0x6014
-ftdi_device_desc "HIE JTAG Debugger"
+ftdi channel 0
+ftdi vid_pid 0x0403 0x6014
+ftdi device_desc "HIE JTAG Debugger"
-ftdi_layout_init 0x0c08 0x4f1b
+ftdi layout_init 0x0c08 0x4f1b
# define both Reset signals
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
# Toggle USB LED
-ftdi_layout_signal LED -ndata 0x4000
+ftdi layout_signal LED -ndata 0x4000
diff --git a/tcl/interface/ftdi/hilscher_nxhx10_etm.cfg b/tcl/interface/ftdi/hilscher_nxhx10_etm.cfg
index 3802f6d..d55f636 100644
--- a/tcl/interface/ftdi/hilscher_nxhx10_etm.cfg
+++ b/tcl/interface/ftdi/hilscher_nxhx10_etm.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "NXHX 10-ETM"
-ftdi_vid_pid 0x0640 0x0028
+ftdi device_desc "NXHX 10-ETM"
+ftdi vid_pid 0x0640 0x0028
-ftdi_layout_init 0x0308 0x030b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0200
+ftdi layout_init 0x0308 0x030b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0200
diff --git a/tcl/interface/ftdi/hilscher_nxhx500_etm.cfg b/tcl/interface/ftdi/hilscher_nxhx500_etm.cfg
index f2e64b4..8c79815 100644
--- a/tcl/interface/ftdi/hilscher_nxhx500_etm.cfg
+++ b/tcl/interface/ftdi/hilscher_nxhx500_etm.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "NXHX 500-ETM"
-ftdi_vid_pid 0x0640 0x0028
+ftdi device_desc "NXHX 500-ETM"
+ftdi vid_pid 0x0640 0x0028
-ftdi_layout_init 0x0308 0x030b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0200
+ftdi layout_init 0x0308 0x030b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0200
diff --git a/tcl/interface/ftdi/hilscher_nxhx500_re.cfg b/tcl/interface/ftdi/hilscher_nxhx500_re.cfg
index 38f3c69..9aa2cd5 100644
--- a/tcl/interface/ftdi/hilscher_nxhx500_re.cfg
+++ b/tcl/interface/ftdi/hilscher_nxhx500_re.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "NXHX 500-RE"
-ftdi_vid_pid 0x0640 0x0028
+ftdi device_desc "NXHX 500-RE"
+ftdi vid_pid 0x0640 0x0028
-ftdi_layout_init 0x0308 0x030b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0200
+ftdi layout_init 0x0308 0x030b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0200
diff --git a/tcl/interface/ftdi/hilscher_nxhx50_etm.cfg b/tcl/interface/ftdi/hilscher_nxhx50_etm.cfg
index bff081f..a64d0e8 100644
--- a/tcl/interface/ftdi/hilscher_nxhx50_etm.cfg
+++ b/tcl/interface/ftdi/hilscher_nxhx50_etm.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "NXHX 50-ETM"
-ftdi_vid_pid 0x0640 0x0028
+ftdi device_desc "NXHX 50-ETM"
+ftdi vid_pid 0x0640 0x0028
-ftdi_layout_init 0x0308 0x030b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0200
+ftdi layout_init 0x0308 0x030b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0200
diff --git a/tcl/interface/ftdi/hilscher_nxhx50_re.cfg b/tcl/interface/ftdi/hilscher_nxhx50_re.cfg
index f9fbd01..2778836 100644
--- a/tcl/interface/ftdi/hilscher_nxhx50_re.cfg
+++ b/tcl/interface/ftdi/hilscher_nxhx50_re.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "NXHX50-RE"
-ftdi_vid_pid 0x0640 0x0028
+ftdi device_desc "NXHX50-RE"
+ftdi vid_pid 0x0640 0x0028
-ftdi_layout_init 0x0308 0x030b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0200
+ftdi layout_init 0x0308 0x030b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0200
diff --git a/tcl/interface/ftdi/hitex_lpc1768stick.cfg b/tcl/interface/ftdi/hitex_lpc1768stick.cfg
index 9fe80f1..87affe8 100644
--- a/tcl/interface/ftdi/hitex_lpc1768stick.cfg
+++ b/tcl/interface/ftdi/hitex_lpc1768stick.cfg
@@ -6,9 +6,9 @@
adapter driver ftdi
-ftdi_device_desc "LPC1768-Stick"
-ftdi_vid_pid 0x0640 0x0026
+ftdi device_desc "LPC1768-Stick"
+ftdi vid_pid 0x0640 0x0026
-ftdi_layout_init 0x0388 0x038b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0080 -noe 0x200
+ftdi layout_init 0x0388 0x038b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0080 -noe 0x200
diff --git a/tcl/interface/ftdi/hitex_str9-comstick.cfg b/tcl/interface/ftdi/hitex_str9-comstick.cfg
index 2b3dc36..6490d65 100644
--- a/tcl/interface/ftdi/hitex_str9-comstick.cfg
+++ b/tcl/interface/ftdi/hitex_str9-comstick.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "STR9-comStick"
-ftdi_vid_pid 0x0640 0x002c
+ftdi device_desc "STR9-comStick"
+ftdi vid_pid 0x0640 0x002c
-ftdi_layout_init 0x0108 0x010b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0200 -oe 0x0200
+ftdi layout_init 0x0108 0x010b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0200 -oe 0x0200
diff --git a/tcl/interface/ftdi/icebear.cfg b/tcl/interface/ftdi/icebear.cfg
index 04c2731..76b2102 100644
--- a/tcl/interface/ftdi/icebear.cfg
+++ b/tcl/interface/ftdi/icebear.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "ICEbear JTAG adapter"
-ftdi_vid_pid 0x0403 0xc140
+ftdi device_desc "ICEbear JTAG adapter"
+ftdi vid_pid 0x0403 0xc140
-ftdi_layout_init 0x0028 0x002b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0020
+ftdi layout_init 0x0028 0x002b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0020
diff --git a/tcl/interface/ftdi/imx8mp-evk.cfg b/tcl/interface/ftdi/imx8mp-evk.cfg
index 4e04e8c..64f3f3d 100644
--- a/tcl/interface/ftdi/imx8mp-evk.cfg
+++ b/tcl/interface/ftdi/imx8mp-evk.cfg
@@ -11,18 +11,18 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6011
-ftdi_channel 0
+ftdi vid_pid 0x0403 0x6011
+ftdi channel 0
-ftdi_layout_init 0x00f8 0x000b
+ftdi layout_init 0x00f8 0x000b
-ftdi_layout_signal RESET_B -data 0x0010 -oe 0x0010
+ftdi layout_signal RESET_B -data 0x0010 -oe 0x0010
# Called SYS_nRST in schematics
-ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
-ftdi_layout_signal IO_nRST -data 0x0040 -oe 0x0040
-ftdi_layout_signal ONOFF_B -data 0x0080 -oe 0x0080
+ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
+ftdi layout_signal IO_nRST -data 0x0040 -oe 0x0040
+ftdi layout_signal ONOFF_B -data 0x0080 -oe 0x0080
-ftdi_layout_signal GPIO1 -data 0x0100 -oe 0x0100
-ftdi_layout_signal GPIO2 -data 0x0200 -oe 0x0200
-ftdi_layout_signal GPIO3 -data 0x0400 -oe 0x0400
-ftdi_layout_signal GPIO4 -data 0x0800 -oe 0x0800
+ftdi layout_signal GPIO1 -data 0x0100 -oe 0x0100
+ftdi layout_signal GPIO2 -data 0x0200 -oe 0x0200
+ftdi layout_signal GPIO3 -data 0x0400 -oe 0x0400
+ftdi layout_signal GPIO4 -data 0x0800 -oe 0x0800
diff --git a/tcl/interface/ftdi/incircuit-icprog.cfg b/tcl/interface/ftdi/incircuit-icprog.cfg
index e0bd5ef..a200954 100644
--- a/tcl/interface/ftdi/incircuit-icprog.cfg
+++ b/tcl/interface/ftdi/incircuit-icprog.cfg
@@ -7,8 +7,8 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0508 0x0f1b
-ftdi_layout_signal nSRST -noe 0x0400 -data 0x0800
-ftdi_layout_signal nTRST -noe 0x0100 -data 0x0200
+ftdi layout_init 0x0508 0x0f1b
+ftdi layout_signal nSRST -noe 0x0400 -data 0x0800
+ftdi layout_signal nTRST -noe 0x0100 -data 0x0200
diff --git a/tcl/interface/ftdi/iotlab-usb.cfg b/tcl/interface/ftdi/iotlab-usb.cfg
index caa0596..92ffa84 100644
--- a/tcl/interface/ftdi/iotlab-usb.cfg
+++ b/tcl/interface/ftdi/iotlab-usb.cfg
@@ -4,8 +4,8 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0008 0x000b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0040 -oe 0x0040
+ftdi layout_init 0x0008 0x000b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0040 -oe 0x0040
diff --git a/tcl/interface/ftdi/isodebug.cfg b/tcl/interface/ftdi/isodebug.cfg
index ead2864..0189989 100644
--- a/tcl/interface/ftdi/isodebug.cfg
+++ b/tcl/interface/ftdi/isodebug.cfg
@@ -2,26 +2,26 @@
# 5 kV isolated JTAG/SWD + UART adapter by Unjo AB
adapter driver ftdi
-ftdi_vid_pid 0x22b7 0x150d
+ftdi vid_pid 0x22b7 0x150d
-ftdi_layout_init 0x0ff8 0xfffb
+ftdi layout_init 0x0ff8 0xfffb
-ftdi_layout_signal LED -ndata 0x0100
-ftdi_layout_signal nTRST -data 0x0200
-ftdi_layout_signal nSRST -noe 0x0400
-ftdi_layout_signal SWDIO_OE -data 0x0008
+ftdi layout_signal LED -ndata 0x0100
+ftdi layout_signal nTRST -data 0x0200
+ftdi layout_signal nSRST -noe 0x0400
+ftdi layout_signal SWDIO_OE -data 0x0008
# Mode signals, either of these needs to be high to drive the JTAG/SWD pins.
# The power-on state is low for both signals but the init setting above sets
# JTAG_EN high.
-ftdi_layout_signal SWD_EN -data 0x1000
-ftdi_layout_signal JTAG_EN -data 0x0800
+ftdi layout_signal SWD_EN -data 0x1000
+ftdi layout_signal JTAG_EN -data 0x0800
# In SWD mode, the JTAG_EN signal doubles as SWO_EN_N which switches the
# second FTDI channel UART RxD to the SWO pin instead of the separate RxD
# pin. Note that the default init state has this pin high so when OpenOCD
# starts in SWD mode, SWO is by default disabled. To enable SWO tracing,
-# issue the command 'ftdi_set_signal SWO_EN 1' where tracing is configured.
+# issue the command 'ftdi set_signal SWO_EN 1' where tracing is configured.
# To switch back to using the separate UART, SWO_EN needs to be disabled
# before exiting OpenOCD, or the adapter replugged.
-ftdi_layout_signal SWO_EN -nalias JTAG_EN
+ftdi layout_signal SWO_EN -nalias JTAG_EN
diff --git a/tcl/interface/ftdi/jtag-lock-pick_tiny_2.cfg b/tcl/interface/ftdi/jtag-lock-pick_tiny_2.cfg
index 82eeaa7..3eefecf 100644
--- a/tcl/interface/ftdi/jtag-lock-pick_tiny_2.cfg
+++ b/tcl/interface/ftdi/jtag-lock-pick_tiny_2.cfg
@@ -5,12 +5,12 @@
#
adapter driver ftdi
-ftdi_device_desc "JTAG-lock-pick Tiny 2"
-ftdi_vid_pid 0x0403 0x8220
+ftdi device_desc "JTAG-lock-pick Tiny 2"
+ftdi vid_pid 0x0403 0x8220
-ftdi_layout_init 0x8c28 0xff3b
-ftdi_layout_signal SWD_EN -ndata 0x0020 -oe 0x2000
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
-ftdi_layout_signal SWDIO_OE -ndata 0x1000
-ftdi_layout_signal LED -ndata 0x8000
+ftdi layout_init 0x8c28 0xff3b
+ftdi layout_signal SWD_EN -ndata 0x0020 -oe 0x2000
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_signal SWDIO_OE -ndata 0x1000
+ftdi layout_signal LED -ndata 0x8000
diff --git a/tcl/interface/ftdi/jtagkey.cfg b/tcl/interface/ftdi/jtagkey.cfg
index 06463ab..511244b 100644
--- a/tcl/interface/ftdi/jtagkey.cfg
+++ b/tcl/interface/ftdi/jtagkey.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "Amontec JTAGkey"
-ftdi_vid_pid 0x0403 0xcff8
+ftdi device_desc "Amontec JTAGkey"
+ftdi vid_pid 0x0403 0xcff8
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
diff --git a/tcl/interface/ftdi/jtagkey2.cfg b/tcl/interface/ftdi/jtagkey2.cfg
index ba151d3..aa33a75 100644
--- a/tcl/interface/ftdi/jtagkey2.cfg
+++ b/tcl/interface/ftdi/jtagkey2.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "Amontec JTAGkey-2"
-ftdi_vid_pid 0x0403 0xcff8
+ftdi device_desc "Amontec JTAGkey-2"
+ftdi vid_pid 0x0403 0xcff8
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
diff --git a/tcl/interface/ftdi/jtagkey2p.cfg b/tcl/interface/ftdi/jtagkey2p.cfg
index acb5047..dbfca66 100644
--- a/tcl/interface/ftdi/jtagkey2p.cfg
+++ b/tcl/interface/ftdi/jtagkey2p.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "Amontec JTAGkey-2P"
-ftdi_vid_pid 0x0403 0xcff8
+ftdi device_desc "Amontec JTAGkey-2P"
+ftdi vid_pid 0x0403 0xcff8
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
diff --git a/tcl/interface/ftdi/kt-link.cfg b/tcl/interface/ftdi/kt-link.cfg
index 5fc5db9..112ecf1 100644
--- a/tcl/interface/ftdi/kt-link.cfg
+++ b/tcl/interface/ftdi/kt-link.cfg
@@ -5,12 +5,12 @@
#
adapter driver ftdi
-ftdi_device_desc "KT-LINK"
-ftdi_vid_pid 0x0403 0xbbe2
+ftdi device_desc "KT-LINK"
+ftdi vid_pid 0x0403 0xbbe2
-ftdi_layout_init 0x8c28 0xff3b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
-ftdi_layout_signal LED -data 0x8000
-ftdi_layout_signal SWD_EN -ndata 0x0020 -oe 0x2000
-ftdi_layout_signal SWDIO_OE -ndata 0x1000
+ftdi layout_init 0x8c28 0xff3b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_signal LED -data 0x8000
+ftdi layout_signal SWD_EN -ndata 0x0020 -oe 0x2000
+ftdi layout_signal SWDIO_OE -ndata 0x1000
diff --git a/tcl/interface/ftdi/lambdaconcept_ecpix-5.cfg b/tcl/interface/ftdi/lambdaconcept_ecpix-5.cfg
new file mode 100644
index 0000000..b61caff
--- /dev/null
+++ b/tcl/interface/ftdi/lambdaconcept_ecpix-5.cfg
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# This adapter is integrated in to LambdaConcept ECPIX-5 board:
+# interface/ftdi/lambdaconcept_ecpix-5.cfg
+# See schematics for the ftdi layout:
+# http://docs.lambdaconcept.com/ecpix-5/_static/resources/SCH_ECPIX-5_R02.PDF
+
+adapter driver ftdi
+adapter speed 10000
+ftdi_device_desc "Dual RS232-HS"
+ftdi_vid_pid 0x0403 0x6010
+
+ftdi_layout_init 0xfff8 0xfffb
+transport select jtag
diff --git a/tcl/interface/ftdi/lisa-l.cfg b/tcl/interface/ftdi/lisa-l.cfg
index 4e52f7b..3da64a0 100644
--- a/tcl/interface/ftdi/lisa-l.cfg
+++ b/tcl/interface/ftdi/lisa-l.cfg
@@ -10,11 +10,11 @@ echo "in ft2232.c. Please report your experience with this file to openocd-devel
echo "mailing list, so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "Lisa/L"
-ftdi_vid_pid 0x0403 0x6010
-ftdi_channel 1
+ftdi device_desc "Lisa/L"
+ftdi vid_pid 0x0403 0x6010
+ftdi channel 1
-ftdi_layout_init 0x0008 0x180b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0040 -oe 0x0040
-ftdi_layout_signal LED -data 0x1800
+ftdi layout_init 0x0008 0x180b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0040 -oe 0x0040
+ftdi layout_signal LED -data 0x1800
diff --git a/tcl/interface/ftdi/luminary-icdi.cfg b/tcl/interface/ftdi/luminary-icdi.cfg
index 8bc783e..08676a3 100644
--- a/tcl/interface/ftdi/luminary-icdi.cfg
+++ b/tcl/interface/ftdi/luminary-icdi.cfg
@@ -16,10 +16,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Luminary Micro ICDI Board"
-ftdi_vid_pid 0x0403 0xbcda
+ftdi device_desc "Luminary Micro ICDI Board"
+ftdi vid_pid 0x0403 0xbcda
-ftdi_layout_init 0x00a8 0x00eb
-ftdi_layout_signal nSRST -noe 0x0020
-ftdi_layout_signal SWD_EN -ndata 0x0080
-ftdi_layout_signal SWDIO_OE -data 0x0008
+ftdi layout_init 0x00a8 0x00eb
+ftdi layout_signal nSRST -noe 0x0020
+ftdi layout_signal SWD_EN -ndata 0x0080
+ftdi layout_signal SWDIO_OE -data 0x0008
diff --git a/tcl/interface/ftdi/luminary-lm3s811.cfg b/tcl/interface/ftdi/luminary-lm3s811.cfg
index aac915e..90f454e 100644
--- a/tcl/interface/ftdi/luminary-lm3s811.cfg
+++ b/tcl/interface/ftdi/luminary-lm3s811.cfg
@@ -12,10 +12,10 @@
#
adapter driver ftdi
-ftdi_device_desc "LM3S811 Evaluation Board"
-ftdi_vid_pid 0x0403 0xbcd9
+ftdi device_desc "LM3S811 Evaluation Board"
+ftdi vid_pid 0x0403 0xbcd9
-ftdi_layout_init 0x0088 0x008b
-ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
-ftdi_layout_signal SWD_EN -ndata 0x0080
-ftdi_layout_signal SWDIO_OE -data 0x0008
+ftdi layout_init 0x0088 0x008b
+ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
+ftdi layout_signal SWD_EN -ndata 0x0080
+ftdi layout_signal SWDIO_OE -data 0x0008
diff --git a/tcl/interface/ftdi/luminary.cfg b/tcl/interface/ftdi/luminary.cfg
index 5e34f8c..3258b21 100644
--- a/tcl/interface/ftdi/luminary.cfg
+++ b/tcl/interface/ftdi/luminary.cfg
@@ -25,10 +25,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Stellaris Evaluation Board"
-ftdi_vid_pid 0x0403 0xbcd9
+ftdi device_desc "Stellaris Evaluation Board"
+ftdi vid_pid 0x0403 0xbcd9
-ftdi_layout_init 0x00a8 0x00eb
-ftdi_layout_signal nSRST -noe 0x0020
-ftdi_layout_signal SWD_EN -ndata 0x0080
-ftdi_layout_signal SWDIO_OE -data 0x0008
+ftdi layout_init 0x00a8 0x00eb
+ftdi layout_signal nSRST -noe 0x0020
+ftdi layout_signal SWD_EN -ndata 0x0080
+ftdi layout_signal SWDIO_OE -data 0x0008
diff --git a/tcl/interface/ftdi/m53evk.cfg b/tcl/interface/ftdi/m53evk.cfg
index 6597f2d..2b7c434 100644
--- a/tcl/interface/ftdi/m53evk.cfg
+++ b/tcl/interface/ftdi/m53evk.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_channel 0
-ftdi_layout_init 0x0008 0x000b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
+ftdi channel 0
+ftdi layout_init 0x0008 0x000b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
diff --git a/tcl/interface/ftdi/mbftdi.cfg b/tcl/interface/ftdi/mbftdi.cfg
index c0ff865..a34390b 100644
--- a/tcl/interface/ftdi/mbftdi.cfg
+++ b/tcl/interface/ftdi/mbftdi.cfg
@@ -10,7 +10,7 @@
#
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0008 0x000b
+ftdi layout_init 0x0008 0x000b
diff --git a/tcl/interface/ftdi/minimodule-swd.cfg b/tcl/interface/ftdi/minimodule-swd.cfg
index 4bc331e..15b007a 100644
--- a/tcl/interface/ftdi/minimodule-swd.cfg
+++ b/tcl/interface/ftdi/minimodule-swd.cfg
@@ -38,17 +38,17 @@ adapter driver ftdi
#Select your module type and channel
-#ftdi_device_desc "FT2232H MiniModule"
-ftdi_vid_pid 0x0403 0x6010
-#ftdi_channel 1
+#ftdi device_desc "FT2232H MiniModule"
+ftdi vid_pid 0x0403 0x6010
+#ftdi channel 1
-#ftdi_device_desc "FT4232H MiniModule"
-#ftdi_vid_pid 0x0403 0x6011
-#ftdi_channel 1
+#ftdi device_desc "FT4232H MiniModule"
+#ftdi vid_pid 0x0403 0x6011
+#ftdi channel 1
-ftdi_layout_init 0x0000 0x000b
-ftdi_layout_signal nSRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal SWD_EN -data 0
-ftdi_layout_signal SWDIO_OE -data 0
+ftdi layout_init 0x0000 0x000b
+ftdi layout_signal nSRST -data 0x0010 -oe 0x0010
+ftdi layout_signal SWD_EN -data 0
+ftdi layout_signal SWDIO_OE -data 0
transport select swd
diff --git a/tcl/interface/ftdi/minimodule.cfg b/tcl/interface/ftdi/minimodule.cfg
index 5dcce1f..6b2d60c 100644
--- a/tcl/interface/ftdi/minimodule.cfg
+++ b/tcl/interface/ftdi/minimodule.cfg
@@ -5,12 +5,12 @@
#
adapter driver ftdi
-ftdi_device_desc "FT2232H MiniModule"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "FT2232H MiniModule"
+ftdi vid_pid 0x0403 0x6010
# Every pin set as high impedance except TCK, TDI, TDO and TMS
-ftdi_layout_init 0x0008 0x000b
+ftdi layout_init 0x0008 0x000b
# nSRST defined on pin CN2-13 of the MiniModule (pin ADBUS5 [AD5] on the FT2232H chip)
# This choice is arbitrary. Use other GPIO pin if desired.
-ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
+ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
diff --git a/tcl/interface/ftdi/minispartan6.cfg b/tcl/interface/ftdi/minispartan6.cfg
index 97a6abe..faf820d 100644
--- a/tcl/interface/ftdi/minispartan6.cfg
+++ b/tcl/interface/ftdi/minispartan6.cfg
@@ -3,12 +3,12 @@
adapter driver ftdi
# The miniSpartan6+ sadly doesn't have a custom device description, so we just
# have to hope you got it right.
-#ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+#ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
# interface 1 is the uart
-ftdi_channel 0
+ftdi channel 0
# just TCK TDI TDO TMS, no reset
-ftdi_layout_init 0x0008 0x000b
+ftdi layout_init 0x0008 0x000b
reset_config none
# this generally works fast: the fpga can handle 30MHz, the spi flash can handle
# 54MHz with simple read, no dummy cycles, and wait-for-write-completion
diff --git a/tcl/interface/ftdi/miniwiggler.cfg b/tcl/interface/ftdi/miniwiggler.cfg
index 6e53dae..ebaa979 100644
--- a/tcl/interface/ftdi/miniwiggler.cfg
+++ b/tcl/interface/ftdi/miniwiggler.cfg
@@ -25,10 +25,10 @@
#
adapter driver ftdi
-ftdi_device_desc "DAS JDS miniWiggler V3.1"
-ftdi_vid_pid 0x058b 0x0043
+ftdi device_desc "DAS JDS miniWiggler V3.1"
+ftdi vid_pid 0x058b 0x0043
-ftdi_channel 0
-ftdi_layout_init 0x0008 0x001b
-ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
-ftdi_layout_signal nSRST -data 0x0200 -oe 0x0200
+ftdi channel 0
+ftdi layout_init 0x0008 0x001b
+ftdi layout_signal nTRST -data 0x0100 -oe 0x0100
+ftdi layout_signal nSRST -data 0x0200 -oe 0x0200
diff --git a/tcl/interface/ftdi/neodb.cfg b/tcl/interface/ftdi/neodb.cfg
index 1cfb352..426f5c4 100644
--- a/tcl/interface/ftdi/neodb.cfg
+++ b/tcl/interface/ftdi/neodb.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Debug Board for Neo1973"
-ftdi_vid_pid 0x1457 0x5118
+ftdi device_desc "Debug Board for Neo1973"
+ftdi vid_pid 0x1457 0x5118
-ftdi_layout_init 0x0508 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
-ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
-ftdi_layout_signal nNOR_WP -data 0x0010 -oe 0x0010
+ftdi layout_init 0x0508 0x0f1b
+ftdi layout_signal nTRST -data 0x0200 -noe 0x0100
+ftdi layout_signal nSRST -data 0x0800 -noe 0x0400
+ftdi layout_signal nNOR_WP -data 0x0010 -oe 0x0010
diff --git a/tcl/interface/ftdi/ngxtech.cfg b/tcl/interface/ftdi/ngxtech.cfg
index 3aa79ab..962f25b 100644
--- a/tcl/interface/ftdi/ngxtech.cfg
+++ b/tcl/interface/ftdi/ngxtech.cfg
@@ -11,9 +11,9 @@ echo "experience with this file to openocd-devel mailing list, so it could be ma
echo "as working or fixed."
adapter driver ftdi
-ftdi_device_desc "NGX JTAG"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "NGX JTAG"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0508 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
-ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
+ftdi layout_init 0x0508 0x0f1b
+ftdi layout_signal nTRST -data 0x0200 -noe 0x0100
+ftdi layout_signal nSRST -data 0x0800 -noe 0x0400
diff --git a/tcl/interface/ftdi/olimex-arm-jtag-swd.cfg b/tcl/interface/ftdi/olimex-arm-jtag-swd.cfg
index 2153fd6..ace0df9 100644
--- a/tcl/interface/ftdi/olimex-arm-jtag-swd.cfg
+++ b/tcl/interface/ftdi/olimex-arm-jtag-swd.cfg
@@ -5,5 +5,5 @@
transport select swd
-ftdi_layout_signal SWD_EN -nalias nTRST
-ftdi_layout_signal SWDIO_OE -alias TMS
+ftdi layout_signal SWD_EN -nalias nTRST
+ftdi layout_signal SWDIO_OE -alias TMS
diff --git a/tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg b/tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg
index c8e3bef..ca014a4 100644
--- a/tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg
+++ b/tcl/interface/ftdi/olimex-arm-usb-ocd-h.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-OCD-H"
-ftdi_vid_pid 0x15ba 0x002b
+ftdi device_desc "Olimex OpenOCD JTAG ARM-USB-OCD-H"
+ftdi vid_pid 0x15ba 0x002b
-ftdi_layout_init 0x0908 0x0b1b
-ftdi_layout_signal nSRST -oe 0x0200
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal LED -data 0x0800
+ftdi layout_init 0x0908 0x0b1b
+ftdi layout_signal nSRST -oe 0x0200
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal LED -data 0x0800
diff --git a/tcl/interface/ftdi/olimex-arm-usb-ocd.cfg b/tcl/interface/ftdi/olimex-arm-usb-ocd.cfg
index f9126d4..6b92575 100644
--- a/tcl/interface/ftdi/olimex-arm-usb-ocd.cfg
+++ b/tcl/interface/ftdi/olimex-arm-usb-ocd.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Olimex OpenOCD JTAG"
-ftdi_vid_pid 0x15ba 0x0003
+ftdi device_desc "Olimex OpenOCD JTAG"
+ftdi vid_pid 0x15ba 0x0003
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nSRST -oe 0x0200
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal LED -data 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nSRST -oe 0x0200
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal LED -data 0x0800
diff --git a/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg b/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg
index eac25b6..98fe367 100644
--- a/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg
+++ b/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
-ftdi_vid_pid 0x15ba 0x002a
+ftdi device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H"
+ftdi vid_pid 0x15ba 0x002a
-ftdi_layout_init 0x0808 0x0a1b
-ftdi_layout_signal nSRST -oe 0x0200
-ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
-ftdi_layout_signal LED -data 0x0800
+ftdi layout_init 0x0808 0x0a1b
+ftdi layout_signal nSRST -oe 0x0200
+ftdi layout_signal nTRST -data 0x0100 -oe 0x0100
+ftdi layout_signal LED -data 0x0800
diff --git a/tcl/interface/ftdi/olimex-jtag-tiny.cfg b/tcl/interface/ftdi/olimex-jtag-tiny.cfg
index 4811f4d..ebca496 100644
--- a/tcl/interface/ftdi/olimex-jtag-tiny.cfg
+++ b/tcl/interface/ftdi/olimex-jtag-tiny.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Olimex OpenOCD JTAG TINY"
-ftdi_vid_pid 0x15ba 0x0004
+ftdi device_desc "Olimex OpenOCD JTAG TINY"
+ftdi vid_pid 0x15ba 0x0004
-ftdi_layout_init 0x0808 0x0a1b
-ftdi_layout_signal nSRST -oe 0x0200
-ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
-ftdi_layout_signal LED -data 0x0800
+ftdi layout_init 0x0808 0x0a1b
+ftdi layout_signal nSRST -oe 0x0200
+ftdi layout_signal nTRST -data 0x0100 -oe 0x0100
+ftdi layout_signal LED -data 0x0800
diff --git a/tcl/interface/ftdi/oocdlink.cfg b/tcl/interface/ftdi/oocdlink.cfg
index deba4a5..367112a 100644
--- a/tcl/interface/ftdi/oocdlink.cfg
+++ b/tcl/interface/ftdi/oocdlink.cfg
@@ -11,9 +11,9 @@ echo "experience with this file to openocd-devel mailing list, so it could be ma
echo "as working or fixed."
adapter driver ftdi
-ftdi_device_desc "OOCDLink"
-ftdi_vid_pid 0x0403 0xbaf8
+ftdi device_desc "OOCDLink"
+ftdi vid_pid 0x0403 0xbaf8
-ftdi_layout_init 0x0508 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
-ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
+ftdi layout_init 0x0508 0x0f1b
+ftdi layout_signal nTRST -data 0x0200 -noe 0x0100
+ftdi layout_signal nSRST -data 0x0800 -noe 0x0400
diff --git a/tcl/interface/ftdi/opendous_ftdi.cfg b/tcl/interface/ftdi/opendous_ftdi.cfg
index 50f32fb..f212bf5 100644
--- a/tcl/interface/ftdi/opendous_ftdi.cfg
+++ b/tcl/interface/ftdi/opendous_ftdi.cfg
@@ -8,10 +8,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
-ftdi_channel 1
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
+ftdi channel 1
-ftdi_layout_init 0x0c08 0x0f1b
-ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
-ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
+ftdi layout_init 0x0c08 0x0f1b
+ftdi layout_signal nTRST -data 0x0100 -noe 0x0400
+ftdi layout_signal nSRST -data 0x0200 -noe 0x0800
diff --git a/tcl/interface/ftdi/openocd-usb-hs.cfg b/tcl/interface/ftdi/openocd-usb-hs.cfg
index 6f67689..d1a3ff0 100644
--- a/tcl/interface/ftdi/openocd-usb-hs.cfg
+++ b/tcl/interface/ftdi/openocd-usb-hs.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "Dual RS232-HS"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232-HS"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0508 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
-ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
+ftdi layout_init 0x0508 0x0f1b
+ftdi layout_signal nTRST -data 0x0200 -noe 0x0100
+ftdi layout_signal nSRST -data 0x0800 -noe 0x0400
diff --git a/tcl/interface/ftdi/openocd-usb.cfg b/tcl/interface/ftdi/openocd-usb.cfg
index ed80a05..620d204 100644
--- a/tcl/interface/ftdi/openocd-usb.cfg
+++ b/tcl/interface/ftdi/openocd-usb.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "Dual RS232"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Dual RS232"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0508 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
-ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
+ftdi layout_init 0x0508 0x0f1b
+ftdi layout_signal nTRST -data 0x0200 -noe 0x0100
+ftdi layout_signal nSRST -data 0x0800 -noe 0x0400
diff --git a/tcl/interface/ftdi/openrd.cfg b/tcl/interface/ftdi/openrd.cfg
index 535c5e8..88b2a6e 100644
--- a/tcl/interface/ftdi/openrd.cfg
+++ b/tcl/interface/ftdi/openrd.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "OpenRD JTAGKey FT2232D B"
-ftdi_vid_pid 0x0403 0x9e90
-ftdi_channel 0
+ftdi device_desc "OpenRD JTAGKey FT2232D B"
+ftdi vid_pid 0x0403 0x9e90
+ftdi channel 0
-ftdi_layout_init 0x0608 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200
-ftdi_layout_signal nSRST -noe 0x0400
+ftdi layout_init 0x0608 0x0f1b
+ftdi layout_signal nTRST -data 0x0200
+ftdi layout_signal nSRST -noe 0x0400
diff --git a/tcl/interface/ftdi/pipistrello.cfg b/tcl/interface/ftdi/pipistrello.cfg
index 2074924..11fcf07 100644
--- a/tcl/interface/ftdi/pipistrello.cfg
+++ b/tcl/interface/ftdi/pipistrello.cfg
@@ -1,12 +1,12 @@
# http://pipistrello.saanlima.com/
# http://www.saanlima.com/download/pipistrello-v2.0/pipistrello_v2_schematic.pdf
adapter driver ftdi
-ftdi_device_desc "Pipistrello LX45"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "Pipistrello LX45"
+ftdi vid_pid 0x0403 0x6010
# interface 1 is the uart
-ftdi_channel 0
+ftdi channel 0
# just TCK TDI TDO TMS, no reset
-ftdi_layout_init 0x0008 0x000b
+ftdi layout_init 0x0008 0x000b
reset_config none
# this generally works fast: the fpga can handle 30MHz, the spi flash can handle
# 54MHz with simple read, no dummy cycles, and wait-for-write-completion
diff --git a/tcl/interface/ftdi/pls_spc5.cfg b/tcl/interface/ftdi/pls_spc5.cfg
index 806f920..3b3c2d6 100644
--- a/tcl/interface/ftdi/pls_spc5.cfg
+++ b/tcl/interface/ftdi/pls_spc5.cfg
@@ -27,10 +27,10 @@
#
adapter driver ftdi
-ftdi_device_desc "PLS USB/JTAG Adapter for SPC5xxx"
-ftdi_vid_pid 0x263d 0x4001
+ftdi device_desc "PLS USB/JTAG Adapter for SPC5xxx"
+ftdi vid_pid 0x263d 0x4001
-ftdi_channel 0
-ftdi_layout_init 0x0008 0x000b
-ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
-ftdi_layout_signal nSRST -ndata 0x2000 -oe 0x2000
+ftdi channel 0
+ftdi layout_init 0x0008 0x000b
+ftdi layout_signal nTRST -data 0x0100 -oe 0x0100
+ftdi layout_signal nSRST -ndata 0x2000 -oe 0x2000
diff --git a/tcl/interface/ftdi/redbee-econotag.cfg b/tcl/interface/ftdi/redbee-econotag.cfg
index b6f6d23..35bedfa 100644
--- a/tcl/interface/ftdi/redbee-econotag.cfg
+++ b/tcl/interface/ftdi/redbee-econotag.cfg
@@ -14,8 +14,8 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0c08 0x0c2b
-ftdi_layout_signal nTRST -data 0x0800
-ftdi_layout_signal nSRST -data 0x0400
+ftdi layout_init 0x0c08 0x0c2b
+ftdi layout_signal nTRST -data 0x0800
+ftdi layout_signal nSRST -data 0x0400
diff --git a/tcl/interface/ftdi/redbee-usb.cfg b/tcl/interface/ftdi/redbee-usb.cfg
index 52ab93e..a571766 100644
--- a/tcl/interface/ftdi/redbee-usb.cfg
+++ b/tcl/interface/ftdi/redbee-usb.cfg
@@ -14,9 +14,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
-ftdi_channel 1
+ftdi vid_pid 0x0403 0x6010
+ftdi channel 1
-ftdi_layout_init 0x0c08 0x0c2b
-ftdi_layout_signal nTRST -data 0x0800
-ftdi_layout_signal nSRST -data 0x0400
+ftdi layout_init 0x0c08 0x0c2b
+ftdi layout_signal nTRST -data 0x0800
+ftdi layout_signal nSRST -data 0x0400
diff --git a/tcl/interface/ftdi/rowley-cc-arm-swd.cfg b/tcl/interface/ftdi/rowley-cc-arm-swd.cfg
index 9a96dbd..fb416db 100644
--- a/tcl/interface/ftdi/rowley-cc-arm-swd.cfg
+++ b/tcl/interface/ftdi/rowley-cc-arm-swd.cfg
@@ -6,5 +6,5 @@
transport select swd
-ftdi_layout_signal SWD_EN -nalias nTRST
-ftdi_layout_signal SWDIO_OE -alias TMS
+ftdi layout_signal SWD_EN -nalias nTRST
+ftdi layout_signal SWDIO_OE -alias TMS
diff --git a/tcl/interface/ftdi/sheevaplug.cfg b/tcl/interface/ftdi/sheevaplug.cfg
index d4ec72e..5929453 100644
--- a/tcl/interface/ftdi/sheevaplug.cfg
+++ b/tcl/interface/ftdi/sheevaplug.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "SheevaPlug JTAGKey FT2232D B"
-ftdi_vid_pid 0x9e88 0x9e8f
-ftdi_channel 0
+ftdi device_desc "SheevaPlug JTAGKey FT2232D B"
+ftdi vid_pid 0x9e88 0x9e8f
+ftdi channel 0
-ftdi_layout_init 0x0608 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200
-ftdi_layout_signal nSRST -noe 0x0400
+ftdi layout_init 0x0608 0x0f1b
+ftdi layout_signal nTRST -data 0x0200 -noe 0x0100
+ftdi layout_signal nSRST -data 0x0800 -noe 0x0400
diff --git a/tcl/interface/ftdi/signalyzer-lite.cfg b/tcl/interface/ftdi/signalyzer-lite.cfg
index 4778420..9e010d3 100644
--- a/tcl/interface/ftdi/signalyzer-lite.cfg
+++ b/tcl/interface/ftdi/signalyzer-lite.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "Signalyzer LITE"
-ftdi_vid_pid 0x0403 0xbca1
+ftdi device_desc "Signalyzer LITE"
+ftdi vid_pid 0x0403 0xbca1
-ftdi_layout_init 0x0008 0x000b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
+ftdi layout_init 0x0008 0x000b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
diff --git a/tcl/interface/ftdi/signalyzer.cfg b/tcl/interface/ftdi/signalyzer.cfg
index 2439298..d94c6bc 100644
--- a/tcl/interface/ftdi/signalyzer.cfg
+++ b/tcl/interface/ftdi/signalyzer.cfg
@@ -10,9 +10,9 @@ echo "Please report your experience with this file to openocd-devel mailing list
echo "so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "Signalyzer"
-ftdi_vid_pid 0x0403 0xbca0
+ftdi device_desc "Signalyzer"
+ftdi vid_pid 0x0403 0xbca0
-ftdi_layout_init 0x0008 0x000b
-ftdi_layout_signal nTRST -data 0x0010 -oe 0x0010
-ftdi_layout_signal nSRST -data 0x0020 -oe 0x0020
+ftdi layout_init 0x0008 0x000b
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
+ftdi layout_signal nSRST -data 0x0020 -oe 0x0020
diff --git a/tcl/interface/ftdi/snps_sdp.cfg b/tcl/interface/ftdi/snps_sdp.cfg
index 3aed2ae..7bd8387 100644
--- a/tcl/interface/ftdi/snps_sdp.cfg
+++ b/tcl/interface/ftdi/snps_sdp.cfg
@@ -11,8 +11,8 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0088 0x008b
-ftdi_channel 1
+ftdi vid_pid 0x0403 0x6010
+ftdi layout_init 0x0088 0x008b
+ftdi channel 1
diff --git a/tcl/interface/ftdi/steppenprobe.cfg b/tcl/interface/ftdi/steppenprobe.cfg
index 7b5b9a0..f84efe6 100644
--- a/tcl/interface/ftdi/steppenprobe.cfg
+++ b/tcl/interface/ftdi/steppenprobe.cfg
@@ -6,10 +6,10 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x6010
+ftdi vid_pid 0x0403 0x6010
# Initial Layout
-ftdi_layout_init 0x0058 0x99fb
+ftdi layout_init 0x0058 0x99fb
# Signal Data Direction Notes
# TCK 0 1 (out)
# TDI 0 1 (out)
@@ -30,12 +30,12 @@ ftdi_layout_init 0x0058 0x99fb
# Unused 0 1 (out)
# Signals definition
-ftdi_layout_signal LED -ndata 0x0010
-ftdi_layout_signal SWD_EN -data 0x0020
-ftdi_layout_signal SWDIO_OE -ndata 0x0040
-ftdi_layout_signal nSRST -oe 0x0080
+ftdi layout_signal LED -ndata 0x0010
+ftdi layout_signal SWD_EN -data 0x0020
+ftdi layout_signal SWDIO_OE -ndata 0x0040
+ftdi layout_signal nSRST -oe 0x0080
-ftdi_layout_signal GPIO_A -data 0x0200 -oe 0x0200 -input 0x0200
-ftdi_layout_signal GPIO_B -data 0x0400 -oe 0x0400 -input 0x0400
-ftdi_layout_signal GPIO_C -data 0x2000 -oe 0x2000 -input 0x2000
-ftdi_layout_signal GPIO_D -data 0x4000 -oe 0x4000 -input 0x4000
+ftdi layout_signal GPIO_A -data 0x0200 -oe 0x0200 -input 0x0200
+ftdi layout_signal GPIO_B -data 0x0400 -oe 0x0400 -input 0x0400
+ftdi layout_signal GPIO_C -data 0x2000 -oe 0x2000 -input 0x2000
+ftdi layout_signal GPIO_D -data 0x4000 -oe 0x4000 -input 0x4000
diff --git a/tcl/interface/ftdi/stm32-stick.cfg b/tcl/interface/ftdi/stm32-stick.cfg
index 7ae02bd..fd877ec 100644
--- a/tcl/interface/ftdi/stm32-stick.cfg
+++ b/tcl/interface/ftdi/stm32-stick.cfg
@@ -5,9 +5,9 @@
#
adapter driver ftdi
-ftdi_device_desc "STM32-PerformanceStick"
-ftdi_vid_pid 0x0640 0x002d
+ftdi device_desc "STM32-PerformanceStick"
+ftdi vid_pid 0x0640 0x002d
-ftdi_layout_init 0x0388 0x038b
-ftdi_layout_signal nTRST -data 0x0100
-ftdi_layout_signal nSRST -data 0x0080 -noe 0x200
+ftdi layout_init 0x0388 0x038b
+ftdi layout_signal nTRST -data 0x0100
+ftdi layout_signal nSRST -data 0x0080 -noe 0x200
diff --git a/tcl/interface/ftdi/swd-resistor-hack.cfg b/tcl/interface/ftdi/swd-resistor-hack.cfg
index 26eb44c..5bdb87c 100644
--- a/tcl/interface/ftdi/swd-resistor-hack.cfg
+++ b/tcl/interface/ftdi/swd-resistor-hack.cfg
@@ -23,4 +23,4 @@
transport select swd
-ftdi_layout_signal SWD_EN -data 0
+ftdi layout_signal SWD_EN -data 0
diff --git a/tcl/interface/ftdi/ti-icdi.cfg b/tcl/interface/ftdi/ti-icdi.cfg
index 55085ea..f6e16be 100644
--- a/tcl/interface/ftdi/ti-icdi.cfg
+++ b/tcl/interface/ftdi/ti-icdi.cfg
@@ -7,9 +7,9 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0451 0xc32a
+ftdi vid_pid 0x0451 0xc32a
-ftdi_layout_init 0x00a8 0x00eb
-ftdi_layout_signal nSRST -noe 0x0020
-ftdi_layout_signal SWD_EN -ndata 0x0080
-ftdi_layout_signal SWDIO_OE -data 0x0008
+ftdi layout_init 0x00a8 0x00eb
+ftdi layout_signal nSRST -noe 0x0020
+ftdi layout_signal SWD_EN -ndata 0x0080
+ftdi layout_signal SWDIO_OE -data 0x0008
diff --git a/tcl/interface/ftdi/tumpa-lite.cfg b/tcl/interface/ftdi/tumpa-lite.cfg
index 7f576e9..625db16 100644
--- a/tcl/interface/ftdi/tumpa-lite.cfg
+++ b/tcl/interface/ftdi/tumpa-lite.cfg
@@ -5,8 +5,8 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x8a99
+ftdi vid_pid 0x0403 0x8a99
-ftdi_layout_init 0x0038 0x087b
-ftdi_layout_signal nTRST -data 0x0020 -oe 0x0020
-ftdi_layout_signal nSRST -data 0x0010 -oe 0x0010
+ftdi layout_init 0x0038 0x087b
+ftdi layout_signal nTRST -data 0x0020 -oe 0x0020
+ftdi layout_signal nSRST -data 0x0010 -oe 0x0010
diff --git a/tcl/interface/ftdi/tumpa.cfg b/tcl/interface/ftdi/tumpa.cfg
index 1a4e3cd..4491c40 100644
--- a/tcl/interface/ftdi/tumpa.cfg
+++ b/tcl/interface/ftdi/tumpa.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0x8a98 0x0403 0x6010
+ftdi vid_pid 0x0403 0x8a98 0x0403 0x6010
-ftdi_layout_init 0x0038 0x087b
-ftdi_layout_signal nTRST -data 0x0020
-ftdi_layout_signal nSRST -data 0x0010
+ftdi layout_init 0x0038 0x087b
+ftdi layout_signal nTRST -data 0x0020
+ftdi layout_signal nSRST -data 0x0010
reset_config srst_push_pull
diff --git a/tcl/interface/ftdi/turtelizer2-revB.cfg b/tcl/interface/ftdi/turtelizer2-revB.cfg
index 34ae861..593a545 100644
--- a/tcl/interface/ftdi/turtelizer2-revB.cfg
+++ b/tcl/interface/ftdi/turtelizer2-revB.cfg
@@ -10,9 +10,9 @@ echo "in ft2232.c. Please report your experience with this file to openocd-devel
echo "mailing list, so it could be marked as working or fixed."
adapter driver ftdi
-ftdi_device_desc "Turtelizer JTAG/RS232 Adapter"
-ftdi_vid_pid 0x0403 0xbdc8
+ftdi device_desc "Turtelizer JTAG/RS232 Adapter"
+ftdi vid_pid 0x0403 0xbdc8
-ftdi_layout_init 0x0008 0x0c5b
-ftdi_layout_signal nSRST -oe 0x0040
-ftdi_layout_signal LED -data 0x0c00
+ftdi layout_init 0x0008 0x0c5b
+ftdi layout_signal nSRST -oe 0x0040
+ftdi layout_signal LED -data 0x0c00
diff --git a/tcl/interface/ftdi/turtelizer2-revC.cfg b/tcl/interface/ftdi/turtelizer2-revC.cfg
index f5192fb..6e19259 100644
--- a/tcl/interface/ftdi/turtelizer2-revC.cfg
+++ b/tcl/interface/ftdi/turtelizer2-revC.cfg
@@ -5,10 +5,10 @@
#
adapter driver ftdi
-ftdi_device_desc "Turtelizer JTAG/RS232 Adapter"
-ftdi_vid_pid 0x0403 0xbdc8
+ftdi device_desc "Turtelizer JTAG/RS232 Adapter"
+ftdi vid_pid 0x0403 0xbdc8
-ftdi_layout_init 0x0008 0x0c7b
-ftdi_layout_signal nTRST -oe 0x0020
-ftdi_layout_signal nSRST -oe 0x0040
-ftdi_layout_signal LED -ndata 0x0c00
+ftdi layout_init 0x0008 0x0c7b
+ftdi layout_signal nTRST -oe 0x0020
+ftdi layout_signal nSRST -oe 0x0040
+ftdi layout_signal LED -ndata 0x0c00
diff --git a/tcl/interface/ftdi/um232h.cfg b/tcl/interface/ftdi/um232h.cfg
index 2dabbec..10f267d 100644
--- a/tcl/interface/ftdi/um232h.cfg
+++ b/tcl/interface/ftdi/um232h.cfg
@@ -8,12 +8,12 @@
#
adapter driver ftdi
-#ftdi_device_desc "UM232H"
-ftdi_vid_pid 0x0403 0x6014
+#ftdi device_desc "UM232H"
+ftdi vid_pid 0x0403 0x6014
-ftdi_layout_init 0xfff8 0xfffb
-ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100
-ftdi_layout_signal nSRST -data 0x0200 -oe 0x0200
+ftdi layout_init 0xfff8 0xfffb
+ftdi layout_signal nTRST -data 0x0100 -oe 0x0100
+ftdi layout_signal nSRST -data 0x0200 -oe 0x0200
# UM232H FT232H JTAG
# Name Pin Name Func
diff --git a/tcl/interface/ftdi/vpaclink.cfg b/tcl/interface/ftdi/vpaclink.cfg
index ed4895a..7e7f257 100644
--- a/tcl/interface/ftdi/vpaclink.cfg
+++ b/tcl/interface/ftdi/vpaclink.cfg
@@ -11,9 +11,9 @@ echo "experience with this file to openocd-devel mailing list, so it could be ma
echo "as working or fixed."
adapter driver ftdi
-ftdi_device_desc "VPACLink"
-ftdi_vid_pid 0x0403 0x6010
+ftdi device_desc "VPACLink"
+ftdi vid_pid 0x0403 0x6010
-ftdi_layout_init 0x0508 0x0f1b
-ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
-ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
+ftdi layout_init 0x0508 0x0f1b
+ftdi layout_signal nTRST -data 0x0200 -noe 0x0100
+ftdi layout_signal nSRST -data 0x0800 -noe 0x0400
diff --git a/tcl/interface/ftdi/xds100v2.cfg b/tcl/interface/ftdi/xds100v2.cfg
index 860a758..bda8781 100644
--- a/tcl/interface/ftdi/xds100v2.cfg
+++ b/tcl/interface/ftdi/xds100v2.cfg
@@ -8,9 +8,9 @@
#
adapter driver ftdi
-ftdi_vid_pid 0x0403 0xa6d0 0x0403 0x6010
+ftdi vid_pid 0x0403 0xa6d0 0x0403 0x6010
-ftdi_layout_init 0x0038 0x597b
+ftdi layout_init 0x0038 0x597b
# 8000 z - unused
# 4000 0 > CPLD loopback (all target side pins high-Z)
@@ -45,14 +45,14 @@ ftdi_layout_init 0x0038 0x597b
# changing the USB configuration to zero.)
#
-ftdi_layout_signal nTRST -data 0x0010
-ftdi_layout_signal nSRST -oe 0x0100
-ftdi_layout_signal EMU_EN -data 0x0020
-ftdi_layout_signal EMU0 -oe 0x0040
-ftdi_layout_signal EMU1 -oe 0x1000
-ftdi_layout_signal PWR_RST -data 0x0800
-ftdi_layout_signal LOOPBACK -data 0x4000
+ftdi layout_signal nTRST -data 0x0010
+ftdi layout_signal nSRST -oe 0x0100
+ftdi layout_signal EMU_EN -data 0x0020
+ftdi layout_signal EMU0 -oe 0x0040
+ftdi layout_signal EMU1 -oe 0x1000
+ftdi layout_signal PWR_RST -data 0x0800
+ftdi layout_signal LOOPBACK -data 0x4000
-echo "\nInfo : to use this adapter you MUST add ``init; ftdi_set_signal PWR_RST 1; jtag arp_init'' to the end of your config file!\n"
+echo "\nInfo : to use this adapter you MUST add ``init; ftdi set_signal PWR_RST 1; jtag arp_init'' to the end of your config file!\n"
# note: rising edge on PWR_RST is also needed after power-cycling the
# target
diff --git a/tcl/interface/ftdi/xds100v3.cfg b/tcl/interface/ftdi/xds100v3.cfg
index 6c70582..43a11bd 100644
--- a/tcl/interface/ftdi/xds100v3.cfg
+++ b/tcl/interface/ftdi/xds100v3.cfg
@@ -8,4 +8,4 @@
source [find interface/ftdi/xds100v2.cfg]
# The USB ids are different.
-ftdi_vid_pid 0x0403 0xa6d1
+ftdi vid_pid 0x0403 0xa6d1
diff --git a/tcl/interface/jtag_dpi.cfg b/tcl/interface/jtag_dpi.cfg
index e43386d..a92e131 100644
--- a/tcl/interface/jtag_dpi.cfg
+++ b/tcl/interface/jtag_dpi.cfg
@@ -34,5 +34,5 @@ if { [info exists DPI_ADDRESS] } {
set _DPI_ADDRESS "127.0.0.1"
}
-jtag_dpi_set_port $_DPI_PORT
-jtag_dpi_set_address $_DPI_ADDRESS
+jtag_dpi set_port $_DPI_PORT
+jtag_dpi set_address $_DPI_ADDRESS
diff --git a/tcl/interface/jtag_hat_rpi2.cfg b/tcl/interface/jtag_hat_rpi2.cfg
new file mode 100644
index 0000000..495ff0f
--- /dev/null
+++ b/tcl/interface/jtag_hat_rpi2.cfg
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Blinkinlabs JTAG_Hat
+#
+# https://github.com/blinkinlabs/jtag_hat
+#
+
+adapter driver bcm2835gpio
+
+bcm2835gpio_peripheral_base 0x3F000000
+
+# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
+# These depend on system clock, calibrated for stock 700MHz
+# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
+bcm2835gpio_speed_coeffs 146203 36
+
+# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
+# Header pin numbers: 23 22 19 21
+bcm2835gpio_jtag_nums 11 25 10 9
+
+# Each of the SWD lines need a gpio number set: swclk swdio
+# Header pin numbers: 23 22
+bcm2835gpio_swd_nums 11 25
+
+# Direction pin for SWDIO level shifting buffer
+bcm2835gpio_swdio_dir_num 6
+
+# If you define trst or srst, use appropriate reset_config
+# Header pin numbers: TRST - 26, SRST - 18
+
+bcm2835gpio_trst_num 7
+#reset_config trst_only
+
+bcm2835gpio_srst_num 24
+#reset_config srst_only
+
+# or if you have both connected
+#reset_config trst_and_srst
diff --git a/tcl/interface/jtag_vpi.cfg b/tcl/interface/jtag_vpi.cfg
index e665a63..f2f90f7 100644
--- a/tcl/interface/jtag_vpi.cfg
+++ b/tcl/interface/jtag_vpi.cfg
@@ -14,5 +14,5 @@ if { [info exists VPI_ADDRESS] } {
set _VPI_ADDRESS "127.0.0.1"
}
-jtag_vpi_set_port $_VPI_PORT
-jtag_vpi_set_address $_VPI_ADDRESS
+jtag_vpi set_port $_VPI_PORT
+jtag_vpi set_address $_VPI_ADDRESS
diff --git a/tcl/interface/openjtag.cfg b/tcl/interface/openjtag.cfg
index 9a5827b..8d015b7 100644
--- a/tcl/interface/openjtag.cfg
+++ b/tcl/interface/openjtag.cfg
@@ -5,4 +5,4 @@
#
adapter driver openjtag
-openjtag_device_desc "Open JTAG Project"
+openjtag device_desc "Open JTAG Project"
diff --git a/tcl/interface/parport.cfg b/tcl/interface/parport.cfg
index 4c0b260..05195f0 100644
--- a/tcl/interface/parport.cfg
+++ b/tcl/interface/parport.cfg
@@ -15,5 +15,5 @@ if { [info exists PARPORTADDR] } {
}
adapter driver parport
-parport_port $_PARPORTADDR
-parport_cable wiggler
+parport port $_PARPORTADDR
+parport cable wiggler
diff --git a/tcl/interface/parport_dlc5.cfg b/tcl/interface/parport_dlc5.cfg
index e9beaaf..19e21ff 100644
--- a/tcl/interface/parport_dlc5.cfg
+++ b/tcl/interface/parport_dlc5.cfg
@@ -11,5 +11,5 @@ if { [info exists PARPORTADDR] } {
}
adapter driver parport
-parport_port $_PARPORTADDR
-parport_cable dlc5
+parport port $_PARPORTADDR
+parport cable dlc5
diff --git a/tcl/interface/raspberrypi-native.cfg b/tcl/interface/raspberrypi-native.cfg
index 2d0547f..634b8c9 100644
--- a/tcl/interface/raspberrypi-native.cfg
+++ b/tcl/interface/raspberrypi-native.cfg
@@ -10,28 +10,28 @@
adapter driver bcm2835gpio
-bcm2835gpio_peripheral_base 0x20000000
+bcm2835gpio peripheral_base 0x20000000
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
# These depend on system clock, calibrated for stock 700MHz
-# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
-bcm2835gpio_speed_coeffs 113714 28
+# bcm2835gpio speed SPEED_COEFF SPEED_OFFSET
+bcm2835gpio speed_coeffs 113714 28
# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
# Header pin numbers: 23 22 19 21
-bcm2835gpio_jtag_nums 11 25 10 9
+bcm2835gpio jtag_nums 11 25 10 9
# Each of the SWD lines need a gpio number set: swclk swdio
# Header pin numbers: 23 22
-bcm2835gpio_swd_nums 11 25
+bcm2835gpio swd_nums 11 25
# If you define trst or srst, use appropriate reset_config
# Header pin numbers: TRST - 26, SRST - 18
-# bcm2835gpio_trst_num 7
+# bcm2835gpio trst_num 7
# reset_config trst_only
-# bcm2835gpio_srst_num 24
+# bcm2835gpio srst_num 24
# reset_config srst_only srst_push_pull
# or if you have both connected,
diff --git a/tcl/interface/raspberrypi2-native.cfg b/tcl/interface/raspberrypi2-native.cfg
index e53b0f3..14c5771 100644
--- a/tcl/interface/raspberrypi2-native.cfg
+++ b/tcl/interface/raspberrypi2-native.cfg
@@ -10,28 +10,28 @@
adapter driver bcm2835gpio
-bcm2835gpio_peripheral_base 0x3F000000
+bcm2835gpio peripheral_base 0x3F000000
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET
# These depend on system clock, calibrated for stock 700MHz
-# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET
-bcm2835gpio_speed_coeffs 146203 36
+# bcm2835gpio speed SPEED_COEFF SPEED_OFFSET
+bcm2835gpio speed_coeffs 146203 36
# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
# Header pin numbers: 23 22 19 21
-bcm2835gpio_jtag_nums 11 25 10 9
+bcm2835gpio jtag_nums 11 25 10 9
# Each of the SWD lines need a gpio number set: swclk swdio
# Header pin numbers: 23 22
-bcm2835gpio_swd_nums 11 25
+bcm2835gpio swd_nums 11 25
# If you define trst or srst, use appropriate reset_config
# Header pin numbers: TRST - 26, SRST - 18
-# bcm2835gpio_trst_num 7
+# bcm2835gpio trst_num 7
# reset_config trst_only
-# bcm2835gpio_srst_num 24
+# bcm2835gpio srst_num 24
# reset_config srst_only srst_push_pull
# or if you have both connected,
diff --git a/tcl/interface/sysfsgpio-raspberrypi.cfg b/tcl/interface/sysfsgpio-raspberrypi.cfg
index ebb1502..0030560 100644
--- a/tcl/interface/sysfsgpio-raspberrypi.cfg
+++ b/tcl/interface/sysfsgpio-raspberrypi.cfg
@@ -12,19 +12,19 @@ adapter driver sysfsgpio
# Each of the JTAG lines need a gpio number set: tck tms tdi tdo
# Header pin numbers: 23 22 19 21
-sysfsgpio_jtag_nums 11 25 10 9
+sysfsgpio jtag_nums 11 25 10 9
# Each of the SWD lines need a gpio number set: swclk swdio
# Header pin numbers: 23 22
-sysfsgpio_swd_nums 11 25
+sysfsgpio swd_nums 11 25
# If you define trst or srst, use appropriate reset_config
# Header pin numbers: TRST - 26, SRST - 18
-# sysfsgpio_trst_num 7
+# sysfsgpio trst_num 7
# reset_config trst_only
-# sysfsgpio_srst_num 24
+# sysfsgpio srst_num 24
# reset_config srst_only srst_push_pull
# or if you have both connected,
diff --git a/tcl/interface/usb-jtag.cfg b/tcl/interface/usb-jtag.cfg
index 8617c78..bbfb076 100644
--- a/tcl/interface/usb-jtag.cfg
+++ b/tcl/interface/usb-jtag.cfg
@@ -30,8 +30,8 @@
# driver but ixo-usb-jtag requires the ftdi driver.
adapter driver usb_blaster
-usb_blaster_vid_pid 0x16C0 0x06AD
-usb_blaster_device_desc "Van Ooijen Technische Informatica"
+usb_blaster vid_pid 0x16C0 0x06AD
+usb_blaster device_desc "Van Ooijen Technische Informatica"
# ixo-usb-jtag is only compatible with the ublast1 protocol implemented via the
# ftdi modes, using ublast2 will cause openocd to hang.
-usb_blaster_lowlevel_driver ftdi
+usb_blaster lowlevel_driver ftdi
diff --git a/tcl/target/at91sama5d2.cfg b/tcl/target/at91sama5d2.cfg
new file mode 100644
index 0000000..65e5217
--- /dev/null
+++ b/tcl/target/at91sama5d2.cfg
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# The JTAG connection is disabled at reset, and during the ROM Code execution.
+# It is re-enabled when the ROM code jumps in the boot file copied from an
+# external Flash memory into the internalSRAM, or when the ROM code launches
+# the SAM-BA monitor, when no boot file has been found in any external Flash
+# memory.
+# For more JTAG related information see, :
+# https://ww1.microchip.com/downloads/en/DeviceDoc/SAMA5D2-Series-Data-sheet-ds60001476G.pdf
+#
+# If JTAGSEL pin:
+# - if enabled, boundary Scan mode is activated. JTAG ID Code value is 0x05B3F03F.
+# - if disabled, ICE mode is activated. Debug Port JTAG IDCODE value is 0x5BA00477
+#
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $CHIPNAME
+} else {
+ set _CHIPNAME at91sama5d2
+}
+
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f \
+ -expected-id 0x5ba00477
+
+# Cortex-A5 target
+set _TARGETNAME $_CHIPNAME.cpu_a5
+dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
+
+target create $_TARGETNAME.0 cortex_a -dap $_CHIPNAME.dap
diff --git a/tcl/target/stm32l5x.cfg b/tcl/target/stm32l5x.cfg
index 92083b9..0616df1 100644
--- a/tcl/target/stm32l5x.cfg
+++ b/tcl/target/stm32l5x.cfg
@@ -52,9 +52,10 @@ target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
# use non-secure RAM by default
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
-# declare non-secure flash
-flash bank $_CHIPNAME.flash_ns stm32l4x 0x08000000 0 0 0 $_TARGETNAME
-flash bank $_CHIPNAME.otp stm32l4x 0x0BFA0000 0 0 0 $_TARGETNAME
+# create sec/ns flash and otp memories (sizes will be probed)
+flash bank $_CHIPNAME.flash_ns stm32l4x 0x08000000 0 0 0 $_TARGETNAME
+flash bank $_CHIPNAME.flash_alias_s stm32l4x 0x0C000000 0 0 0 $_TARGETNAME
+flash bank $_CHIPNAME.otp stm32l4x 0x0BFA0000 0 0 0 $_TARGETNAME
# Common knowledges tells JTAG speed should be <= F_CPU/6.
# F_CPU after reset is MSI 4MHz, so use F_JTAG = 500 kHz to stay on
@@ -77,30 +78,47 @@ if {![using_hla]} {
cortex_m reset_config sysresetreq
}
+proc is_secure {} {
+ # read Debug Security Control and Status Regsiter (DSCSR) and check CDS (bit 16)
+ set DSCSR [mrw 0xE000EE08]
+ return [expr {($DSCSR & (1 << 16)) != 0}]
+}
+
proc clock_config_110_mhz {} {
+ set offset [expr {[is_secure] ? 0x10000000 : 0}]
# MCU clock is MSI (4MHz) after reset, set MCU freq at 110 MHz with PLL
# RCC_APB1ENR1 = PWREN
- mww 0x40021058 0x10000000
+ mww [expr {0x40021058 + $offset}] 0x10000000
# delay for register clock enable (read back reg)
- mrw 0x40021058
+ mrw [expr {0x40021058 + $offset}]
# PWR_CR1 : VOS Range 0
- mww 0x40007000 0
+ mww [expr {0x40007000 + $offset}] 0
# while (PWR_SR2 & VOSF)
- while {([mrw 0x40007014] & 0x0400)} {}
+ while {([mrw [expr {0x40007014 + $offset}]] & 0x0400)} {}
# FLASH_ACR : 5 WS for 110 MHz HCLK
mww 0x40022000 0x00000005
# RCC_PLLCFGR = PLLP=PLLQ=0, PLLR=00=2, PLLREN=1, PLLN=55, PLLM=0000=1, PLLSRC=MSI 4MHz
# fVCO = 4 x 55 /1 = 220
# SYSCLOCK = fVCO/PLLR = 220/2 = 110 MHz
- mww 0x4002100C 0x01003711
+ mww [expr {0x4002100C + $offset}] 0x01003711
# RCC_CR |= PLLON
- mmw 0x40021000 0x01000000 0
+ mmw [expr {0x40021000 + $offset}] 0x01000000 0
# while !(RCC_CR & PLLRDY)
- while {!([mrw 0x40021000] & 0x02000000)} {}
+ while {!([mrw [expr {0x40021000 + $offset}]] & 0x02000000)} {}
# RCC_CFGR |= SW_PLL
- mmw 0x40021008 0x00000003 0
+ mmw [expr {0x40021008 + $offset}] 0x00000003 0
# while ((RCC_CFGR & SWS) != PLL)
- while {([mrw 0x40021008] & 0x0C) != 0x0C} {}
+ while {([mrw [expr {0x40021008 + $offset}]] & 0x0C) != 0x0C} {}
+}
+
+proc ahb_ap_non_secure_access {} {
+ # SPROT=1=Non Secure access, Priv=1
+ [[target current] cget -dap] apcsw 0x4B000000 0x4F000000
+}
+
+proc ahb_ap_secure_access {} {
+ # SPROT=0=Secure access, Priv=1
+ [[target current] cget -dap] apcsw 0x0B000000 0x4F000000
}
$_TARGETNAME configure -event reset-init {
@@ -123,6 +141,57 @@ $_TARGETNAME configure -event examine-end {
mmw 0xE0044008 0x00001800 0
}
+$_TARGETNAME configure -event halted {
+ set secure [is_secure]
+
+ if {$secure} {
+ set secure_str "Secure"
+ ahb_ap_secure_access
+ } else {
+ set secure_str "Non-Secure"
+ ahb_ap_non_secure_access
+ }
+
+ # print the secure state only when it changes
+ set _TARGETNAME [target current]
+ global $_TARGETNAME.secure
+
+ if {![info exists $_TARGETNAME.secure] || $secure != [set $_TARGETNAME.secure]} {
+ echo "CPU in $secure_str state"
+ # update saved security state
+ set $_TARGETNAME.secure $secure
+ }
+}
+
+$_TARGETNAME configure -event gdb-flash-erase-start {
+ set use_secure_workarea 0
+ # check if FLASH_OPTR.TZEN is enabled
+ set FLASH_OPTR [mrw 0x40022040]
+ if {[expr {$FLASH_OPTR & 0x80000000}] == 0} {
+ echo "TZEN option bit disabled"
+ ahb_ap_non_secure_access
+ } {
+ ahb_ap_secure_access
+ echo "TZEN option bit enabled"
+
+ # check if FLASH_OPTR.RDP is not Level 0.5
+ if {[expr {$FLASH_OPTR & 0xFF}] != 0x55} {
+ set use_secure_workarea 1
+ }
+ }
+
+ set workarea_addr [$_TARGETNAME cget -work-area-phys]
+ echo "workarea_addr $workarea_addr"
+
+ if {$use_secure_workarea} {
+ set workarea_addr [expr {$workarea_addr | 0x10000000}]
+ } {
+ set workarea_addr [expr {$workarea_addr & ~0x10000000}]
+ }
+
+ $_TARGETNAME configure -work-area-phys $workarea_addr
+}
+
$_TARGETNAME configure -event trace-config {
# Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
# change this value accordingly to configure trace pins
diff --git a/tcl/target/stm32u5x.cfg b/tcl/target/stm32u5x.cfg
new file mode 100644
index 0000000..2c2c0e0
--- /dev/null
+++ b/tcl/target/stm32u5x.cfg
@@ -0,0 +1,207 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# script for stm32u5x family
+
+#
+# stm32u5 devices support both JTAG and SWD transports.
+#
+source [find target/swj-dp.tcl]
+source [find mem_helper.tcl]
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $CHIPNAME
+} else {
+ set _CHIPNAME stm32u5x
+}
+
+set _ENDIAN little
+
+# Work-area is a space in RAM used for flash programming
+# By default use 64kB
+if { [info exists WORKAREASIZE] } {
+ set _WORKAREASIZE $WORKAREASIZE
+} else {
+ set _WORKAREASIZE 0x10000
+}
+
+#jtag scan chain
+if { [info exists CPUTAPID] } {
+ set _CPUTAPID $CPUTAPID
+} else {
+ if { [using_jtag] } {
+ # See STM Document RM0438
+ # RM0456 Rev1, Section 65.2.8 JTAG debug port - Table 661. JTAG-DP data registers
+ # Corresponds to Cortex®-M33 JTAG debug port ID code
+ set _CPUTAPID 0x0ba04477
+ } {
+ # SWD IDCODE (single drop, arm)
+ set _CPUTAPID 0x0be12477
+ }
+}
+
+swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
+
+if {[using_jtag]} {
+ jtag newtap $_CHIPNAME bs -irlen 5
+}
+
+set _TARGETNAME $_CHIPNAME.cpu
+target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
+
+# use non-secure RAM by default
+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
+
+# create sec/ns flash and otp memories (sizes will be probed)
+flash bank $_CHIPNAME.flash_ns stm32l4x 0x08000000 0 0 0 $_TARGETNAME
+flash bank $_CHIPNAME.flash_alias_s stm32l4x 0x0C000000 0 0 0 $_TARGETNAME
+flash bank $_CHIPNAME.otp stm32l4x 0x0BFA0000 0 0 0 $_TARGETNAME
+
+# Common knowledges tells JTAG speed should be <= F_CPU/6.
+# F_CPU after reset is MSI 4MHz, so use F_JTAG = 500 kHz to stay on
+# the safe side.
+#
+# Note that there is a pretty wide band where things are
+# more or less stable, see http://openocd.zylin.com/#/c/3366/
+adapter speed 500
+
+adapter srst delay 100
+if {[using_jtag]} {
+ jtag_ntrst_delay 100
+}
+
+reset_config srst_nogate
+
+if {![using_hla]} {
+ # if srst is not fitted use SYSRESETREQ to
+ # perform a soft reset
+ cortex_m reset_config sysresetreq
+}
+
+proc is_secure {} {
+ # read Debug Security Control and Status Regsiter (DSCSR) and check CDS (bit 16)
+ set DSCSR [mrw 0xE000EE08]
+ return [expr {($DSCSR & (1 << 16)) != 0}]
+}
+
+proc clock_config_160_mhz {} {
+ set offset [expr {[is_secure] ? 0x10000000 : 0}]
+ # MCU clock is at MSI 4MHz after reset, set MCU freq at 160 MHz with PLL
+
+ # Enable voltage range 1 for frequency above 100 Mhz
+ # RCC_AHB3ENR = PWREN
+ mww [expr {0x46020C94 + $offset}] 0x00000004
+ # delay for register clock enable (read back reg)
+ mrw [expr {0x56020C94 + $offset}]
+ # PWR_VOSR : VOS Range 1
+ mww [expr {0x4602080C + $offset}] 0x00030000
+ # delay for register write (read back reg)
+ mrw [expr {0x4602080C + $offset}]
+ # FLASH_ACR : 4 WS for 160 MHz HCLK
+ mww [expr {0x40022000 + $offset}] 0x00000004
+ # RCC_PLL1CFGR => PLL1M=0000=/1, PLL1SRC=MSI 4MHz
+ mww [expr {0x46020C28 + $offset}] 0x00000001
+ # RCC_PLL1DIVR => PLL1P=PLL1Q=PLL1R=000001=/2, PLL1N=0x4F=80
+ # fVCO = 4 x 80 /1 = 320
+ # SYSCLOCK = fVCO/PLL1R = 320/2 = 160 MHz
+ mmw [expr {0x46020C34 + $offset}] 0x0000004F 0
+ # RCC_PLL1CFGR => PLL1REN=1
+ mmw [expr {0x46020C28 + $offset}] 0x00040000 0
+ # RCC_CR |= PLL1ON
+ mmw [expr {0x46020C00 + $offset}] 0x01000000 0
+ # while !(RCC_CR & PLL1RDY)
+ while {!([mrw [expr {0x46020C00 + $offset}]] & 0x02000000)} {}
+ # RCC_CFGR1 |= SW_PLL
+ mmw [expr {0x46020C1C + $offset}] 0x00000003 0
+ # while ((RCC_CFGR1 & SWS) != PLL)
+ while {([mrw [expr {0x46020C1C + $offset}]] & 0x0C) != 0x0C} {}
+}
+
+proc ahb_ap_non_secure_access {} {
+ # SPROT=1=Non Secure access, Priv=1
+ [[target current] cget -dap] apcsw 0x4B000000 0x4F000000
+}
+
+proc ahb_ap_secure_access {} {
+ # SPROT=0=Secure access, Priv=1
+ [[target current] cget -dap] apcsw 0x0B000000 0x4F000000
+}
+
+$_TARGETNAME configure -event reset-init {
+ clock_config_160_mhz
+ # Boost JTAG frequency
+ adapter speed 4000
+}
+
+$_TARGETNAME configure -event reset-start {
+ # Reset clock is MSI (4 MHz)
+ adapter speed 480
+}
+
+$_TARGETNAME configure -event examine-end {
+ # DBGMCU_CR |= DBG_STANDBY | DBG_STOP
+ mmw 0xE0044004 0x00000006 0
+
+ # Stop watchdog counters during halt
+ # DBGMCU_APB1_FZ |= DBG_IWDG_STOP | DBG_WWDG_STOP
+ mmw 0xE0044008 0x00001800 0
+}
+
+$_TARGETNAME configure -event halted {
+ set secure [is_secure]
+
+ if {$secure} {
+ set secure_str "Secure"
+ ahb_ap_secure_access
+ } else {
+ set secure_str "Non-Secure"
+ ahb_ap_non_secure_access
+ }
+
+ # print the secure state only when it changes
+ set _TARGETNAME [target current]
+ global $_TARGETNAME.secure
+
+ if {![info exists $_TARGETNAME.secure] || $secure != [set $_TARGETNAME.secure]} {
+ echo "CPU in $secure_str state"
+ # update saved security state
+ set $_TARGETNAME.secure $secure
+ }
+}
+
+$_TARGETNAME configure -event gdb-flash-erase-start {
+ set use_secure_workarea 0
+ # check if FLASH_OPTR.TZEN is enabled
+ set FLASH_OPTR [mrw 0x40022040]
+ if {[expr {$FLASH_OPTR & 0x80000000}] == 0} {
+ echo "TZEN option bit disabled"
+ ahb_ap_non_secure_access
+ } else {
+ ahb_ap_secure_access
+ echo "TZEN option bit enabled"
+
+ # check if FLASH_OPTR.RDP is not Level 0.5
+ if {[expr {$FLASH_OPTR & 0xFF}] != 0x55} {
+ set use_secure_workarea 1
+ }
+ }
+
+ set _TARGETNAME [target current]
+ set workarea_addr [$_TARGETNAME cget -work-area-phys]
+ echo "workarea_addr $workarea_addr"
+
+ if {$use_secure_workarea} {
+ set workarea_addr [expr {$workarea_addr | 0x10000000}]
+ } else {
+ set workarea_addr [expr {$workarea_addr & ~0x10000000}]
+ }
+
+ $_TARGETNAME configure -work-area-phys $workarea_addr
+}
+
+$_TARGETNAME configure -event trace-config {
+ # Set TRACE_IOEN; TRACE_MODE is set to async; when using sync
+ # change this value accordingly to configure trace pins
+ # assignment
+ mmw 0xE0044004 0x00000020 0
+}
diff --git a/tcl/target/stm32wlx.cfg b/tcl/target/stm32wlx.cfg
index 961850a..edb3fb3 100644
--- a/tcl/target/stm32wlx.cfg
+++ b/tcl/target/stm32wlx.cfg
@@ -12,16 +12,47 @@ if { [info exists CHIPNAME] } {
set _CHIPNAME stm32wlx
}
-set _ENDIAN little
+if { [info exists DUAL_CORE] } {
+ set $_CHIPNAME.DUAL_CORE $DUAL_CORE
+ unset DUAL_CORE
+} else {
+ set $_CHIPNAME.DUAL_CORE 0
+}
+
+if { [info exists WKUP_CM0P] } {
+ set $_CHIPNAME.WKUP_CM0P $WKUP_CM0P
+ unset WKUP_CM0P
+} else {
+ set $_CHIPNAME.WKUP_CM0P 0
+}
+
+# Issue a warning when hla is used, and fallback to single core configuration
+if { [set $_CHIPNAME.DUAL_CORE] && [using_hla] } {
+ echo "Warning : hla does not support multicore debugging"
+ set $_CHIPNAME.DUAL_CORE 0
+ set $_CHIPNAME.WKUP_CM0P 0
+}
+# setup the Work-area start address and size
# Work-area is a space in RAM used for flash programming
-# By default use 20kB
+
+# Memory map for known devices:
+# STM32WL x5JC x5JB x5J8
+# FLASH 256 128 64
+# SRAM1 32 16 0
+# SRAM2 32 32 20
+
+# By default use 8kB
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
- set _WORKAREASIZE 0x5000
+ set _WORKAREASIZE 0x2000
}
+# Use SRAM2 as work area (some devices do not have SRAM1):
+set WORKAREASTART_CM4 0x20008000
+set WORKAREASTART_CM0P [expr {$WORKAREASTART_CM4 + $_WORKAREASIZE}]
+
#jtag scan chain
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
@@ -41,36 +72,20 @@ if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5
}
-set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
-
-$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
-
-flash bank $_CHIPNAME.flash stm32l4x 0x08000000 0 0 0 $_TARGETNAME
-flash bank $_CHIPNAME.otp stm32l4x 0x1fff7000 0 0 0 $_TARGETNAME
-
-# Common knowledges tells JTAG speed should be <= F_CPU/6.
-# F_CPU after reset is MSI 4MHz, so use F_JTAG = 500 kHz to stay on
-# the safe side.
-#
-# Note that there is a pretty wide band where things are
-# more or less stable, see http://openocd.zylin.com/#/c/3366/
-adapter speed 500
+target create $_CHIPNAME.cpu0 cortex_m -endian little -dap $_CHIPNAME.dap
-adapter srst delay 100
-if {[using_jtag]} {
- jtag_ntrst_delay 100
-}
+$_CHIPNAME.cpu0 configure -work-area-phys $WORKAREASTART_CM4 -work-area-size $_WORKAREASIZE -work-area-backup 0
-reset_config srst_nogate
+flash bank $_CHIPNAME.flash.cpu0 stm32l4x 0x08000000 0 0 0 $_CHIPNAME.cpu0
+flash bank $_CHIPNAME.otp.cpu0 stm32l4x 0x1fff7000 0 0 0 $_CHIPNAME.cpu0
if {![using_hla]} {
# if srst is not fitted use SYSRESETREQ to
# perform a soft reset
- cortex_m reset_config sysresetreq
+ $_CHIPNAME.cpu0 cortex_m reset_config sysresetreq
}
-$_TARGETNAME configure -event reset-init {
+$_CHIPNAME.cpu0 configure -event reset-init {
# CPU comes out of reset with MSI_ON | MSI_RDY | MSI Range 4 MHz.
# Configure system to use MSI 24 MHz clock, compliant with VOS default Range1.
# 2 WS compliant with VOS=Range1 and 24 MHz.
@@ -80,12 +95,12 @@ $_TARGETNAME configure -event reset-init {
adapter speed 4000
}
-$_TARGETNAME configure -event reset-start {
+$_CHIPNAME.cpu0 configure -event reset-start {
# Reset clock is MSI (4 MHz)
adapter speed 500
}
-$_TARGETNAME configure -event examine-end {
+$_CHIPNAME.cpu0 configure -event examine-end {
# Enable debug during low power modes (uses more power)
# DBGMCU_CR |= DBG_STANDBY | DBG_STOP | DBG_SLEEP
mmw 0xE0042004 0x00000007 0
@@ -93,8 +108,80 @@ $_TARGETNAME configure -event examine-end {
# Stop watchdog counters during halt
# DBGMCU_APB1_FZR1 |= DBG_IWDG_STOP | DBG_WWDG_STOP
mmw 0xE004203C 0x00001800 0
+
+ set _CHIPNAME [stm32wlx_get_chipname]
+ global $_CHIPNAME.WKUP_CM0P
+
+ if {[set $_CHIPNAME.WKUP_CM0P]} {
+ stm32wlx_wkup_cm0p
+ }
}
-$_TARGETNAME configure -event trace-config {
+$_CHIPNAME.cpu0 configure -event trace-config {
# nothing to do
}
+
+if {[set $_CHIPNAME.DUAL_CORE]} {
+ target create $_CHIPNAME.cpu1 cortex_m -endian little -dap $_CHIPNAME.dap -ap-num 1
+
+ $_CHIPNAME.cpu0 configure -work-area-phys $WORKAREASTART_CM0P -work-area-size $_WORKAREASIZE -work-area-backup 0
+
+ flash bank $_CHIPNAME.flash.cpu1 stm32l4x 0x08000000 0 0 0 $_CHIPNAME.cpu1
+ flash bank $_CHIPNAME.otp.cpu1 stm32l4x 0x1fff7000 0 0 0 $_CHIPNAME.cpu1
+
+ if {![using_hla]} {
+ # if srst is not fitted use SYSRESETREQ to
+ # perform a soft reset
+ $_CHIPNAME.cpu1 cortex_m reset_config sysresetreq
+ }
+
+ proc stm32wlx_wkup_cm0p {} {
+ set _CHIPNAME [stm32wlx_get_chipname]
+
+ # enable CPU2 boot after reset and after wakeup from Stop or Standby mode
+ # PWR_CR4 |= C2BOOT
+ stm32wlx_mmw $_CHIPNAME.cpu0 0x5800040C 0x00008000 0
+ }
+}
+
+# get _CHIPNAME from current target
+proc stm32wlx_get_chipname {} {
+ set t [target current]
+ set sep [string last "." $t]
+ if {$sep == -1} {
+ return $t
+ }
+ return [string range $t 0 [expr $sep - 1]]
+}
+
+# like mrw, but with target selection
+proc stm32wlx_mrw {used_target reg} {
+ set value ""
+ $used_target mem2array value 32 $reg 1
+ return $value(0)
+}
+
+# like mmw, but with target selection
+proc stm32wlx_mmw {used_target reg setbits clearbits} {
+ set old [stm32wlx_mrw $used_target $reg]
+ set new [expr {($old & ~$clearbits) | $setbits}]
+ $used_target mww $reg $new
+}
+
+# Make sure that cpu0 is selected
+targets $_CHIPNAME.cpu0
+
+# Common knowledges tells JTAG speed should be <= F_CPU/6.
+# F_CPU after reset is MSI 4MHz, so use F_JTAG = 500 kHz to stay on
+# the safe side.
+#
+# Note that there is a pretty wide band where things are
+# more or less stable, see http://openocd.zylin.com/#/c/3366/
+adapter speed 500
+
+adapter srst delay 100
+if {[using_jtag]} {
+ jtag_ntrst_delay 100
+}
+
+reset_config srst_nogate