earlephilhower / arduino-pico

Raspberry Pi Pico Arduino core, for all RP2040 and RP2350 boards
GNU Lesser General Public License v2.1
2.02k stars 419 forks source link

"No drive to deploy" but on Windows - not Linux #2523

Closed guidol70 closed 1 week ago

guidol70 commented 1 week ago

Since the last revisions of the RP2040 Core I got the problem on Windows 10 64Bit with Arduino IDE 1.8.19 that after compiling the Arduino IDE is reseting my Pico to UF2 state (Upload Method Default UF2 and using COM-Port (COM19:) - also a PicoW at COM3: has that problem - but then when it should upload it doesnt find the UF2-device:

C:\Users\guido\AppData\Local\Arduino15\packages\rp2040\tools\pqt-python3\1.0.1-base-3a57aed-1/python3 -I C:\Users\guido\AppData\Local\Arduino15\packages\rp2040\hardware\rp2040\4.1.1/tools/uf2conv.py --serial UF2_Board --family RP2040 --deploy C:\Users\guido\AppData\Local\Temp\arduino_build_18777/TEST.ino.uf2 
Resetting COM19
Converting to uf2, output size: 353280, start address: 0x2000
Scanning for RP2040 devices
No drive to deploy.
An error occurred while uploading the sketch

After the soft-reset from the Arduino IDE I can see the Pico in the FileExplorer as Drive/UF2-Mode (F:)

Drive_F

Additionally when setting the Pico before compile/upload to UF2-Mode and using UF2-Device instead of COM-Port then the Arduino IDE take a very long time (1-2 Minutes?) until it finds the UF2-device and then flash it in a few seconds (blink of an eye).

Is there any setting to control for the timeout of a soft-reseted Pico or can I enable a log to see why the search does take so long? Maybe the soft-reseted Pico runs in a timeout againt a pre-UF2 device?

BTW: Programming the Pico via Drag&Drop the UF2 to the F: Drive does work without any flaw.

Scanning for RP2040 devices
Flashing F: (RPI-RP2)
Wrote 353280 bytes to F:/NEW.UF2

Upload-Setting in Tools - I do use: AIDE_Settings

maxgerhardt commented 1 week ago

The timeout is already set for 10 seconds, so the drive should appear in that timespan after the COM port was reset (1200bps touch).

https://github.com/earlephilhower/arduino-pico/blob/2324d52023815939221c5294f5f434964c26b951/tools/uf2conv.py#L416-L422

For Windows, it tries to execute these commands to capture the drive list:

https://github.com/earlephilhower/arduino-pico/blob/2324d52023815939221c5294f5f434964c26b951/tools/uf2conv.py#L248-L262

Maybe a way to debug this would be to make the script print() the output from the commands, plus if the drive passes the filter test at the bottom?