Skip to content

Commit 9bf2af2

Browse files
author
WereCatf
committed
Install udev-rules for ST-link
1 parent 4f2a602 commit 9bf2af2

4 files changed

Lines changed: 44 additions & 0 deletions

File tree

tools/linux/49-stlinkv1.rules

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# stm32 discovery boards, with onboard st/linkv1
2+
# ie, STM32VL
3+
4+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3744", \
5+
MODE:="0666", \
6+
SYMLINK+="stlinkv1_%n"
7+
8+
# If you share your linux system with other users, or just don't like the
9+
# idea of write permission for everybody, you can replace MODE:="0666" with
10+
# OWNER:="yourusername" to create the device owned by you, or with
11+
# GROUP:="somegroupname" and mange access using standard unix groups.

tools/linux/49-stlinkv2-1.rules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# stm32 nucleo boards, with onboard st/linkv2-1
2+
# ie, STM32F0, STM32F4.
3+
# STM32VL has st/linkv1, which is quite different
4+
5+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", \
6+
MODE:="0666", \
7+
SYMLINK+="stlinkv2-1_%n"
8+
9+
# If you share your linux system with other users, or just don't like the
10+
# idea of write permission for everybody, you can replace MODE:="0666" with
11+
# OWNER:="yourusername" to create the device owned by you, or with
12+
# GROUP:="somegroupname" and mange access using standard unix groups.

tools/linux/49-stlinkv2.rules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# stm32 discovery boards, with onboard st/linkv2
2+
# ie, STM32L, STM32F4.
3+
# STM32VL has st/linkv1, which is quite different
4+
5+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", \
6+
MODE:="0666", \
7+
SYMLINK+="stlinkv2_%n"
8+
9+
# If you share your linux system with other users, or just don't like the
10+
# idea of write permission for everybody, you can replace MODE:="0666" with
11+
# OWNER:="yourusername" to create the device owned by you, or with
12+
# GROUP:="somegroupname" and mange access using standard unix groups.

tools/linux/install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ if sudo [ -w /etc/udev/rules.d ]; then
55
sudo cp -v 45-maple.rules /etc/udev/rules.d/45-maple.rules
66
sudo chown root:root /etc/udev/rules.d/45-maple.rules
77
sudo chmod 644 /etc/udev/rules.d/45-maple.rules
8+
sudo cp -v 49-stlinkv1.rules /etc/udev/rules.d/49-stlinkv1.rules
9+
sudo chown root:root /etc/udev/rules.d/49-stlinkv1.rules
10+
sudo chmod 644 /etc/udev/rules.d/49-stlinkv1.rules
11+
sudo cp -v 49-stlinkv2.rules /etc/udev/rules.d/49-stlinkv2.rules
12+
sudo chown root:root /etc/udev/rules.d/49-stlinkv2.rules
13+
sudo chmod 644 /etc/udev/rules.d/49-stlinkv2.rules
14+
sudo cp -v 49-stlinkv2-1.rules /etc/udev/rules.d/49-stlinkv2-1.rules
15+
sudo chown root:root /etc/udev/rules.d/49-stlinkv2-1.rules
16+
sudo chmod 644 /etc/udev/rules.d/49-stlinkv2-1.rules
817
echo "Reloading udev rules"
918
sudo udevadm control --reload-rules
1019
echo "Adding current user to dialout group"

0 commit comments

Comments
 (0)