First, load the sg kernel module.
# modprobe sg
+On Ubuntu you need to install the package libsgutils2-dev:
+# sudo apt-get install libsgutils2-dev
+
To run the gdb server, do (you do not need sudo if you have set up
permissions correctly):
$ make -C build && sudo ./build/st-util 1234 /dev/sg1
Udev will now create a /dev/stlink file, which will point at appropriate
/dev/sgX device. Good to not accidentally start debugging your flash drive.
-Setting up modprobe rules
-=========================
-
-You may install a modprobe rules file, stlink.modprobe.conf, located in
-the root of the repository. You will need to copy it to /etc/modprobe.d
-and then
- $ rmmod usb-storage
-If you have usb-storage built as a module, then this will cause it to be
-loaded with a "quirks" parameter that will cause it to ignore the STLink,
-rather than causing repeated errors and resets.
-
Running programs from SRAM
==========================