I have read a few posts here about this issue but nothing in those threads helped. I did not want to hijack someone’s thread, so I reluctantly created my own.
I can upload sketches just fine from Arduino IDE, although I had to have my Pico in bootloader mode the first time. After that, it worked on successive tries to upload. I did not have to use Zadig at all, even though my Pico showed up as RP2 in bootloader mode with a triangle warning as Other Device. I nuked my Pico first, tried it in bootloader mode and not, making sure the com address was correct.
But even AFTER using Zadig, and even rebooting, PlatformIO in VSCode, it searched for a Pico and does not find it.
And the interesting thing, I can place my Pico in bootloader mode, take the firmware.uf2 from the .pio/build folder and drop it on the instance in explorer, and it works great, running my code just as expected. But even after doing that, uploads still fail.
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 3.8% (used 9848 bytes from 262144 bytes)
Flash: [ ] 3.1% (used 64992 bytes from 2093056 bytes)
Configuring upload protocol...
AVAILABLE: blackmagic, cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Using manually specified: COM18
Forcing reset using 1200bps open/close on port COM18
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
No new RPxxxx device found yet, waiting..
Warning: Picotool did not detect any RPxxxx devices in BOOTSEL mode. Upload might fail.
Uploading .pio\build\rpipico\firmware.elf
ERROR: The RP2040 device returned an error: <unknown>
*** [upload] Error 4294967197
===================== [FAILED] Took 149.80 seconds =====================
* The terminal process "C:\Users\hopwo\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload', '--upload-port', 'COM18'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
My next step is just to create a picotool script and manually uploading the UF2.
One more caveat… Several times, but not always, I click on the BUILD button for my code but it still tries to upload to the Pico. I’m not clicking upload, just build. Shouldn’t PlatformIO just build the project and finish without trying to upload? Why would it do that?
Is this something in my platformio.ini file I have not included? Are there any other fixes out there I haven’t mentioned? It’s not a deal breaker, I LOVE using PlatformIO in VSCode. But the extra steps I have to take to up my code is frustrating.
I found 3 instances of picotool on my Windows 11 system. Each of them are different sizes and versions. I did find one at…
"C:\Users\{user}\.platformio\packages\tool-picotool-rp2040-earlephilhower\picotool.exe" so maybe I should replace it with a newer version if available?
Any suggestions on how I can trouble shoot this… logs to look at, command line tests to do, etc. would be appreciated!
Thanks

