Troubleshooting Common OpenOCD Problems

This page provides troubleshooting instructions for common OpenOCD problems that you may encounter with VisualGDB.

Couldn’t bind to TCL socket

Sometimes OpenOCD fails to start with the following error:

This happens when OpenOCD is not able to listen for incoming scripting connections on its default port. You can solve this by manually adding the following textat the beginning of the OpenOCD command line:

If you still get errors, try replacing 10240 with another number between 1024 and 65535.

Open Failed

Sometimes OpenOCD would fail to start the debug session displaying the “Error: Open Failed” message. It typically happens when the debug adapter (e.g. ST-Link) returns an error code and usually indicates problem with wiring, power, or JTAG pins. You can obtain more information about whereabouts of the problem by enabling the “Show debug output from OpenOCD” checkbox:If nothing helps, try erasing the target’s FLASH memory using a different tool (e.g. ST-Link Tool) or using a different debug probe.


Another reason for the “Open Failed” message could be a missing USB driver. This may also result in the LIBUSB_ERROR_NOT_SUPPORTED message. If this happens, make sure you are using the USB Devices view in Debug Settings so that VisualGDB can automatically check/install the USB drivers: