ST-Link Docker / OpenOCD problem
We are currently shifting from using CubeIDE to a Docker + VS-Code combo and this works great for compiling but debugging still has some challenges.
On Linux it seems to work (for the colleagues I spoke to) but on Windows we still have some issues.
Forwarding the ST-Lin USB port using usbipd works but as soon as I step away from my laptop to have a coffee break or lunch, things go wrong: The right LED blinks red/green when debugging or just red when I stop debugging as long as things work but after a break both LEDs are green and OpenOCD refuses to connect to the ST-Link with an “ Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND” message.
At that time, “usbipd list” still reports the ST-Link is attached to WSL/Docker and lsusb also shows the device being available in my docker container (and yes, this is in a terminal window in VS-Code)
I can get it to run again most of the time by restarting the container and/or quiting/restarting VS-Code but that not always works.
Rebooting the laptop always works but that is of course not an ideal situation.
I tried the obvious and disabled the “Allow this computer to turn off this device to save power” in the device manager but that does not seem to work so any tips would be great.
My system is a Thinkpad P14, Windows 11 with ST-Link-V3. I use Docker Desktop with the default WSL (Ubuntu 26.04 LTS) release and the arm-none-eabi tools from the ARM website. OpenOCD is not the specific ST version but still the standard Ubuntu one (v 0.12.0).
Any tips on getting this setup more stable are welcome.
Rob
