cancel
Showing results for 
Search instead for 
Did you mean: 

No ST-LINK detected on STM32F4-Discovery on Arch Linux

AndrewEmbedded
Associate II

I'm trying to work with a STM32F4-Discovery board, and previously it connected perfectly okay, but a couple weeks ago something, seemingly out of nowhere, broke and CubeIDE stopped detecting the board and writing programs to it showing this message:

AndrewEmbedded_0-1759736112145.png

I tried reinstalling the IDE, downgraging the toolchain, upgrading the IDE, creating a fresh project and so on.

I'm running version 1.19.0 CubeIDE, using EndeavourOS (Arch-based).

Here are my udev rules for a relevant device:

# stm32 nucleo boards, with onboard st/linkv2-1
# ie, STM32F0, STM32F4.

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
    MODE="660", GROUP="plugdev", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1", \
    SYMLINK+="stlinkv2-1_%n"

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3752", \
    MODE="660", GROUP="plugdev", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1", \
    SYMLINK+="stlinkv2-1_%n"

My user is a member of the plugdev group.

 But the important detail is that if I run stm32cubeide_wayland as root through sudo it is able to detect the board. (Still doesn't run the project, but that's because I don't have it setup for root either way.)

Edit:
Here's how it looks when I run stm32cubeide_wayland as root user:

AndrewEmbedded_0-1760379943185.pngAndrewEmbedded_1-1760379980689.png

While not root STLinkUpdate gives this:

AndrewEmbedded_2-1760380043638.png

And trying to run it gives the aforementioned ST-LINK firmware verification.

20 REPLIES 20

Thanks for providing the solution!

I had the same issue with Fedora 43 and CubeIDE 2.x (newest at the time writing this).

STM32CubeIDE installed as normal user but root/sudo password given during installation.

Debug session worked only when the "ST-LINK_gdbserver" (with its long path) was started using "sudo".

I replaced the GROUP to be "dialout", certainly the "plugdev" was not enough.

Need to dig in bit more, I guess, since the older versions seem to work ok with "plugdev". Apart from OS update

the difference seems to be that plugdev has been create by system (in e.g. Debian) whereas I created it manually

in F43 - this based on the numeric group id (46 in Debian, 1001 in F43). So the issue may be in either OS setup

or CubeIDE (v 2.x) installation - at least in my case.