aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2015-05-10 13:12:14 +0300
committerPaul Fertser <fercerpav@gmail.com>2015-05-17 21:52:51 +0100
commitc3976ac658f5b544a8463cf9153561a7c7ee49b4 (patch)
tree76b376671569dadd4f660551c6f5a9cf55e17f1e
parent45eef3c23df13ca3ea0c13d60d511479cce84be7 (diff)
downloadriscv-openocd-c3976ac658f5b544a8463cf9153561a7c7ee49b4.zip
riscv-openocd-c3976ac658f5b544a8463cf9153561a7c7ee49b4.tar.gz
riscv-openocd-c3976ac658f5b544a8463cf9153561a7c7ee49b4.tar.bz2
jtag/drivers/stlink: fix SRST issue with stlink-v1
Even though the latest firmware version for stlink-v1 supports "v2" JTAG API, the hardware SRST handling is still broken; amend the check accordingly. Change-Id: I62c662cd7aa209d2d6e9fe260f5c0be81d0ce672 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2761 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
-rw-r--r--src/jtag/drivers/stlink_usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c
index 18498dd..e129e80 100644
--- a/src/jtag/drivers/stlink_usb.c
+++ b/src/jtag/drivers/stlink_usb.c
@@ -974,7 +974,7 @@ static int stlink_usb_assert_srst(void *handle, int srst)
assert(handle != NULL);
- if (h->jtag_api == STLINK_JTAG_API_V1)
+ if (h->version.stlink == 1)
return ERROR_COMMAND_NOTFOUND;
stlink_usb_init_buffer(handle, h->rx_ep, 2);