diff options
author | Paul Fertser <fercerpav@gmail.com> | 2017-01-26 23:41:40 +0300 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2017-12-12 21:13:55 +0000 |
commit | 31c58c139d85c35cc8ebce4196edb2c5eb157c7a (patch) | |
tree | 91e43c935709234d69da7e3986de90b3dc127346 /tcl/interface | |
parent | eb26a884e0ff0fb6568aeda65fe21eec1e5b6557 (diff) | |
download | riscv-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/interface')
-rw-r--r-- | tcl/interface/stlink-v1.cfg | 11 | ||||
-rw-r--r-- | tcl/interface/stlink-v2-1.cfg | 18 | ||||
-rw-r--r-- | tcl/interface/stlink-v2.cfg | 18 | ||||
-rw-r--r-- | tcl/interface/stlink.cfg | 17 |
4 files changed, 23 insertions, 41 deletions
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" + |