cancel
Showing results for 
Search instead for 
Did you mean: 

How to use stlink-server?

SDomb
Associate

I've tried to use the stlink-server from here (in my understanding, it's a GDB server). And no success with gcc-arm-none-eabi-9-2020-q2-update toolchain: when I'm trying to

target connect localhost:7184

I have the following debug output from the stlink-server (and finally it just disconnects): 

Info : 27 102569 common.c:89 print_address_string(): Remote address: 127.0.0.1
Debug: 28 102569 sock_info.c:72 alloc_sock_info(): alloc_init_sock_info : Allocated 0x120008000
Debug: 29 102569 common.c:365 process_accept_event(): Added accepted socket 7 to list of sockets 
Debug: 30 102570 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received +$qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df
Debug: 31 102570 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 32 104574 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df
Debug: 33 104574 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 34 106580 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df
Debug: 35 106580 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 36 108585 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+#df
Debug: 37 108585 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 38 112599 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received -
Debug: 39 112599 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 40 114600 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received -
Debug: 41 114600 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 42 116603 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received -+$vMustReplyEmpty#3a
Debug: 43 116603 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 44 118608 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received $vMustReplyEmpty#3a
Debug: 45 118608 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 46 120615 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received $vMustReplyEmpty#3a
Debug: 47 120615 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 48 122619 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received $vMustReplyEmpty#3a
Debug: 49 122619 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 50 126630 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received -
Debug: 51 126630 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 52 128638 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received -
Debug: 53 128638 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Debug: 54 130646 stlink_tcp_cmd.c:1189 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : unknown command received -+
Debug: 55 130646 stlink_tcp_cmd.c:1191 process_stlink_tcp_cmd(): process_stlink_tcp_cmd : returned value 0 unknown_command
 
Error: 56 130646 common.c:428 process_read_event(): recv returned 0. Remote side has closed gracefully. Good.

What I'd like to understand is - how to use it? Is there any documentation that points to concrete scenarios?

2 REPLIES 2
Imen.D
ST Employee

Hello @SDomb​ ,

I think you're trying to start stlink-server and you should start ST-LINK_gdbserver (UM2576).

Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

I know about ST-LINK_gdbserver. But what's the use-case for stlink-server then, if it's not a GDB server?