OpenOCD init fails when programming via STLINK-V3MINIE

I’m using the ST-LINK MINIV3E debugger connected like this:

I am getting this error

Error: open failed
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked

Is this debugger supported? I thought it was the same as the miniv3 but with a usb-c port.

FWIW I can see it in STM32CubeProgrammer

  22:21:28 : ST-LINK SN  : 0023000E4D4B500E20373831
  22:21:28 : ST-LINK FW  : V3J8M3
  22:21:28 : Board       : STLINK-V3MINIE

It looks like the pinouts are the same so it should be compatible with the regular miniv3. I think it’s probably some sort of issue in the makefile that can’t find it

I thought maybe I needed a new interface to use in the libDaisy/core Makefile but it looks like the stlink.cfg one should cover all V3 debuggers. OpenOCD/tcl/interface at mainline_master · arduino/OpenOCD · GitHub

I noticed a missing feature in the comparison, could this be the reason it won’t recognize it? I assumed the openocd uses JTAG but I’m not totally sure.

Installed this driver but it’s still not working.

I was able to flash a compiled blink.hex onto the seed using the st-link in stm32cubeprogrammer so I know everything is working correctly. I think this is probably a configuration issue with libDaisy.

I’m not sure about your particular error, but I’ve been using the MINIE with both a seed and submodule (on macOS).

A few details about how I got it working here: Patch.Init() and stlinkv3 - #9 by whatnot.

1 Like

Hey this worked for me thank you!

For anyone who comes across this, I installed openocd 0.12 from here and placed it into my DaisyToolChain. Then I set the OCD var in libDaisy/core/Makefile

OCD=/c/Program\ Files/DaisyToolchain/OpenOCD-20230202-0.12.0/bin/openocd.exe

It looks like the debugger still uses the other openocd, I’m not sure where to change that.

If you go to settings and search for “cortex-debug.openocdPath” you can enter it in the settings.json file like this:

"cortex-debug.openocdPath": "C:/windows/style/path/with/forward/slashes/openocd"

Thank you so much for documenting all of this. It’ll be helpful for users trying to get STLINK-V3MINIE working in the future.