Arduino doesn't see the STLink programmer?

Hi.
I have Arduino 2.2.1 and the STLink programmer selected in "Tools".

After compiling the sketch, I click "Upload" but Arduino probably doesn't see my programmer because I have the error as below

What to do with this?
Why is it searching "CMSIS-DAP"?

Hi, which hardware are you using in particular? Can you share the product's link?

I have two ST-Link programmers:

  1. Built into the Nucleo board (https://www.st.com/en/evaluation-tools/nucleo-f072rb.html).
  2. ST-Link V2 - Bought on Aliexpress (it looks like this https://ae01.alicdn.com/kf/Hcdf60cf820cf42a4b6b7a95a86deb6ffG/10-sztuk-ST-LINK-Stlink-st-link-V2-Mini-STM8-STM32-symulator -download-programista-programowanie-z.jpg)

I've tried both.
Interestingly, when I select "ARM CMSIS-DAP compatible" in "Tools->Programmer", I get the same error when trying to upload the software. So changing to "STMicroelectronics STLINK" does not change anything.

I also tried with Arduino IDE 1.8.19 and with Arduino Mbed OS Nicla Boards version 2.8.0 and I still have the same error.

The programmers work with Arduino on STM32 boards. Below is a photo

Hi @barshatriplee @adix3 ,

Nicla Sense ME uses the Arduino Mbed OS Nicla Boards core. MbedOS based boards are not supported by the Arduino IDE 2 debugger.

Please take a look here How to debug sketches on Nicla Sense ME - #3 by manchuino

Best,