"Timeout waiting for gdb server to start" when trying to debug

Trying to start debugger, blinky example program, FRDM-K64 board. I get “Timeout waiting for gdb server to start”.

EDIT: found more info. I looked through the Mbed Studio log file, and saw that it is calling pyocd-gdbserver with these arguments:

“gdbServerArguments”:[“gdbserver”,"–uid",“000059305636”,"–target",“MK64FN1M0xxx12”,"–erase=chip","–pack",“c:\Users\Mike\AppData\Local\Mbed Studio\mbed-studio-tools\cmsis-packs\Keil.Kinetis_K60_DFP.1.5.0-small.pack”]

So I tried running pyocd-gdbserver manually with those arguments and I get:
error: unrecognized arguments: --uid 000059305636 --erase=chip

If I remove those two arguments above, it runs, but I get:

"WARNING:gdb_server:pyocd-gdbserver is deprecated; please use the new combined pyocd tool"

It looks like when I installed Mbed Studio it installed an older version of pyocd-gdbserver(?) But if do: Help–>Check for tools updates it shows that all my tools are up to date.

EDIT: I am using a Segger J-Link debug probe.

Hi @mecono,

Unfortunately, using Segger J-Link with Mbed Studio is not currently supported. Have you tried connecting directly to the K64F board using micro-usb?


Matthew Gordon
Mbed Studio team

1 Like

Thanks for the quick reply. We are actually developing a custom board/assembly that is based on the K64F board SWD interface alone. We are using Mbed in our move from the current custom OS. What is the most common debugging configuration that is used? Thanks.

Hi @mgordon01, thanks for your reply. Actually as @sklatham94 mentioned our board is similar to FRDM-K64F but not identical. I was just using FRDM-K64F as a starting point for debugging.

So, which Debug probes does Mbed Studio support? For me it is a must to have a JTAG probe connected via the 10-pin header. On our custom board micro-USB is not an option.



Hi @mecono & @sklatham94,

Mbed Studio officially supports debug using the built-in interface chips on these development boards: https://os.mbed.com/platforms/?q=&Mbed+Studio+support=Debug

We do not test with individual debug probes, but Mbed Studio’s debug support is powered by pyOCD so you may make progress with the probes on this list: https://github.com/mbedmicro/pyOCD#requirements.

Hope that helps,

Hi All,

I have the same issue as @mecono with the gdb sever timeout. I’m using a J-Link with a custom STM (STM32L151CC) board.

However, I have a little more luck as if I try and start the server manually with the gdbServerArguments I get:
"Waiting for a debug probe matching unique ID '000260116600' to be connected..."

“pyocd list” shows the probe with the ID 260116600. Taking those 3 zeros off the front it starts the server fine, so it looks like wherever it’s generating the arguments to pass it’s messing with the ID? I’m very new to all this so have no idea how it’s generating the arguments. Perhaps someone can point me in the right direction to what can be done to correct the arguments?


Hi Tristan,

What version of pyOCD are you using? The previous version of pyOCD (027.0) that was shipped with Studio had a bug in JLink support. It has been fixed in version 0.27.1 (https://github.com/pyocd/pyOCD/releases/tag/v0.27.1). A new release of Studio has been created today. It now includes pyOCD 0.27.3

Arek - Mbed Studio team

Hi Arek,

Thanks for the reply, sorry I must have missed the notification. I tried various versions previously, I upgraded to 0.28.3 and back to 0.27.3 this time (after updating to the lasted release of studio). It still has the same error timing out. I don’t think it’s a pyocd issue as the server starts as it should through command prompt, I believe it is just getting the wrong ID fed to it.