Rp2040load Error 1

Uploading firmware remotely
Processing pico (platform: https://github.com/maxgerhardt/platform-raspberrypi.git; framework: arduino; board: pico)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Configuring upload protocol...
*** [nobuild] Source `.pio/build/pico/firmware.bin.signed' not found, needed by target `nobuild'.
AVAILABLE: cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Auto-detected: /dev/ttyAMA0
Forcing reset using 1200bps open/close on port /dev/ttyAMA0
Uploading .pio/build/pico/firmware.elf
rp2040load 1.0.1 - compiled with go1.15.8
.....................
*** [upload] Error 1
========================= [FAILED] Took 17.66 seconds =========================
make: *** [Makefile:43: flash-remote] Error 1

Im getting the somewhat generic error above, im experimenting with remote flashing. I can flash and compile this code locally no problem but im trying to integrate the little pi in my bench to handle it.

So far i’ve gotten to here, my question is, can i make rp2040load more verbose? Maybe give me some more idea of why its failing? Thanks!

What’s the output of pio pkg exec -p tool-rp2040tools -c "picotool info" when executed on the remote machine?

Sorry about the delay! Heres the output.

$ pio pkg exec -p tool-rp2040tools -c "picotool info"
Using tool-rp2040tools@1.0.2 package
No accessible RP2040 devices in BOOTSEL mode were found.

but:

Device at bus 1, address 65 appears to be a RP2040 device in BOOTSEL mode, but picotool was unable to connect

Hm, I only know that error message from Windows when the WinUSB drivers aren’t yet loaded for the RP2 Boot Interface 1 device… But on Linux, not sure. Did you install the udev rules via 99-platformio-udev.rules — PlatformIO latest documentation, added your user to the relevant groups and rebooted the system already?

When you set

upload_protocol = mbed

in the platformio.ini, is it able to upload as a workaround?

You might additinoally need to install the Raspberry Pi Pico/RP2040 udev rules · GitHub rules if PlatformIO’s dont work.

I installed udev rules, it actually almost kinda worked? it showed it flashing for a second but then failed and errored out and i’ve been unable to recreate it so, a fluke?

Next i tried using mbed and that errored instantly, heres those tracebacks:

Uploading firmware remotely
Processing pico (platform: https://github.com/maxgerhardt/platform-raspberrypi.git; framework: arduino; board: pico)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
*** [upload] Source `.pio/build/pico/firmware.bin.signed' not found, needed by target `upload'.
========================== [FAILED] Took 2.26 seconds ==========================
make: *** [Makefile:43: flash-remote] Error 1
Uploading firmware remotely
Processing pico (platform: https://github.com/maxgerhardt/platform-raspberrypi.git; framework: arduino; board: pico)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
Configuring upload protocol...
*** [nobuild] Source `.pio/build/pico/firmware.bin.signed' not found, needed by target `nobuild'.
AVAILABLE: cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Auto-detected: /dev/ttyACM0
Forcing reset using 1200bps open/close on port /dev/ttyACM0
Uploading .pio/build/pico/firmware.elf
rp2040load 1.0.1 - compiled with go1.15.8
...Loading into Flash: [                              ]  0%
Loading into Flash: [=                             ]  6%
Loading into Flash: [===                           ]  13%
Loading into Flash: [=====                         ]  19%
Loading into Flash: [=======                       ]  26%
Loading into Flash: [=========                     ]  33%
Loading into Flash: [===========                   ]  39%
Loading into Flash: [=============                 ]  46%
Loading into Flash: [===============               ]  53%
Loading into Flash: [=================             ]  59%
Loading into Flash: [===================           ]  66%
Loading into Flash: [=====================         ]  73%
Loading into Flash: [=======================       ]  79%
Loading into Flash: [=========================     ]  86%
Loading into Flash: [===========================   ]  92%
Loading into Flash: [============================= ]  99%
Loading into Flash: [==============================]  100%

========================== [FAILED] Took 5.88 seconds ==========================
make: *** [Makefile:43: flash-remote] Error 1

Thanks for the help in figuring this out with me

Hm that one is on me, I recently changed the build logic, but didn’t test with the more complex scenario of remote uploading. Do you want to use the Arduino-Pico core or ArduinoCore-mbed? What’s the full platformio.ini?

Sorry again for delay, really appreciate the help with this!

Here’s the ini kw1fox-2/platformio.ini at feat/firmware · Kitsune-Robotics/kw1fox-2 · GitHub

Thanks!

I see. I’ll try and reproduce your setup with a Raspberry Pi to trigger and debug this issue. Part of the uploading with picotool issue may also be due to outdated versions of the tools, I’ll be trying to update those too.