jtag/drivers/stlink_usb : implemented and repaired SWIM support 52/3952/9
authorAke Rehnman <ake.rehnman@gmail.com>
Sat, 21 Jan 2017 09:42:11 +0000 (10:42 +0100)
committerPaul Fertser <fercerpav@gmail.com>
Fri, 12 Jan 2018 20:17:55 +0000 (20:17 +0000)
commit3de6b5f6e52f46a4b6dcbdeaddb6d75d2bf48519
tree8d2411c0dcc6519539318f94280a23c32ea10f93
parent779e95cc326e77f628d5feb7d72a064ffedfd820
jtag/drivers/stlink_usb : implemented and repaired SWIM support

Fixed a bug in stlink_usb_read_mem/write_mem preventing large data transfers

The SWIM support in stlink_usb was basically non existent so I have
implemented the missing parts. The bCBWCBLength and dCBWDataTransferLength
for STLINK-V1 protocol was not correct so that was fixed. The reason for
adding SWIM support is to add STM8 support for OpenOCD.

I have tested the driver on:
STM8 discovery board with the built-in STLINK-V1
STM8 discovery board with STLINK-V2 dongle
STM32 vldiscovery board with the built-in STLINK-V1
STM32F1xxx processor with STLINK-V2 dongle

Change-Id: I4aa80a92fb0226174356adaf2f8ff949920a621f
Signed-off-by: Ake Rehnman <ake.rehnman@gmail.com>
Reviewed-on: http://openocd.zylin.com/3952
Tested-by: jenkins
Reviewed-by: Philipp Klaus Krause
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/jtag/drivers/stlink_usb.c