Skip to main content
Explorer II
May 16, 2025
Question

st-info --probe only works with sudo on M1 Mac (macOS)

  • May 16, 2025
  • 2 replies
  • 426 views

Hi, When I run st-info --probe as a normal user, I get:

$ st-info --probe
libusb: warning [darwin_detach_kernel_driver] USB device capture requires either an entitlement (com.apple.vm.device-access) or root privilege
Found 0 stlink programmer

Only when I prefix with sudo do I see my ST-Link appear:

 
$ sudo st-info --probe
Found 1 stlink programmer
version: 2
...

Platform & Environment:

  • Host: Apple M1 MacBook Air

  • macOS Version: Monterey / Ventura (tested both)

  • ST-Link Tools: Installed via Homebrew (brew install stlink)

  • libusb: system-provided (no special libusb-compat)


I reinstalled stlink via Homebrew and tried other versions, but the problem still occurs intermittently: sometimes I can probe normally as a non-root user, and other times I need to use sudo. On top of that, PlatformIO also requires sudo to upload code. Any help would be greatly appreciated.


My Question:
How can I grant non-root access to ST-Link on Apple Silicon so that st-info --probe works as a normal user? Is there an official codeless kext or entitlement plist I should use, or another Homebrew-friendly workaround?

 

    This topic has been closed for replies.

    2 replies

    Super User
    May 18, 2025

    Consider submitting an issue report for the project. Not many people here using it.

    stlink-org/stlink: Open source STM32 MCU programming toolset

    or using the supported STM32CubeProgrammer software.

    Explorer
    May 19, 2025

    On Unix/Linux, a normal user must be member of a specific group (e.g. dialout) to use such devices.
    I am only superficially familiar with Macs, but AFAIK they use a Unix foundation, so you might need to do the same.

    Try the "groups <user>" command.