aboutsummaryrefslogtreecommitdiff
path: root/tcl
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2017-01-26 23:41:40 +0300
committerSpencer Oliver <spen@spen-soft.co.uk>2017-12-12 21:13:55 +0000
commit31c58c139d85c35cc8ebce4196edb2c5eb157c7a (patch)
tree91e43c935709234d69da7e3986de90b3dc127346 /tcl
parenteb26a884e0ff0fb6568aeda65fe21eec1e5b6557 (diff)
downloadriscv-openocd-31c58c139d85c35cc8ebce4196edb2c5eb157c7a.zip
riscv-openocd-31c58c139d85c35cc8ebce4196edb2c5eb157c7a.tar.gz
riscv-openocd-31c58c139d85c35cc8ebce4196edb2c5eb157c7a.tar.bz2
jtag: drivers: stlink: handle all versions with single config
Extend HLA interface to allow multiple VID/PID pairs and use it to autodetect the connected stlink version. Change-Id: I35cd895b2260e23cf0e8fcb1fc11a78c2b99c69b Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/3961 Tested-by: jenkins Reviewed-by: Karl Palsson <karlp@tweak.net.au> Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'tcl')
-rw-r--r--tcl/board/st_nucleo_f0.cfg2
-rw-r--r--tcl/board/st_nucleo_f103rb.cfg2
-rw-r--r--tcl/board/st_nucleo_f3.cfg2
-rw-r--r--tcl/board/st_nucleo_f4.cfg2
-rw-r--r--tcl/board/st_nucleo_l1.cfg2
-rw-r--r--tcl/board/st_nucleo_l476rg.cfg2
-rw-r--r--tcl/board/stm320518_eval_stlink.cfg2
-rw-r--r--tcl/board/stm3220g_eval_stlink.cfg2
-rw-r--r--tcl/board/stm3241g_eval_stlink.cfg2
-rw-r--r--tcl/board/stm32429i_eval_stlink.cfg2
-rw-r--r--tcl/board/stm32439i_eval_stlink.cfg2
-rw-r--r--tcl/board/stm32f0discovery.cfg2
-rw-r--r--tcl/board/stm32f3discovery.cfg2
-rw-r--r--tcl/board/stm32f429disc1.cfg2
-rw-r--r--tcl/board/stm32f429discovery.cfg2
-rw-r--r--tcl/board/stm32f469discovery.cfg2
-rw-r--r--tcl/board/stm32f4discovery.cfg2
-rwxr-xr-xtcl/board/stm32f7discovery.cfg2
-rw-r--r--tcl/board/stm32l0discovery.cfg2
-rw-r--r--tcl/board/stm32l4discovery.cfg2
-rw-r--r--tcl/board/stm32ldiscovery.cfg2
-rw-r--r--tcl/board/stm32vldiscovery.cfg2
-rw-r--r--tcl/interface/stlink-v1.cfg11
-rw-r--r--tcl/interface/stlink-v2-1.cfg18
-rw-r--r--tcl/interface/stlink-v2.cfg18
-rw-r--r--tcl/interface/stlink.cfg17
26 files changed, 45 insertions, 63 deletions
diff --git a/tcl/board/st_nucleo_f0.cfg b/tcl/board/st_nucleo_f0.cfg
index e9fda19..e6a03bb 100644
--- a/tcl/board/st_nucleo_f0.cfg
+++ b/tcl/board/st_nucleo_f0.cfg
@@ -6,7 +6,7 @@
# STM32F091RC
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260944
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/st_nucleo_f103rb.cfg b/tcl/board/st_nucleo_f103rb.cfg
index 71a92f7..e1990dc 100644
--- a/tcl/board/st_nucleo_f103rb.cfg
+++ b/tcl/board/st_nucleo_f103rb.cfg
@@ -1,7 +1,7 @@
# This is an ST NUCLEO F103RB board with a single STM32F103RBT6 chip.
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF259875
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/st_nucleo_f3.cfg b/tcl/board/st_nucleo_f3.cfg
index 9dffdcb..fec612b 100644
--- a/tcl/board/st_nucleo_f3.cfg
+++ b/tcl/board/st_nucleo_f3.cfg
@@ -1,7 +1,7 @@
# This is an ST NUCLEO F334R8 board with a single STM32F334R8T6 chip.
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260004
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/st_nucleo_f4.cfg b/tcl/board/st_nucleo_f4.cfg
index b5a78c1..11f6f87 100644
--- a/tcl/board/st_nucleo_f4.cfg
+++ b/tcl/board/st_nucleo_f4.cfg
@@ -4,7 +4,7 @@
# STM32F411RET6
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260320
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/st_nucleo_l1.cfg b/tcl/board/st_nucleo_l1.cfg
index 56e2756..d97eb7c 100644
--- a/tcl/board/st_nucleo_l1.cfg
+++ b/tcl/board/st_nucleo_l1.cfg
@@ -1,7 +1,7 @@
# This is an ST NUCLEO L152RE board with a single STM32L152RET6 chip.
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF260002
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/st_nucleo_l476rg.cfg b/tcl/board/st_nucleo_l476rg.cfg
index 2baa34e..4426c3b 100644
--- a/tcl/board/st_nucleo_l476rg.cfg
+++ b/tcl/board/st_nucleo_l476rg.cfg
@@ -1,7 +1,7 @@
# This is a ST NUCLEO L476RG board with a single STM32L476RGT6 chip.
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1847/PF261636
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm320518_eval_stlink.cfg b/tcl/board/stm320518_eval_stlink.cfg
index ce074cb..a7fef07 100644
--- a/tcl/board/stm320518_eval_stlink.cfg
+++ b/tcl/board/stm320518_eval_stlink.cfg
@@ -4,7 +4,7 @@
#
# This is for using the onboard STLINK/V2
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm3220g_eval_stlink.cfg b/tcl/board/stm3220g_eval_stlink.cfg
index 43a4df9..b58e42f 100644
--- a/tcl/board/stm3220g_eval_stlink.cfg
+++ b/tcl/board/stm3220g_eval_stlink.cfg
@@ -4,7 +4,7 @@
#
# This is for using the onboard STLINK/V2
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm3241g_eval_stlink.cfg b/tcl/board/stm3241g_eval_stlink.cfg
index 9c7ad5d..b1c54a2 100644
--- a/tcl/board/stm3241g_eval_stlink.cfg
+++ b/tcl/board/stm3241g_eval_stlink.cfg
@@ -4,7 +4,7 @@
#
# This is for using the onboard STLINK/V2
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32429i_eval_stlink.cfg b/tcl/board/stm32429i_eval_stlink.cfg
index 2b51cea..010d371 100644
--- a/tcl/board/stm32429i_eval_stlink.cfg
+++ b/tcl/board/stm32429i_eval_stlink.cfg
@@ -4,7 +4,7 @@
#
# This is for using the onboard STLINK/V2
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32439i_eval_stlink.cfg b/tcl/board/stm32439i_eval_stlink.cfg
index 5995fb1..b722ce6 100644
--- a/tcl/board/stm32439i_eval_stlink.cfg
+++ b/tcl/board/stm32439i_eval_stlink.cfg
@@ -4,7 +4,7 @@
#
# This is for using the onboard STLINK/V2
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32f0discovery.cfg b/tcl/board/stm32f0discovery.cfg
index bae9a69..e2b5e38 100644
--- a/tcl/board/stm32f0discovery.cfg
+++ b/tcl/board/stm32f0discovery.cfg
@@ -1,7 +1,7 @@
# This is an STM32F0 discovery board with a single STM32F051R8T6 chip.
# http://www.st.com/internet/evalboard/product/253215.jsp
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32f3discovery.cfg b/tcl/board/stm32f3discovery.cfg
index 5a17b4c..9bb62f5 100644
--- a/tcl/board/stm32f3discovery.cfg
+++ b/tcl/board/stm32f3discovery.cfg
@@ -1,7 +1,7 @@
# This is an STM32F3 discovery board with a single STM32F303VCT6 chip.
# http://www.st.com/internet/evalboard/product/254044.jsp
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32f429disc1.cfg b/tcl/board/stm32f429disc1.cfg
index 9d3cdd7..c0bceba 100644
--- a/tcl/board/stm32f429disc1.cfg
+++ b/tcl/board/stm32f429disc1.cfg
@@ -3,7 +3,7 @@
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF259090
#
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32f429discovery.cfg b/tcl/board/stm32f429discovery.cfg
index e06d2a5..7aef09d 100644
--- a/tcl/board/stm32f429discovery.cfg
+++ b/tcl/board/stm32f429discovery.cfg
@@ -3,7 +3,7 @@
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF259090
#
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32f469discovery.cfg b/tcl/board/stm32f469discovery.cfg
index 63b1363..a9559a7 100644
--- a/tcl/board/stm32f469discovery.cfg
+++ b/tcl/board/stm32f469discovery.cfg
@@ -3,7 +3,7 @@
# http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1848/PF262395
#
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32f4discovery.cfg b/tcl/board/stm32f4discovery.cfg
index 963e0f9..60b7f42 100644
--- a/tcl/board/stm32f4discovery.cfg
+++ b/tcl/board/stm32f4discovery.cfg
@@ -1,7 +1,7 @@
# This is an STM32F4 discovery board with a single STM32F407VGT6 chip.
# http://www.st.com/internet/evalboard/product/252419.jsp
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32f7discovery.cfg b/tcl/board/stm32f7discovery.cfg
index 085340f..7d1bc96 100755
--- a/tcl/board/stm32f7discovery.cfg
+++ b/tcl/board/stm32f7discovery.cfg
@@ -2,7 +2,7 @@
# http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF261641
# This is for using the onboard STLINK/V2-1
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32l0discovery.cfg b/tcl/board/stm32l0discovery.cfg
index a035062..aabbf81 100644
--- a/tcl/board/stm32l0discovery.cfg
+++ b/tcl/board/stm32l0discovery.cfg
@@ -1,7 +1,7 @@
# This is an STM32L053 discovery board with a single STM32L053 chip.
# http://www.st.com/web/en/catalog/tools/PF260319
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32l4discovery.cfg b/tcl/board/stm32l4discovery.cfg
index eb19331..8b79841 100644
--- a/tcl/board/stm32l4discovery.cfg
+++ b/tcl/board/stm32l4discovery.cfg
@@ -4,7 +4,7 @@
# an stlink-v2-1 interface.
# This is for STM32L4 boards that are connected via stlink-v2-1.
-source [find interface/stlink-v2-1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32ldiscovery.cfg b/tcl/board/stm32ldiscovery.cfg
index 8678d29..3e397cb 100644
--- a/tcl/board/stm32ldiscovery.cfg
+++ b/tcl/board/stm32ldiscovery.cfg
@@ -1,7 +1,7 @@
# This is an STM32L discovery board with a single STM32L152RBT6 chip.
# http://www.st.com/internet/evalboard/product/250990.jsp
-source [find interface/stlink-v2.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/board/stm32vldiscovery.cfg b/tcl/board/stm32vldiscovery.cfg
index 970b510..60805b3 100644
--- a/tcl/board/stm32vldiscovery.cfg
+++ b/tcl/board/stm32vldiscovery.cfg
@@ -1,7 +1,7 @@
# This is an STM32VL discovery board with a single STM32F100RB chip.
# http://www.st.com/internet/evalboard/product/250863.jsp
-source [find interface/stlink-v1.cfg]
+source [find interface/stlink.cfg]
transport select hla_swd
diff --git a/tcl/interface/stlink-v1.cfg b/tcl/interface/stlink-v1.cfg
index 13f207d..0004227 100644
--- a/tcl/interface/stlink-v1.cfg
+++ b/tcl/interface/stlink-v1.cfg
@@ -1,9 +1,2 @@
-#
-# STMicroelectronics ST-LINK/V1 in-circuit debugger/programmer
-#
-
-interface hla
-hla_layout stlink
-hla_device_desc "ST-LINK/V1"
-hla_vid_pid 0x0483 0x3744
-
+echo "WARNING: interface/stlink-v1.cfg is deprecated, please switch to interface/stlink.cfg"
+source [find interface/stlink.cfg]
diff --git a/tcl/interface/stlink-v2-1.cfg b/tcl/interface/stlink-v2-1.cfg
index 093e801..62f37dc 100644
--- a/tcl/interface/stlink-v2-1.cfg
+++ b/tcl/interface/stlink-v2-1.cfg
@@ -1,16 +1,2 @@
-#
-# STMicroelectronics ST-LINK/V2-1 in-circuit debugger/programmer
-#
-
-interface hla
-hla_layout stlink
-hla_device_desc "ST-LINK/V2-1"
-hla_vid_pid 0x0483 0x374b
-
-# Optionally specify the serial number of ST-LINK/V2 usb device. ST-LINK/V2
-# devices seem to have serial numbers with unreadable characters. ST-LINK/V2
-# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial
-# number reset issues.
-# eg.
-#hla_serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"
-
+echo "WARNING: interface/stlink-v2-1.cfg is deprecated, please switch to interface/stlink.cfg"
+source [find interface/stlink.cfg]
diff --git a/tcl/interface/stlink-v2.cfg b/tcl/interface/stlink-v2.cfg
index ae545a1..070e469 100644
--- a/tcl/interface/stlink-v2.cfg
+++ b/tcl/interface/stlink-v2.cfg
@@ -1,16 +1,2 @@
-#
-# STMicroelectronics ST-LINK/V2 in-circuit debugger/programmer
-#
-
-interface hla
-hla_layout stlink
-hla_device_desc "ST-LINK/V2"
-hla_vid_pid 0x0483 0x3748
-
-# Optionally specify the serial number of ST-LINK/V2 usb device. ST-LINK/V2
-# devices seem to have serial numbers with unreadable characters. ST-LINK/V2
-# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial
-# number reset issues.
-# eg.
-#hla_serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"
-
+echo "WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg"
+source [find interface/stlink.cfg]
diff --git a/tcl/interface/stlink.cfg b/tcl/interface/stlink.cfg
new file mode 100644
index 0000000..d747d85
--- /dev/null
+++ b/tcl/interface/stlink.cfg
@@ -0,0 +1,17 @@
+#
+# STMicroelectronics ST-LINK/V1, ST-LINK/V2, ST-LINK/V2-1 in-circuit
+# debugger/programmer
+#
+
+interface hla
+hla_layout stlink
+hla_device_desc "ST-LINK"
+hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b
+
+# Optionally specify the serial number of ST-LINK/V2 usb device. ST-LINK/V2
+# devices seem to have serial numbers with unreadable characters. ST-LINK/V2
+# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial
+# number reset issues.
+# eg.
+#hla_serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"
+