Skip to content

Can't program via Arduino IDE the Pi Pico in linux #573

Open
@Parsec86

Description

@Parsec86

Trying to build & upload the blinky example in Ubuntu 20.04.5 LTS, kernel 5.4.0-113-generic x64.
Only partial success.

I connected the Raspberry PI Pico board keeping pressed the Bootload button.
I do not have automount feature enabled.
Here are the outputs of "sudo lsblk -o NAME,TYPE,FSTYPE,LABEL,UUID,MOUNTPOINT,SIZE,VENDOR,MODEL,SERIAL" and "lsusb" commands:

lsblk:
sdd disk 128M RPI RP2 E0C912952D5
└─sdd1 part vfat RPI-RP2 000B-33DC 128M

lsusb:
Bus 002 Device 114: ID 2e8a:00c0

I started Arduino IDE 1.8.13 (I previously installed the "Arduino Mbed OS RP2040 Boards" and selected the Raspberry PI Pico as target board), opened the blinky example, pressed the upload button. Compilation was fine but the upload stage failed:

...
/home/lubu64/.arduino15/packages/arduino/tools/rp2040tools/1.0.6/rp2040load -v -D /tmp/arduino_build_932857/Blink.ino.elf
rp2040load 1.0.6 - compiled with go1.16.2
.....................
An error occurred while uploading the sketch

So I mounted the Pico board in /media/RPI-RP2 and copied in it the binary (Blink.ino.uf2) found in temp directory /tmp/arduino_build_932857 (from IDE log).

The board rebooted automatically and the led started to blink.
It worked, but so the Integrated Development Environment is not so integrated...

After that, I restarted the Arduino IDE. The serial port "/dev/ttyACM0 (Raspberry PI Pico)" showed up in Tools menu and menu entry Tools->Get Board Info worked as expected so I tried again to upload the sketch.
No success, same error as before.

I tried (almost) any combination of settings, starting the board with/without the bootload button pressed, mounting or not the Pico in /media/RPI-RP2 as root or as myself, adding/removing the "upload_port=/media/RPI-RP2" (or "upload_port=/dev/ttyACM0") row in Arduino IDE preferences.txt, as suggested in Upload port required, restarting IDE countless times, etc.
No success. The IDE produces a working binary but it seems impossible to upload it to the board inside the IDE.

Any suggestions welcome!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions