ST-LINK V2 Detected but Cannot Connect to STM32F103 in CubeIDE or CubeProgrammer
Hello,
I am having a problem connecting to an STM32F103C8T6 (Blue Pill) using an ST-LINK V2.
The interesting thing is that this exact ST-LINK programmer was working correctly with both STM32CubeIDE and STM32CubeProgrammer before. I was able to program and debug the STM32 without any problems.
Now, STM32CubeIDE gives me the following error when I try to start debugging:
Failed to execute MI command:
target remote localhost:61234
cannot resolve name: The specified class was not found.I checked the Debug Configuration in CubeIDE, and the settings are:
- Debug probe: ST-LINK (ST-LINK GDB Server)
- Interface: SWD
- Host: localhost
- Port: 61234
- Frequency: Auto
- Access Port: Cortex-M3
- Autostart local GDB server: Enabled
CubeIDE can detect the ST-LINK during the Scan operation, and it shows its serial number. However, when I try to debug, it says that no ST-LINK with that serial number can be found.
I also installed STM32CubeProgrammer to test the connection independently. However, CubeProgrammer is also unable to connect to the STM32.
I tried different connection/reset modes, including:
- Normal + Software reset
- Under Reset + Hardware reset
but I still cannot connect to the MCU.
The ST-LINK is detected by the computer, but I cannot establish a connection with the STM32F103.
What could be causing this problem, and what should I check next?
Thank you.
