Skip to main content
AHugh.2
Associate III
May 18, 2026
Question

Attempting a debug connection to a device with RDP protection gives misleading error message

  • May 18, 2026
  • 2 replies
  • 175 views

I just spent some time trying to get a debug session going in VSCode ony to be given the rather obscure error message: "bound doStepConnectToTarget Failed: could not connect (error 138): The system tried to join a drive to a directory on a joined drive."

Eventually I realised what it was - I had enabled RDP protection on the device (STM32C5) so of course it could not connect.

May I suggest that a more appropriate error message is given in such circumstances?

 

(this is with stlink gdb debugger, latest version.)

2 replies

Andrew Neil
Super User
May 18, 2026

This seems to be a generic GDB issue - nothing specific to ST.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Visitor II
June 15, 2026

I had the same error and hit the “Upgrade ST-Link firmware” option within the VS Code plugin and it worked for me.
My RDP level was already at 0 (AA). New NucleoL432KC being plugged in for the first time.