SOLVED: "Failed to launch OpenOCD GDB Server: Timeout" when using VSCode to debug

those of you who were attempting to debug the odrive using VSCode in mac and ubuntu environments and recently may have gone to Debug->Start debugging and received the message:

Failed to launch OpenOCD GDB Server: Timeout

I received this message on both macOS and ubuntu 18.04 platforms

Over at the cortex-debug repo there was an issue posted:

that said this problem was related the fact that brew is installing outdated versions of openocd. I have corrected this on my mac using the following steps:

$ brew install libtool
$ brew install texinfo
$ brew unlink open-ocd
$ brew install open-ocd --HEAD

I have yet to fix it on ubuntu but assume it’s a similar problem.

1 Like

Thanks Owen_White for posting.
For anyone running ubuntu 16 with openocd 0.9 and getting that message recently, installing openocd 0.10 (you have to build and install from source) can resolve the issue (it did for me).

1 Like