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 https://launchpad.net/ubuntu/+source/openocd  or specifically:

wget https://launchpad.net/ubuntu/+archive/primary/+files/openocd_0.9.0.orig.tar.gz

and unzipped it:

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

There's an INSTALL file that gives basic instructions:

./configure
make
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:

./run-openocd.sh

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

https://answers.launchpad.net/ubuntu/
https://github.com/Microsoft/BashOnWindows/issues/


Copyright (c) gojimmypi all rights reserved. Blogger Image Move Cleaned: 5/3/2021 1:35:52 PM