Okay, with my Mac Mini M1 I can confirm the above commit is causing the differences in openocd. But I am not so sure if libusb change is the real issue or not.
openocd/test/stm32 ❯ brew info libusb libusb: stable 1.0.24 (bottled), HEAD Library for USB device access https://libusb.info/ /opt/homebrew/Cellar/libusb/HEAD-a2b81ae (6 files, 769.3KB) * Built from source From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libusb.rb License: LGPL-2.1-or-later ==> Options --HEAD Install HEAD version ==> Analytics install: 60,921 (30 days), 194,606 (90 days), 818,103 (365 days) install-on-request: 6,327 (30 days), 18,921 (90 days), 78,245 (365 days) build-error: 0 (30 days) openocd/test/stm32 ❯ openocd -s /opt/homebrew/share/openocd/scripts -f board/stm32f4discovery.cfg Open On-Chip Debugger 0.11.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD srst_only separate srst_nogate srst_open_drain connect_deassert_srst Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 2000 kHz Info : STLINK V2J30S0 (API v2) VID:PID 0483:3748 Info : Target voltage: 2.876336 Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints Info : starting gdb server for stm32f4x.cpu on 3333 Info : Listening on port 3333 for gdb connections openocd/test/stm32 ❯ brew info libusb libusb: stable 1.0.24 (bottled), HEAD Library for USB device access https://libusb.info/ /opt/homebrew/Cellar/libusb/HEAD-32a2206 (6 files, 767.5KB) * Built from source From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libusb.rb License: LGPL-2.1-or-later ==> Options --HEAD Install HEAD version ==> Analytics install: 60,921 (30 days), 194,606 (90 days), 818,103 (365 days) install-on-request: 6,327 (30 days), 18,921 (90 days), 78,245 (365 days) build-error: 0 (30 days) openocd/test/stm32 ❯ openocd -s /opt/homebrew/share/openocd/scripts -f board/stm32f4discovery.cfg Open On-Chip Debugger 0.11.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD srst_only separate srst_nogate srst_open_drain connect_deassert_srst Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : clock speed 2000 kHz [1] 19689 segmentation fault openocd -s /opt/homebrew/share/openocd/scripts -f board/stm32f4discovery.cfg --- ** [tickets:#308] ST-link connect issue using latest libusb-1.0.dll** **Status:** new **Milestone:** 0.11.0 **Created:** Fri Jun 11, 2021 10:12 AM UTC by asier70 **Last Updated:** Wed Jun 23, 2021 02:52 AM UTC **Owner:** nobody For years I compile openocd and libusb-1.0 by myself from the newest sources (cross-compilation under ubuntu on Windows 10 for windows 10 x64). I noticed problem with the newest libusb-1.0.dll - I can't connect to st-link (ver. 2.1 and also 3). Log ends with: ~~~ Debug: 46 239 stlink_usb.c:3420 stlink_open(): stlink_open Debug: 47 243 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3744 serial: Debug: 48 248 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3748 serial: Debug: 49 255 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374b serial: Debug: 50 261 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374d serial: Debug: 51 269 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374e serial: Debug: 52 275 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374f serial: Debug: 53 280 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3752 serial: Debug: 54 289 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3753 serial: ~~~ and openocd is exited without any information like "open failed". Connecting to DAP-Link v2 with bulk works. This issue is for latest libusb-1.0.dll version 1.0.24.11627 (and 1.0.24.11623 as I checked). For older version 1.0.24.11608 all works fine: ~~~ Debug: 46 217 stlink_usb.c:3420 stlink_open(): stlink_open Debug: 47 221 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3744 serial: Debug: 48 226 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3748 serial: Debug: 49 234 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374b serial: Debug: 50 240 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374d serial: Debug: 51 246 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374e serial: Debug: 52 254 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x374f serial: Debug: 53 260 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3752 serial: Debug: 54 269 stlink_usb.c:3432 stlink_open(): transport: 4 vid: 0x0483 pid: 0x3753 serial: Info : 55 1722 stlink_usb.c:1318 stlink_usb_version(): STLINK V2J37M27 (API v2) VID:PID 0483:3752 Debug: 56 1729 stlink_usb.c:1543 stlink_usb_exit_mode(): MODE: 0x01 ~~~ Any suggestions? --- Sent from sourceforge.net because openocd-devel@lists.sourceforge.net 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.