RP2040 Connect - Failed uploading - rp2040load exit code 1

Hello,

Using Arduino IDE 2.3.1 on Windows, trying to upload a sketch to RP2040 Connect fails with

Failed uploading: uploading error: exit status 1

Additional information:

  • Connecting the board I see a new COM port pops up (COM5 for me)
  • Before the upload itself, the board gets to the bootloader mode (a new mass storage device appears and the COM5 port disappears)
  • When I manually copy the ULF file , then it looks working, but that is not the purpose
copy C:\Users\XXXXX\AppData\Local\Temp\arduino\sketches\AE6262F131744376FC7423329A623B7C\Blink.ino.uf2 d:\

Where I see the issue is using the rp2040load utility, which returns exit code 1 without any logs or explanation

"C:\Users\XXXXX\AppData\Local\Arduino15\packages\arduino\tools\rp2040tools\1.0.6/rp2040load" -v -D "C:\Users\XXXXX\AppData\Local\Temp\arduino\sketches\AE6262F131744376FC7423329A623B7C/Blink.ino.elf"
rp2040load 1.0.6 - compiled with go1.16.2
.....................
Failed uploading: uploading error: exit status 1

The same result I get when I invoke the rp2040load command from a cmd terminal

C:\Users\XXXXX>"C:\Users\XXXXX\AppData\Local\Arduino15\packages\arduino\tools\rp2040tools\1.0.6\rp2040load" -y -v -D "C:\Users\XXXXX\AppData\Local\Temp\arduino\sketches\F62F8943B2BDFFBF9B9D1DADC98AD85E/PDMSerialPlotter.ino.elf"
rp2040load 1.0.6 - compiled with go1.16.2
.....................

C:\Users\XXXXX>echo %errorlevel%
1

Extra information - I checked the rp2040load source code and the tool is invoking following commands:

  • elf2uf2
  • picotool with different parameters: info, load, reboot

Trying to invoke the picotool manually (while in the bootloader mode):

C:\Users\XXXXX>C:\Users\XXXXX\AppData\Local\Arduino15\packages\arduino\tools\rp2040tools\1.0.6\picotool.exe info
No accessible RP2040 devices in BOOTSEL mode were found.

but:

Device at bus 1, address 46 appears to be a RP2040 device in BOOTSEL mode, but picotool was unable to connect. **You may need to install a driver**. See "Getting started with Raspberry Pi Pico" for more information

C:\Users\XXXXX>echo %errorlevel%
-7

Any idea what driver do I need??

At the end I found the solution, keeping it as an answer as for other people

source: https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf

If you get an error message No accessible RP2040/RP2350 devices in BOOTSEL mode were found. accompanied with a note similar to Device at bus 1, address 7 appears to be a RP2040 device in BOOTSEL mode, but picotool was unable to connect indicating that there was a Pico-series device connected then you can run picotool using sudo, e.g.

$ sudo picotool info -a

If you get this message on Windows you will need to install a driver. Download and run Zadig, select RP2 Boot (Interface 1) from the dropdown box and select WinUSB as the driver, and click on the "Install Driver" button. Wait for the installation to complete - this may take a few minutes.

So - connect the RP2040Connect board, get to the bootloader mode, run the Zadig tool to install the WinUSB driver, restart the board

Now the tooling works from the Arduino IDE too

1 Like

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