Dobrica Pavlinušić's random unstructured stuff
STM32discovery: Revision 2


dpavlin@blue:~$ lsusb | grep ST
Bus 003 Device 006: ID 0483:3744 SGS Thomson Microelectronics STLINK Pseudo disk

Install openocd

dpavlin@blue:~$ sudo apt-get install openocd
dpavlin@blue:~$ dpkg -l openocd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-====================================================
ii  openocd                 0.6.1-1          amd64            Open on-chip JTAG debug solution for ARM and MIPS sy

start openocd

Disable STLINKv1 SCSI emulation, see https://github.com/texane/stlink

root@blue:~# modprobe -r usb-storage && modprobe usb-storage quirks=483:3744:i

root@blue:~# sudo openocd -f /usr/share/openocd/scripts/board/stm32vldiscovery.cfg
Open On-Chip Debugger 0.6.1 (2012-12-05-01:32)
Licensed under GNU GPL v2
For bug reports, read
       http://openocd.sourceforge.net/doc/doxygen/bugs.html
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints