From e4d1b934eb0fd325572e622bacdb107b0069d6c0 Mon Sep 17 00:00:00 2001
From: Jorge Aparicio <jorge@japaric.io>
Date: Thu, 9 Nov 2017 22:05:53 +0100
Subject: [PATCH] document how to set udev rules manually.

---
 doc/Quickstart.md | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/doc/Quickstart.md b/doc/Quickstart.md
index c048113..276306c 100644
--- a/doc/Quickstart.md
+++ b/doc/Quickstart.md
@@ -344,6 +344,25 @@ $ # for the NUCLE-F401RE
 $ openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x.cfg
 ```
 
+> **NOTE(Linux)** If you get a permission error when running OpenOCD then you'll need to change the
+> udev rules for the SWD programmer you are using. To do that create the following file at
+> `/etc/udev/rules.d`.
+>
+> ``` console
+> $ cat /etc/udev/rules.d/99-st-link.rules
+> # ST-LINK v2
+> SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE:="0666"
+>
+> # ST-LINK v2-1
+> SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666"
+>
+> # NUCLEO-F401RE
+> SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE:="0666"
+> ```
+>
+> With that file in place call the command `sudo udevadm control --reload-rules`. Then unplug and
+> re-plug your SWD programmer. That should fix the permission problem.
+
 You should see some output like this:
 
 ``` console
-- 
GitLab