stlink: add usb pid for v2.1 without mass storage device
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 23 Sep 2018 07:53:30 +0000 (09:53 +0200)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 6 Dec 2018 10:02:33 +0000 (10:02 +0000)
New version of ST-Link/V2.1 without mass storage device.
From debug point of view, it is compatible with existing ST-Link/V2.1
It uses a new USB PID because the USB endpoints and interfaces are
different from usual ST-Link/V2.1

Add the new PID in the driver, in the tcl interface script and in the
udev configuration script.

Change-Id: Id2e1b5a5d0347c5d951a86a9cdb76be52cfd4ea3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4702
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
contrib/60-openocd.rules
src/jtag/drivers/stlink_usb.c
tcl/interface/stlink.cfg

index 692e1b10bfe89dc92d6b3b2f1ccff53e825a94aa..9d18e369d58cae25a405e8d19f9ffba9c4b25fa6 100644 (file)
@@ -63,6 +63,7 @@ ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="660", GROUP="plugdev",
 
 # STLink v2-1
 ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE="660", GROUP="plugdev", TAG+="uaccess"
+ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3752", MODE="660", GROUP="plugdev", TAG+="uaccess"
 
 # Cypress KitProg in KitProg mode
 ATTRS{idVendor}=="04b4", ATTRS{idProduct}=="f139", MODE="660", GROUP="plugdev", TAG+="uaccess"
index d9ca53e29cb77ecce334ef0db42da8e05305508e..6e6ad1b5bcab6431e52ac829d4d720a163703df3 100644 (file)
@@ -63,6 +63,7 @@
 #define STLINK_V1_PID         (0x3744)
 #define STLINK_V2_PID         (0x3748)
 #define STLINK_V2_1_PID       (0x374B)
+#define STLINK_V2_1_NO_MSD_PID  (0x3752)
 
 /* the current implementation of the stlink limits
  * 8bit read/writes to max 64 bytes. */
@@ -2063,6 +2064,7 @@ static int stlink_usb_open(struct hl_interface_param_s *param, void **fd)
                                h->trace_ep = STLINK_TRACE_EP;
                                break;
                        case STLINK_V2_1_PID:
+                       case STLINK_V2_1_NO_MSD_PID:
                                h->version.stlink = 2;
                                h->tx_ep = STLINK_V2_1_TX_EP;
                                h->trace_ep = STLINK_V2_1_TRACE_EP;
index d747d8533c401d739f33e4d69671fff984b94587..f7f70c88a5c6e6f469e15db689cfbcb8572694e8 100644 (file)
@@ -6,7 +6,7 @@
 interface hla
 hla_layout stlink
 hla_device_desc "ST-LINK"
-hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b
+hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x3752
 
 # 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