cancel
Showing results for 
Search instead for 
Did you mean: 

No ST-LINK detected! - Nucleo F303K8T6 - Cube IDE 1.11.2 - (GDB Server not started)

Tobe
Senior III

I already spend many hours trying to figure out why flashing the nucleo does not work.

What i found out so far:

ST-LINK_gdbserver.exe is not started from IDE. Starting it with the copied commandline, it only works with a port other than the default one. When it is started, the LED of the nucleo starts flashing green/red (!).

I can launch stlinkserver and gdb server, so that they are running, but still i got the problem. I already tried many options as openOCD, checking the ST-LINK S/N box and scan inserted a longer number. Also tried all resetbehaviours. Log to file did not create a file from gdb-server and shared ST-LINK did not change the outcome.

Changing the frequency did not work either.

The firmware of the stlink is V2.J42.M27.

Also i updated the firmware to exclude mass storage.

stlinkserver is started from the IDE with "-a -p7184".

This error message is really lacking with some more details. Maybe there is a log for it somwhere?

1 ACCEPTED SOLUTION

Accepted Solutions
Tobe
Senior III

I found the problem, and a work around after like 14 hours of trying:

The problem is the gdb server, that is not started with the standard settings. But when you copy the gdb command, and execute it in a seperate cmd, and choose remote gdb server (changing the port might be needed too!), it then works! Now i just need to automate the manual starting of the gdb server. But i ran out of juice for now 😉

View solution in original post

3 REPLIES 3
Tobe
Senior III

I could get some debug from the stlink server. It seems that the st-link can not be detected, but with the firmwareupgrade tool it works.

Debug: 1 1 : create_listening_sockets
Debug: 2 3 : Entering create_listening_sockets()
Debug: 3 5 : Creating the list of sockets to listen for ...
Debug: 4 8 : interface, tcp port : (null) , 7184
Info : 5 10 : default port : 7184
Debug: 6 12 : getaddrinfo successful. Enumerating the returned addresses ...
Debug: 7 15 : Processing Address 020f4f10 returned by getaddrinfo(1) : (null)
Debug: 8 20 : Created socket with handle = 176
Info : 9 22 : 127.0.0.1:7184
Debug: 10 23 : Socket bound successfully
Debug: 11 27 : Non Blocking Setting
Debug: 12 29 : alloc_init_sock_info : Allocated 00342bc8
Debug: 13 31 : Added socket to list of listening sockets
Debug: 14 34 : Freed the memory allocated for res by getaddrinfo
Debug: 15 37 : Exiting create_listening_sockets()
Debug: 16 42 : libusb_init, libusb version : 1.0.23.11397 : http://libusb.info
Debug: 17 45 : libusb_get_device_list entry
Debug: 18 95 : non_blocking_accept_main
Debug: 19 97 : Entering non_blocking_accept_main
Debug: 20 4457 : listening state : 1
Debug: 21 4459 : Entering process_accept_event() on socket 176, sock_info 00342bc8
Info : 22 4463 : 127.0.0.1:52870
Debug: 23 4464 : alloc_init_sock_info : Allocated 00634fc8
Debug: 24 4470 : Added accepted socket 316 to list of sockets
Debug: 25 4515 : count stlink_usb_list :0
Debug: 26 4516 : Refresh: List USB :0
Stlk : 27 4518 : TCPCMD REFRESH_DEVICE_LIST : return 1
Stlk : 28 4522 : TCPCMD GET_NB_DEV : 0 device(s)
Stlk : 29 4524 : TCPCMD GET_NB_DEV : 0 device(s)
Error: 30 4526 : recv returned 0. Remote side has closed gracefully. Good.
Debug: 31 4531 : List of SockInfo 00418004
Debug: 32 4533 : Delete SockInfo next 00418004, list previous 00342bc8
Debug: 33 4537 : Freed sock_info at 00634fc8
Debug: 34 4539 : ask_to_kill asked

KDJEM.1
ST Employee

Hello @tobias Köhler​ ,

Try "Connect under reset" mode.

I advise you to refer to this FAQ: How to solve debugger connection issues.

If you try to launch a debug session with two ST-LINK connected, a pop-up message appear as shown in the figure below: 


_legacyfs_online_stmicro_images_0693W00000bi5aFQAQ.pngPlease refer to AN4989 and precisely Appendix C Managing various targets on the same PC/ STM32Cube IDE section.

I hope this help you to solve the issue!

Kaouthar.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Tobe
Senior III

I found the problem, and a work around after like 14 hours of trying:

The problem is the gdb server, that is not started with the standard settings. But when you copy the gdb command, and execute it in a seperate cmd, and choose remote gdb server (changing the port might be needed too!), it then works! Now i just need to automate the manual starting of the gdb server. But i ran out of juice for now 😉