|
From: yyjdelete <yyj...@us...> - 2022-10-28 06:36:44
|
Sorry for the delay, I lost the device for some time and finally found it. I tried https://review.openocd.org/c/openocd/+/7279 and it works for the device lsusb -v for the device(the one with `CMSIS-DAP` in name of CDC, and NOT KitProg3) ~~~ Bus 001 Device 008: ID c251:f001 Keil Software, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0xc251 Keil Software, Inc. idProduct 0xf001 bcdDevice 1.00 iManufacturer 1 jixin.pro iProduct 2 CMSIS-DAP_LU iSerial 3 LU_2022_8888 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 107 bNumInterfaces 3 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 2 Communications bFunctionSubClass 2 Abstract (modem) bFunctionProtocol 1 AT-commands (v.25ter) iFunction 4 CMSIS-DAP CDC Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 Communications bInterfaceSubClass 2 Abstract (modem) bInterfaceProtocol 0 None iInterface 4 CMSIS-DAP CDC CDC Header: bcdCDC 1.10 CDC Call Management: bmCapabilities 0x01 call management bDataInterface 1 CDC ACM: bmCapabilities 0x02 line coding and serial state CDC Union: bMasterInterface 0 bSlaveInterface 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 2 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 10 CDC Data bInterfaceSubClass 0 Unused bInterfaceProtocol 0 iInterface 5 CMSIS-DAP DCI Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 6 CMSIS-DAP_LU HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.00 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 33 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Device Status: 0x0000 (Bus Powered) ~~~ --- ** [tickets:#368] openocd don't proper fallback and not work on cmsis-dap-v1(hid) with `CMSIS DAP` in name of its usb serial** **Status:** new **Milestone:** 0.11.0 **Created:** Sat Oct 15, 2022 04:08 AM UTC by yyjdelete **Last Updated:** Fri Oct 21, 2022 05:38 PM UTC **Owner:** nobody Some cmsis-dap-v1 devices has an usb serial and `CMSIS DAP` in it's name. Seems openocd choose to workaroud bug for `KitProg3` by search `CMSIS DAP` in all usb devices, and not only WinUSB, but it also broken supported for all cmsis-dap-v1(hid) devices with an usb serial and `CMSIS DAP` in the name of serial(it will use cmsis-dap-v2 and failed) https://github.com/openocd-org/openocd/blob/v0.12.0-rc1/src/jtag/drivers/cmsis_dap_usb_bulk.c#L249-L273 One workaround is make a copy of `cmsis-dap.cfg`, add `cmsis_dap_backend hid` to the new file and use the new one. But maybe it should works out of box by add an separately `cmsis-dap-v1.cfg`, do auto fallback to v1, use whitelist for special error devices, or use blacklist for usb serial with `CMSIS DAP` in name. https://github.com/openocd-org/openocd/blob/v0.12.0-rc1/src/jtag/drivers/cmsis_dap_usb_bulk.c#L340-L342 Not sure, but should it also return FAIL here to make an fallback like all other place does? Many error report can be found on the web. https://www.google.com/search?q=Warn+%3A+Using+CMSIS-DAPv2+interface+1+with+wrong+class+10+subclass+0+or+protocol+0 https://github.com/search?q=cmsis_dap_backend+hid&type=issues --- Sent from sourceforge.net because ope...@li... is subscribed to https://sourceforge.net/p/openocd/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |