cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK V2 not entering DFU mode / gdb not found during STM32 upload (using STM32CubeIDE)

Hi,
I'm using STM32CubeIDE with an ST-LINK V2 debugger (possibly a clone). When I try to upload my program to the STM32 board, I encounter the following issues:

1. ST-LINK not entering DFU mode, so I can't update firmware.
2. STM32CubeIDE gives this error:
Error with command: GNU debugger version --version
Cannot run program GNU debugger versi: Launching failed

Setup:
- STM32CubeIDE 1.18.1
- ST-LINK V2 
- Board: STM32F103C8T6
- Windows 10

Things I tried:
- Installed ST-LINK drivers (STSW-LINK009)
- Installed STM32CubeProgrammer
- Checked Device Manager: ST-LINK appears
- Tried STM32CubeIDE reinstall

Need help with:
- Forcing DFU mode for ST-LINK V2
- Resolving GNU debugger version - issue in STM32CubeIDE

Thanks!

2 REPLIES 2
Andrew Neil
Super User

@mariam-varkey1234 wrote:

 an ST-LINK V2 debugger (possibly a clone). !


How to check for sure:

https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/ta-p/49471

 

TL;DR: 

https://community.st.com/t5/stm32-mcus/how-to-recognize-a-genuine-st-link-v2-versus-a-cloned-one/tac-p/703663/highlight/true#M965

 


@mariam-varkey1234 wrote:

- Board: STM32F103C8T6


That's just a chip part number - it doesn't identify a board.

Are you sure the chip isn't (also) a clone/fake?

 


@mariam-varkey1234 wrote:

- Installed STM32CubeProgrammer


And were you able to do anything via CubeProgrammer?

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.
TDK
Super User

STM32CubeIDE doesn't work well with non-genuine chips or programmers.

Forcing DFU mode for ST-LINK V2

This doesn't make sense. DFU is a USB-peripheral that lets you update firmware over USB without a programmer. If you're using an ST-Link, it's not involved here. Are you connecting over SWD?

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