arduino / rp2040tools

23 stars 5 forks source link

Can't upload sketch on linux. #9

Closed qwec01 closed 2 years ago

qwec01 commented 2 years ago

I use raspberry pi pico, I can upload sketch on windows, but can't upload on linux. When I hit "upload" button, the compile is success, the pico is in BOOTSEL state, but upload fails. Plese help. Here's some log.(uploading blink)

Sketch uses 13932 bytes (0%) of program storage space. Maximum is 16777216 bytes. Global variables use 42780 bytes (15%) of dynamic memory, leaving 227556 bytes for local variables. Maximum is 270336 bytes. /home/x210/.arduino15/packages/arduino/tools/rp2040tools/1.0.2/rp2040load -v -D /tmp/arduino_build_25821/Blink.ino.elf rp2040load 1.0.1 - compiled with go1.15.8 ..................... An error occurred while uploading the sketch

facchinm commented 2 years ago

Hi @qwec01 , the uploader uses the raw USB interface to flash the pico. You may need to add an udev rule to be able to use it without root permissions. Running this script https://github.com/arduino/ArduinoCore-mbed/blob/master/post_install.sh should do the trick

qwec01 commented 2 years ago

Thank you very much, it worked!

tttapa commented 2 years ago

I think it would be helpful to add this to the installation instructions and the arduino/ArduinoCore-mbed README. Perhaps the error message can be improved as well (e.g. suggesting that the udev rules might not be installed correctly and providing a link to the instructions when this error occurs).

per1234 commented 2 years ago

Hi @tttapa. Thanks for your valuable suggestions. I think it will be too difficult to track them in this closed issue, so I would request you to open two dedicated issues:

As for the latter, my opinion is that the arduino/ArduinoCore-mbed readme is not an effective place to document this information. The users who need it most will never see that readme. Better would be one of the following: