Skip to main content
Explorer
November 4, 2025
Question

[Linux] STM32Cube for VS Code: /dev/ttyACM0 + Debugging issues fixed with STSW-LINK007 + libusb-1.0

  • November 4, 2025
  • 1 reply
  • 185 views

Context

Fresh Ubuntu 24.04, STM32 board (ST-LINK/V2-1 0483:374b), STM32Cube for VS Code 3.6.4.
Out of the box, both Serial Monitor and debugging failed:

**** Failed to open the serial port /dev/ttyACM0 ****

Adding myself to dialout didn’t help; debugging couldn’t connect to any target.

Root cause

STM32Cube for VS Code doesn’t install udev rules or USB deps for ST-LINK on Linux. Result:

  • /dev/ttyACM* gets recreated with restrictive perms on each replug.

  • The debug adapter (ST custom DAP / libusb backend) can’t init properly.

Fix (repeatable)

  1. Install USB dependency + ST udev rules

sudo apt update
sudo apt install libusb-1.0

Download STSW-LINK007, then follow itsreadme.txt.

  1. Replug the board and verify:

ls -l /dev/ttyACM*
# example:
# crw-rw----+ 1 root dialout 166, 0 Nov 4 16:39 /dev/ttyACM0
  1. Verify debugging in VS Code
    Run: Run & Debug → STM32Cube: ST-LINK GDB Server.
    Debug now starts normally with ST-LINK/V2-1 and Cube 3.x.

    This topic has been closed for replies.

    1 reply

    ST Employee
    November 5, 2025

    @saacifuentesmu 
    Thanks for sharing, and well done!
    Currently, the same applies to Windows OS but with a different package: https://www.st.com/en/development-tools/stsw-link009.html. W
    e are pointing these Thanks resources shortcut:
    vincent_grenet_0-1762324026337.png
    As part of our roadmap, we are working on smarter integration of all these features.