Saturday, April 29, 2017

Installing OpenOCD on Windows WSL Ubuntu

While working on my OpenDPS Project I needed to use OpenOCD onw Windows. I cheated and used the one that came with VisualGDB running in a DOS Window:

from the \openocd\scripts directory:

C:\Users\gojimmypi\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg

but really, I want to have OpenOCD in Ubuntu.

So I downloaded it from or specifically:


and unzipped it:

tar -xzvf openocd_0.9.0.orig.tar.gz 

There's an INSTALL file that gives basic instructions:

sudo make install

if you don't use "sudo" on that last command, you'll get this wonderfully intuitive error:

(ho - and people wonder why Windows is so popular.. but I digress...)

Now from the /openocd/scripts directory, this command:

openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg

or simply:


from the /openocd directory.

well, it does not find my ST-LINK, or any other USB devices. It seems WSL does not recognize any of my USB ports.

$ lsusb
unable to initialize libusb: -99

On to installing the toolchain in a Debian VM....

If there are problems, well there's

No comments:

Post a Comment

comments are welcome, but I prefer not to allow links to promotions or other unrelated services.

ATECC508A Embedded Crypto - Next Impressions setting up AWS

The state of Internet of Things (IoT) Security is a disaster. Hardly a day goes by without news that some new product is discovered to also ...