Openocd error "Can't find interface/stlink.cfg"

Hello, I’m having trouble getting ST Link-V3 debugger working with my Daisy Patch. I’m running Ubuntu 20.04.

I’m trying to flash blink onto my Patch. Steps I’m taking:

  1. Connect a USB data cable to the ST Link-V3, connect the ST Link-V3 to the Daisy Seed on my Daisy Patch, centered over the pins with the red stripe facing in the correct direction as per the documentation
  2. Power on Daisy Patch
  3. In a clone of the official daisy examples project, navigate to seed/Blink
  4. Run make clean; make; make program (I had trouble getting the vscode tasks to work so I just copied the make commands that the task “build_and_program” executes)

I get the following error from openocd during execution:

openocd -s /usr/local/share/openocd/scripts -f interface/stlink.cfg -f target/stm32h7x.cfg \
        -c "program ./build/Blink.elf verify reset exit"
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
embedded:startup.tcl:60: Error: Can't find interface/stlink.cfg
in procedure 'script' 
at file "embedded:startup.tcl", line 60
make: *** [../../libdaisy/core/Makefile:270: program] Error 1

Could anybody help me figure out what I’m doing wrong? Thanks!

Where did you install openocd from? The version 0.11.0 we bundle with the daisy toolchain includes a file scripts/interface/stlink.cfg. That’s here.

Apparently older versions come with a differently named version of that file. something like stlink-v2.cfg.

So the first two things I’d check are: “which version of openocd do I have?”. With openocd --version.

And “do I have that file or some variation of it?” For that you’ll need to cd to the folder where openocd is installed for you and look into the interface folder wherever it is.

Hi Ben, thanks for the reply.

This must be my problem then. I installed openocd via sudo apt-get and it looks like I have 0.10.0

ev@ubuntu:~/dev/daisy-projects$ openocd -v
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html

I’ll figure out how to get 0.11.0 installed. Thank you!

Seems like a likely cause, please report back what you find!
Makes me a bit wary since that’s the way we recommended people install it and I was under the impression the version distributed through apt was good.