Showing results for 
Search instead for 
Did you mean: 

Remote access to ST-Link server

Associate II


I have recollections from a while ago, that it is possible to have an ST Link connected to one PC, and connect to it via ST Link server from another PC via a network. I have spent alot of time searching trying to find some information on this but have not been successful.

So my question is: Is it possible to have an ST Link connected to a usb port on a linux (ubuntu) system, and connect to that ST link via a network connection from a Windows (7) system? The IDE I am using is Atollic Studio. Can someone recoomand where I can find or provide some instructions on how to do this please?

Thanks in advance


Associate III

If I recall correctly, Atollic uses gdb. If this is true, you can run a gdb server on linux (e.g. openocd) and attach to that from Atollic. That answers the "is is possible part"; the specific details you'll have to work out.

Associate II

Hi Geoffrey

Thank you for your reply. Your suggestion of "openOCD" was they key and after a search I have found this page which has helped a bit

Currently I get this error when I try and connect:

"Failed to execute MI command:

target extended-remote localhost:3333

Error message from debugger back end:

localhost:3333: The system tried to join a drive to a directory on a joined drive."

I've not found a solution yet which fixes the problem. When I do I'll post it here

The ST-LINK firmware can be updated to J-Link OB, that might provide additional options/paths

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Associate II

Something about this thread bothers me.  Since stlink-server does its ide/daemon comms via TCP we SHOULD be able to run the ide on any other network connected PC and have the target board and stlink-server running from a separate PC, only using the stlink-server deamon as the gateway.

Unfortunately the stlink-server options only support [-p tcpport] and defaults to the loopback address  This makes it impossible to do remote PC debugging without resorting to iptables port forward trickery.

It seems very shortsighted that the stlink-server daemon doesn't allow selection of the listenning address as well as the port.

My point is that openOCD running on the target host PC should not be necessary if stlink-server simply provided the ability to bind a generic IP address.

I mean you miss. I use it on windows and in config.txt set port only. But it works ok for all interfaces.

@Echo off
cmd /K "ST-LINK_gdbserver.exe -c config.txt || echo GDB server exited"
Associate II

@MM..1I have no idea what you are saying.

1) is stlink-server a USB/TCP bridge application or is it a full-fledged GDBserver and USB/TCP bridge?  If if is a gdbserver then its utility is limited by not allowing binding to a routable IP address.

2) If the remote host (the one running stlink-server and having the target board connected via USB) must have an intermediary gdbserver instance running on it to bridge stlink-server and the (IDE running on a different PC) then there needs to be documentation on what that gdbserver setup is...It still should not require openOCD.

Associate II

re - DM00613038 ... Thanks.  Will take a look.