Skip to content

Instantly share code, notes, and snippets.

@anjomro
Last active May 31, 2018 11:27
Show Gist options
  • Save anjomro/33294e9014837c04c80368e70177e8e2 to your computer and use it in GitHub Desktop.
Save anjomro/33294e9014837c04c80368e70177e8e2 to your computer and use it in GitHub Desktop.
Fix permissions to upload to stm32
#!/bin/sh
sudo sh -c 'cat > /etc/udev/rules.d/49-stm32.rules' <<EOF
# 0483:5740 - STM32F4 Dsicovery in USB Serial Mode (CN5)
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740",
MODE:="0666"
# 0483:df11 - STM32F4 Discovery in DFU mode (CN5)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11",
MODE:="0666"
EOF
sudo udevadm control --reload-rules
@anjomro
Copy link
Author

anjomro commented May 31, 2018

Here's the fix @Paul0x2A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment