Hello,
I am working on Lubuntu 20.04
I want to program an STM32 card via an ST-LINK / V2 with ARDUINO IDE software.
But the problem is that my ST-LINK / V2 is not associated with the dev / ttyUSB0 port by lubuntu 20.04
I installed Arduino IDE 1.8.13 which:
- works well, because I can program UNO cards
- correctly detects my CH341-uart as a usb dev/ttyUSB0 port, and manages to upload a program to my STM32 card.
On the other hand, when I plug in my ST−LINK/V2: it is not detected by ARDUINO IDE => the port menu remains grayed out!
I do not understand why ?
I created the rules.d with this command:
sudo tee /etc/udev/rules.d/60-st-linkv2.rules << EOF
# STMicroelectronics ST-LINK/V2
SUBSYSTEM=="usb", ATTR{idVendor}=="0483", ATTR{idProduct}=="3748", MODE:="0664", GROUP="plugdev", SYMLINK+="st-link_v2"
EOF
sudo service udev reload
But nothing, I also tried to install the rules of stm32Duino (49-stlinkv2.rules) via command install.sh
=> the files are present in dev/rules.d
=> I stopped / started the computer
=> connected / reconnected the VT−LINK / V2
But still no detection by ARDUINO IDE of the ST−LINK/V2 port!
Contrariwise if I make an lsusb in the terminal I can see the ST-LINK
lsusb
Bus 002 Device 003: ID 0483:3748 STMicroelectronics ST-LINK/V2
The authorizations are:
ls -l /dev/bus/usb/002/003
crw-rw-rw-+ 1 root plugdev 189, 130 janv. 22 09:49 /dev/bus/usb/002/003
groups cricri
cricri : cricri adm tty dialout cdrom sudo dip plugdev lpadmin sambashare
I also installed stlink:
st-info --probe
cricri@cricri-cybox:~$ st-info --probe
Found 1 stlink programmers
version: V2J29S7
serial: 323d09013212354d434b4e00
hla-serial: "\x32\x3d\x09\x01\x32\x12\x35\x4d\x43\x4b\x4e\x00"
flash: 131072 (pagesize: 1024)
sram: 20480
chipid: 0x0410
descr: F1xx Medium-density
And what happens when I plug / unplug a CH341 and the ST-LINK :
[ 3030.468032] usb 2-1: new full-speed USB device number 5 using ohci-pci
[ 3030.692031] usb 2-1: New USB device found, idVendor=1a86, idProduct=5523, bcdDevice= 3.04
[ 3030.692037] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3030.695188] ch341 2-1:1.0: ch341-uart converter detected
[ 3030.713265] usb 2-1: ch341-uart converter now attached to ttyUSB0
[ 3035.727792] usb 2-1: USB disconnect, device number 5
[ 3035.728051] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 3035.728077] ch341 2-1:1.0: device disconnected
[ 3042.440919] usb 2-1: new full-speed USB device number 6 using ohci-pci
[ 3042.685912] usb 2-1: New USB device found, idVendor=0483, idProduct=3748, bcdDevice= 1.00
[ 3042.685917] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3042.685919] usb 2-1: Product: STM32 STLink
[ 3042.685921] usb 2-1: Manufacturer: STMicroelectronics
[ 3042.685923] usb 2-1: SerialNumber: 2= 25MCKN
[ 3048.666560] usb 2-1: USB disconnect, device number 6
Here I do not understand why my ST − LINK / V2 is not attached to the ttyUSBx port as it does for my CH341-uart?
Thank you in advance if someone can enlighten me because there I have been drying for quite a few days ...
Have a good day.