I’m using VS code and STLINK V3 MINIE, on Windows 10.
Error in terminal:
in procedure ‘program’
** OpenOCD init failed **
shutdown command invoked
I’m trying to follow the process outlined here - OpenOCD init fails when programming via STLINK-V3MINIE - #5 by angrydan
..but I’m unsure of some of the steps.
I’ve downloaded the newest version of openocd, unzipped and moved the openocd.exe file to my Daisy Toolchain. Then in setting.json I’ve added the file path for the new openocd in the quotes where it previously showed:
“cortex-debug.openocdPath”: “”
But I still get the same error when attempting to program seeds. Any ideas? I was easily programming seeds for years up until yesterday, I’m guessing there was an update somewhere. The ST Link is showing in my devices so my PC is registering it.
I re-installed DaisyTookchain and I still get the same error
I reinstalled libdaisy in case there was an issue there but openocd init is still failing. Full error message:
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: open failed
** OpenOCD init failed **
shutdown command invoked
embedded:startup.tcl:1893: Error:
Traceback (most recent call last):
File “embedded:startup.tcl”, line 1928, in program
program_error {** OpenOCD init failed **} 1
File “embedded:startup.tcl”, line 1893, in program_error
shutdown error
make: *** [../../libDaisy/core/Makefile:332: program] Error 1
- The terminal process “C:\Program Files\Git\usr\bin\bash.exe ‘–login’, ‘-i’, ‘-c’, ‘make clean; make; make program’” terminated with exit code: 2.
Any advice or possible solutions are greatly appreciated
I got it working. The problem turned out to be my PC’s USB socket, I soldered in a new one and it programs fine. Strange because the PC detected the ST link and was even able to upload new firmware to it, I suppose just one or two of the connections were failing. Top mounted USB sockets are a bad idea, so vulnerable to dust and debris!