Problems uploading to Rpi Pico

Folks,

Hopefully, someone can help here with a few issues I’m having uploading a program to an RPi Pico (2040 base without WiFi). I’ve been working on a project for some months. The project is intended to respond to commands received via SMS. The breadboard also contains a Nano to send simulated SMS commands to the Pico to save airtime.

I had IDE versions 2.3.3 and 1.8.19 running simultaneously on a Windows 10 PC, connected to different USB ports.

EDIT: Also I'm using Earle Philhower's library v4.1.1.

Everything worked well for several months until Microsoft sneaked in a Windows 10 update and strange things happened.

Firstly, when starting the 2.3.3 IDE, it froze while starting up; the logo would pulse, but the program stayed at that stage. The 1.8.19 IDE worked fine. I reinstalled 2.3.3, but it made no difference. Eventually, I re-imaged the PC and reinstalled both IDEs, and everything was OK.

EDIT: I'm now using two pc's, one connected to the pico, the other running v1.8.19 to the nano. The pc connected to the nano is working OK.

Then, a few days later, the Pico refused to accept a new upload. The IDE picked COM4, and the serial monitor worked, but uploading produced this message in the output window:

  • Converting to UF2, output size: 175616, start address: 0x2000
  • Scanning for RP2040 devices: No drive to deploy.
  • Checking the serial port I see...
  • COM4 is still selected. The serial monitor shows an orange banner with the message “Connecting to Raspberry Pi Pico on COM4.” This changes to “Port monitor error: command ‘open’ failed: Serial port busy.”

Cycling the Pico’s power produces the same error when I upload. The only way I can upload a new program is to power down the Pico, push its button, power up, and wait for Windows Explorer to open. I then drop the flash_nuke.uf2 file into the Pico. Next, I select its port to the UF2 board and hit upload. The Pico must now have its external reset pin grounded or be power cycled before it runs the new program.

I have two Picos, and the problem can be repeated on both. The only difference is that one prefers to select COM6, and the other COM4. Hopefully, someone has seen this before and can help with a solution.

My apologies for a long post.

Malcolm

Did you ever come right, I've been having a very similar experience and I haven't been able to find any information around how to fix it

I played around more and I think I've got my board working, turns out the issue has nothing to do with the board. I'm not exactly sure how or why this worked but here's what I did:

  1. Drop the flash_nuke.uf2 file into the Pico - I then tested with Thonny and MicroPython to see if i could flash MicroPython to it, and I was able to.
  2. I Followed the following comment from here " Arduino IDE cant find Pico in COM Port (Windows) · Issue #1123 · earlephilhower/arduino-pico"

I have fixed this issue today. Seems the problem in PC1 was that the powershell command was missing from System Environment Path Variable. Seems uf2conv.py in line 238 is calling powershell. That was throwing the Unable to build drive list error because it couldn't run the powershell command. I found a reference for this fix here. But I didn't have to add all the items mentioned in the link to my Environment Path Variable. All I needed to do was add the following line as a new entry to Path Variable on Windows 10, which seems to be the root cause. C:\Windows\System32\WindowsPowerShell\v1.0\

  1. I edditted my "PATH" system variable as denoted here: Problem uploading Sketch to Raspberry Pico RP2040 in Arduino IDE – “Unable to build drive list” – Samuel Pinches
  2. I entered my Pico into bootloader mode, connected it to the Arduino IDE and it appeared correctly as a U2F Board, and when i compiled and uploaded the blink sketch it worked.

I hope this is helpful and works for you. I have been trying to fix this issue for literal months.

Hi, Yes, i have come right with the Rpi pico issue. The Rpi issue was the last straw for me and windows. i installed linux mint on an ancient laptop, it ran the 64 bit version quite well. Then installed Arduino v1.8 and v2. I had to lean on Copilot for solutions to a few issues and everything worked nicely. Since my post, my regular laptop and desktop have been moved to linux and fly when compared to win10.
My project is again steaming along at full speed.
Cheers
Malcolm

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.