Uploading a compiled file using picoprobe is already covered but this time I'd like to describe how to use PICO Debug Probe in Windows. Perhaps some finds it obvious, but for me to understand how to use it, it took me a little, so that's why I write it now.
The Pico Debug Probe comes with already uploaded firmware. After connection it to usb Windows should discover it and report it under Device Manager. Not distinguishing then between releases
https://github.com/raspberrypi/picoprobe/releases: debugprobe and picoprobe, constantly tried to use Zadig to configure newly discovered usb port in Windows. But Zadig is no longer required.
In order to upload your compiled program to the Pico it has to be:
1. Use a special Lazarus release to create and build your .elf program
2. Download and unack openocd. I use version 0.12, downloaded from
https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html3. open cmd in Administrator mode, navigate to your opencmd file (from previous step)
4. It could happen that in rp2040.cfg you have to change this line
source [find target/swj-dp.tcl]
as I did to
source [find scripts/target/swj-dp.tcl]
4.Then use something like
"path_to your openocd_file">openocd -f scripts/interface/cmsis-dap.cfg -f scripts/target/rp2040.cfg -c "adapter speed 5000" -c "program "path_to some_elf_file" verify reset exit"
This is exactly what is described here:
https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html----------
If you did it in different way please share it.