No ST-LINK detected! Please connect ST-LINK and restart the debug session.
I am using Nucleo F103RB Kit which has onboard St-Link.
I created a simple Led Blink project, and when trying to debug or program the board, I am getting the message that “No ST-Link Detected, and so on”.

But as can be seen from the below screenshot the ST-Link is detected.

But when I used the STM32CubeProgrammer, and programmed the same binary generated by STM32CubeIDE, it works fine, i.e. programming works fine, as can be seen below.

I am also learning in parallel the Zephyr, and there also with command `west flash` st-link is able to program the binary but not with STM32CubeIDE, which is very strange.
Apart from this I used the tool from segger to convert the st-link to jlink, and after converting this to jlink, and then selecting jlink in debug configuration of STM32CubeIDE, it works fine.
Can someone please help me that why on-board st-link is not working with STM32CubeIDE?
Summary:
- ST-Link not working with STM32CubeIDE using the latest version 2.1.1
- ST-Link when converted to JLink works fine with the STM32CubeIDE
- ST-Link works fine with STM32CubeProgrammer
- ST-Link works fine with zephyr west flash command also
- I already uninstalled and did a clean install of the STM32CubeIDE, but nothing changed
