cancel
Showing results for 
Search instead for 
Did you mean: 

Connection to ST link GDB server failed, corrupted data, cannot update through STM32Programmer

NymerisV
Associate II

Hi, I am having several days problems with connecting ST-Link to gdb server to debug. I am using ST-Link V3, V2 (genuine ones).

Everything was working fine until I connected Copy of a ST-Link debugger (I didn't know it is copy, it has original logo on the top, but I took off the cover and there was not original STM32F1 MCU, just some knock off). So I tried to update this Fake ST-Link debugger and I didn't succeed, and I tried to update it also via STM32Programmer and also through ST-Link update button in VS Code. After all of this I think it messed up my GDB server directory on my mac but I deleted all ST software and installed again but still without change. It prints GDB server failed or USB error... Than I have read that ST stopped supporting those fake debuggers so I than connected my two original V2 debuggers, but without change. I even bought new original ST-Link V3MINIE and still the same, now it prints this :

""""Error connecting to device STLINK-V3 (error 0x21); check the USB connection and refresh the device list
     [out] libusb: info [darwin_claim_interface] no interface found; setting configuration: 1
     libusb: error [darwin_claim_interface] could not set configuration
     libusb: info [darwin_claim_interface] no interface found; setting configuration: 1
     libusb: error [darwin_claim_interface] could not set configuration
     Error connecting to device ST-LINK/V2-1 (error 0x1); check the USB connection and refresh the device list"""""""
 
If anyone can give me an advice I would be grateful.
thanks in advance.
3 REPLIES 3
TDK
Guru

If you open STM32CubeProgrammer, does it detect the ST-Link chip? If not, what information or error message is displayed?

Try power cycling the computer and the programmer. Try different ports and different USB cables.

If you feel a post has answered your question, please click "Accept as Solution".

https://community.st.com/t5/stm32-mcus/how-to-solve-connection-errors-when-connecting-and-programming/tac-p/786977

https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693

In particular: https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/tac-p/698105/highlight/true#M956

 

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.

hi, I've succeeded to see it as usb device on my Mac but if I do this in my terminal nothing new:

terminal% st-info --probe

Failed to enter SWD mode

Found 1 stlink programmers

  version:    V3J15

  serial:     002E00323433510F37363934

  flash:      0 (pagesize: 0)

  sram:       0

  chipid:     0x000

  dev-type:   unknown""""""

...In STM32CubeProgrammer I performed successfully update, but after update it says :"Unable to get core ID"

" If your device embeds Debug Authentication, use discovery Device Authentication"........ but than I do that it says: "Failed to communicate with target"

......when I press debug in VS code it says: "'"

Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: https://github.com/Marus/cortex-debug#usage
 
IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems
 
Please check TERMINAL tab (gdb-server) for output from /opt/st/STM32CubeCLT_1.18.0/STLink-gdb-server/bin/ST-LINK_gdbserver
 
Finished reading symbols from objdump: Time: 40 ms
 
Finished reading symbols from nm: Time: 48 ms
 
Output radix now set to decimal 10, hex a, octal 12.
 
Input radix now set to decimal 10, hex a, octal 12.
 
ST-LINK: GDB Server Quit Unexpectedly. See gdb-server output in TERMINAL tab for more details."
////////