X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=README;h=fbd75c10744bdcd50f663a24d02378029c825693;hb=08a79ed0fe770d11a06c7b661f9ee542a7d8d85b;hp=920786ebf407b57d062bafbfbba5ac5484630004;hpb=7c294cf6a19fa8c682138097381d3af80f1a9c80;p=fw%2Fstlink diff --git a/README b/README index 920786e..fbd75c1 100644 --- a/README +++ b/README @@ -1,6 +1,12 @@ HOWTO ===== +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 @@ -26,6 +32,17 @@ Starting program: /home/whitequark/ST/apps/bally/firmware.elf Remember that you can shorten the commands. `tar ext :1111' is good enough for GDB. +Setting up udev rules +===================== + +For convenience, you may install udev rules file, 10-stlink.rules, located +in the root of repository. You will need to copy it to /etc/udev/rules.d, +and then either reboot or execute +$ udevadm control --reload-rules + +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. + Running programs from SRAM ==========================