STLink Install Fails

Post Reply
doctek
Posts: 3
Joined: Mon Oct 12, 2020 11:40 pm

STLink Install Fails

Post by doctek »

Trying to install STlink from https://github.com/stlink-org/stlink. Downloaded stlink-1.6.1-1_amd64.deb and tried to install with

sudo apt install ./stlink-1.6.1-1_amd64.deb

from the directory the deb is in.

Here is the error that resulted.: (lots deleted that went just fine.)
The following NEW packages will be installed:
stlink
0 upgraded, 1 newly installed, 0 to remove and 258 not upgraded.
8 not fully installed or removed.
Need to get 0 B/165 kB of archives.
After this operation, 846 kB of additional disk space will be used.
Get:1 /home/jim/Downloads/stlink-1.6.1-1_amd64.deb stlink amd64 1.6.1-1 [165 kB]
(Reading database ... 515962 files and directories currently installed.)
Preparing to unpack .../stlink-1.6.1-1_amd64.deb ...
Unpacking stlink (1.6.1-1) ...
dpkg: error processing archive /home/jim/Downloads/stlink-1.6.1-1_amd64.deb (--unpack):
trying to overwrite '/etc/udev/rules.d/49-stlinkv2-1.rules', which is also in package st-stlink-udev-rules 1.0.0
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/home/jim/Downloads/stlink-1.6.1-1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Needless to say, the offending dev rule is NOT in /etc/udev/rules.d.
ls /etc/udev/rules.d
25-vc500.rules 49-node.rules 70-snap.core.rules
49-arduino.rules 49-stlinkv2.rules 70-snap.obs-studio.rules
49-cameo.rules 49-stlinkv3.rules 80-canon_mfp2.rules
49-ftdi.rules 49-teensy.rules 99-jlink.rules
49-megaCNC.rules 51-android.rules
49-mega.rules 70-persistent-net.rules
I'm hung out to dry until this is resolved. Any help much appreciated.
hennep
Posts: 10
Joined: Wed Jan 15, 2020 2:10 pm
Location: Netherlands

Re: STLink Install Fails

Post by hennep »

I can help you with the contents of the file

Code: Select all

$ ls /etc/udev/rules.d                                                                                                                                             

45-maple.rules  49-stlinkv1.rules  49-stlinkv2-1.rules  49-stlinkv2.rules  60-openrgb.rules  70-snap.core.rules  70-snap.mc-installer.rules

$ cat 49-stlinkv2-1.rules

# stm32 nucleo boards, with onboard st/linkv2-1
# ie, STM32F0, STM32F4.
# STM32VL has st/linkv1, which is quite different

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
    MODE:="0666", \
    SYMLINK+="stlinkv2-1_%n"

# If you share your linux system with other users, or just don't like the
# idea of write permission for everybody, you can replace MODE:="0666" with
# OWNER:="yourusername" to create the device owned by you, or with
# GROUP:="somegroupname" and mange access using standard unix groups.
I wouldn't know how to solve the problem. Maybe a manual installation.
I saw your post on github
Did you post this on a Linux forum as well?

What you can try, plug in the stlink programmer and run "dmesg" from the console. On my laptop dmesg shows:

Code: Select all

[ 6310.732348] usb 1-1: new full-speed USB device number 7 using xhci_hcd
[ 6310.881805] usb 1-1: New USB device found, idVendor=0483, idProduct=3748, bcdDevice= 1.00
[ 6310.881810] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6310.881814] usb 1-1: Product: STM32 STLink
[ 6310.881817] usb 1-1: Manufacturer: STMicroelectronics
edit one of the stlink configuration files and change idVendor and idProduct to match the numbers from dmesg.
When the creation of the configuration files was the last step of the installation process, you might be lucky :-)
doctek
Posts: 3
Joined: Mon Oct 12, 2020 11:40 pm

Re: STLink Install Fails

Post by doctek »

Thanks for your response!

However, the actual udev rules are not the problem. I have had the Stlink running and have used it for development just fine.

What I am trying to do is install the open source version so I can use the STLink gui as shown in the Phil's Lab youtube and other places. Since I am using ubuntu, I can't use the ST supplied STlink which is for windows only. As I read the error message, the install fails. I never get to the point of reading the udev rules.

Yes, I have posted to the github for the open source STLink as well. No response so far. I haven't tried any other forums, Can you suggest which ones might be able to help?

Thanks!
doctek
Posts: 3
Joined: Mon Oct 12, 2020 11:40 pm

Re: STLink Install Fails

Post by doctek »

Since I don't seem to be getting anywhere with posting this problem, I decided to try the obvious next step and build from source. I followed the instructions on github.com/stlink-org/stlink. Worked perfectly! I now have that version of st-link running.

Thanks for your attention and response! On to my project!
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STLink Install Fails

Post by fpiSTM »

doctek wrote: Thu Oct 15, 2020 8:54 pm I can't use the ST supplied STlink which is for windows only.
STM32CubeProgrammer is multi OS: Windows, Linux and MacOS
Post Reply

Return to “STLink”