Getting ST Link + Cortex Debugger working on Ubuntu

I just got my STLINK-V3-MINIE and spent the last dayish getting it working. Figured i’d put this here in case it helps anyone else.

Here is the list of things I had to install myself.

openocd >= 0.12.0

I first attempted to just install from apt but I couldn’t find any published versions greater than 0.11.0. So instead I built my installation from source which was pleasantly painless. I did forget to utilize the --enable-stlink flag while configuring which caused me some hiccups but nothing crazy. Just re configured and re built. If you also mess up and forget the --enable-stlink flag you must make uninstall before make install’ing again

libusb > 1.0

This was needed for utilizing STLink within openocd. libusb-1.0-0-dev did it for me. If your not building openocd from source you might be able to omit this.

ST32CubeProgrammer = LTS

This is probably not needed, But i installed it while trying to get stuff working and was greeted with a decent interface for debugging, and also validation that my debugging chip was successfully connecting to my daisy seed which was reassuring. So install this if you want, or ignore it.


For some reason cortex debug wasn’t working with openocd as the GDB server. I saw that cortex debug does support the GDB server that is packaged with the ST32CubeIDE so I wen’t ahead and grabbed that. Once that was installed I was able to utilize cortex debug just fine within vscode.

1 Like