Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Can't connect to ST-Link-v1 / STM32VL Discovery #587

Closed
C44Supra opened this issue Apr 18, 2017 · 2 comments
Closed

[macOS] Can't connect to ST-Link-v1 / STM32VL Discovery #587

C44Supra opened this issue Apr 18, 2017 · 2 comments

Comments

@C44Supra
Copy link

I've been trying to get st-link going with my STM32VL Discovery board under Mac OSX Sierra (10.12.1). I have built st-link both from source and installed it with homebrew (but obviously removed one before I continued with the other). Both times I've encountered the same problem:

$ st-util -1
st-util 1.3.1
libusb: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access
2017-04-18T15:21:43 WARN src/sg.c: libusb_claim_interface() failed
2017-04-18T15:21:43 ERROR src/sg.c: Could not open stlink device

I've have installed the kext / driver from the "stlinkv1_macosx_driver" folder (for which I had to modify the last 10.10 case in install.sh to get it to install at all). I have the kext-dev-mode flag set although I have no idea how viable of a solution that still is under Sierra.

For good measure I rebooted, reconnected the board and tried again and got a different result:

$ st-util -1
st-util 1.3.1
2017-04-18T15:04:32 WARN src/sg.c: Failed to find an stlink v1 by VID:PID
2017-04-18T15:04:32 ERROR src/sg.c: Could not open stlink device

I checked the system profiler to see if the ST Link device showed up there, and it does:
stlink-git

I've googled the VendorID and ProductID and those seem to be correct for an ST Link V1.

After that I installed Ubuntu 17.04 in a VM under VMWare Fusion and built st-link from source, reconnected the board to the system, was asked by VMWare if I wanted to connect it to the VM and chose yes. Ran st-util -1 and the whole thing worked flawlessly.

Is there something I might be doing wrong on the OSX side of things? Is there perhaps a different kext instead of the 10.10 version?

To recap:

  • stlink built from a fresh git clone on OSX
  • can't claim usb device without kext installed
  • can't find device with kext installed
  • works perfectly fine using the same git clone under Ubuntu in a VM on the same exact system (no usb shenanigans necessary)
@xor-gate
Copy link
Member

xor-gate commented Apr 18, 2017

Duplicate of #574.

@Nightwalker-87 Nightwalker-87 added this to the v1.6.1 milestone Mar 17, 2020
@Nightwalker-87 Nightwalker-87 changed the title Can't connect to ST Link V1 / STM32VL Discovery on Mac OSX Sierra [mac] Can't connect to ST Link V1 / STM32VL Discovery on macOS Sierra Apr 5, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.1, Feedback required Apr 5, 2020
@Nightwalker-87 Nightwalker-87 modified the milestones: Old issues, v1.6.1 Apr 6, 2020
@Nightwalker-87 Nightwalker-87 self-assigned this Apr 6, 2020
@Nightwalker-87 Nightwalker-87 changed the title [mac] Can't connect to ST Link V1 / STM32VL Discovery on macOS Sierra [macOS] Can't connect to ST-Link-v1 / STM32VL Discovery Apr 6, 2020
Nightwalker-87 added a commit that referenced this issue Apr 7, 2020
Added documentation on how to solve a failed detection of the ST-Link-v1 
programmer in macOS v10.11 and later.
(Closes #574, #587)
@Nightwalker-87
Copy link
Member

Closed by commit 59c5cfd.

grevaillot pushed a commit to grevaillot/stlink that referenced this issue Apr 10, 2020
Added documentation on how to solve a failed detection of the ST-Link-v1 
programmer in macOS v10.11 and later.
(Closes stlink-org#574, stlink-org#587)
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants