PY RP-2040 I followed the instructions on this page https://learn.adafruit.com/adafruit-qt-py-2040/blink-2
I do see the RPI-RP2 automount
Arduino IDE V 1.8 with mbed libraries loaded
It appears this is a common problem, but I can find anything that will make it work.
I'm open to suggestions.
fail to upload sketch
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 14194
- Joined: Mon Aug 01, 2016 8:10 pm
Re: fail to upload sketch
From the Arduino IDE when you go to upload what error do you see?
Make sure that Verbose output is enabled for compilation / upload. The check boxes to enable it are under File --> Preferences.
Also which specific 1.8.x version are you running?
Make sure that Verbose output is enabled for compilation / upload. The check boxes to enable it are under File --> Preferences.
Also which specific 1.8.x version are you running?
- Claude_J_Greengrass
- Posts: 79
- Joined: Sat Jul 24, 2021 10:53 am
Re: fail to upload sketch
Here is the error message (verbose)
Sketch uses 49788 bytes (2%) of program storage space. Maximum is 2093056 bytes.
Global variables use 7316 bytes (2%) of dynamic memory, leaving 254828 bytes for local variables. Maximum is 262144 bytes.
/home/jlk/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed/python3 -I /home/jlk/.arduino15/packages/rp2040/hardware/rp2040/2.6.3/tools/uf2conv.py --serial /dev/ttyACM0 --family RP2040 --deploy /tmp/arduino_build_681747/Blink.ino.uf2
Resetting /dev/ttyACM0
An error occurred while uploading the sketch
Converting to uf2, output size: 130048, start address: 0x2000
No drive to deploy.
I am running Arduino IDE version 1.8.19 under Ubuntu (64 bit)
The drive RPI-RP2 was automounted
There are 2 files on this drive: INDEX.HTM and INFO_UF2.TXT
Sketch uses 49788 bytes (2%) of program storage space. Maximum is 2093056 bytes.
Global variables use 7316 bytes (2%) of dynamic memory, leaving 254828 bytes for local variables. Maximum is 262144 bytes.
/home/jlk/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed/python3 -I /home/jlk/.arduino15/packages/rp2040/hardware/rp2040/2.6.3/tools/uf2conv.py --serial /dev/ttyACM0 --family RP2040 --deploy /tmp/arduino_build_681747/Blink.ino.uf2
Resetting /dev/ttyACM0
An error occurred while uploading the sketch
Converting to uf2, output size: 130048, start address: 0x2000
No drive to deploy.
I am running Arduino IDE version 1.8.19 under Ubuntu (64 bit)
The drive RPI-RP2 was automounted
There are 2 files on this drive: INDEX.HTM and INFO_UF2.TXT
- Claude_J_Greengrass
- Posts: 79
- Joined: Sat Jul 24, 2021 10:53 am
Re: fail to upload sketch
To eliminate possible errors caused by modified hardware, I ordered a fresh QT PY RP2040 and the Adafruit USB cable. When I plug it in, the led 'fades' through a rainbow of colours. This suggests to me that the fade.ino sketch was loaded before it was shipped to me. No problems there.
Now when I try to compile and download the fade sketch I get the error:
An error occurred while uploading the sketch
/home/jlk/.arduino15/packages/rp2040/tools/pqt-openocd/1.4.0-c-0196c06/bin/openocd: error while loading shared libraries: libhidapi-hidraw.so.0: cannot open shared object file: No such file or directory
And yes, libhidap-hidraw.so.0 is missing. Hints as to how to solve this would be greatly appreciated.
Now when I try to compile and download the fade sketch I get the error:
An error occurred while uploading the sketch
/home/jlk/.arduino15/packages/rp2040/tools/pqt-openocd/1.4.0-c-0196c06/bin/openocd: error while loading shared libraries: libhidapi-hidraw.so.0: cannot open shared object file: No such file or directory
And yes, libhidap-hidraw.so.0 is missing. Hints as to how to solve this would be greatly appreciated.
- mikeysklar
- Posts: 14194
- Joined: Mon Aug 01, 2016 8:10 pm
Re: fail to upload sketch
I'm surprised it would look for an openocd library. Can you show the drop down of your Arduino IDE --> Tools menu. This error sounds like you have a jtag programmer selected.
- Claude_J_Greengrass
- Posts: 79
- Joined: Sat Jul 24, 2021 10:53 am
Re: fail to upload sketch
thanks for the reply mikeysklar
I updated ubuntu and have fixed the above problem with apt-get.
I can see a "disk" RPI-RP2 and I tried to copy fade.ino.elf.uf2 to that device with no success
I still cannot see a Port from the Tools menu of the IDE and I get the following error when I attempt to download a compiled file:
An error occurred while uploading the sketch
Open On-Chip Debugger 0.10.0+dev-ge3428fadb-dirty (2022-07-14-14:57)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Error: unable to find CMSIS-DAP device
Error: No Valid JTAG Interface Configured.
I updated ubuntu and have fixed the above problem with apt-get.
I can see a "disk" RPI-RP2 and I tried to copy fade.ino.elf.uf2 to that device with no success
I still cannot see a Port from the Tools menu of the IDE and I get the following error when I attempt to download a compiled file:
An error occurred while uploading the sketch
Open On-Chip Debugger 0.10.0+dev-ge3428fadb-dirty (2022-07-14-14:57)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : Hardware thread awareness created
Info : RP2040 Flash Bank Command
Error: unable to find CMSIS-DAP device
Error: No Valid JTAG Interface Configured.
- mikeysklar
- Posts: 14194
- Joined: Mon Aug 01, 2016 8:10 pm
Re: fail to upload sketch
Just to confirm you have installed the Earle Philhower Core from the Boards Manager (in the Arduino IDE)?
https://learn.adafruit.com/adafruit-qt- ... rl-3107182
Don't worry about the port not being available. The RP2040 does not need that for the Arduino IDE.
I am concerned that one of your Arduino IDE Tools setting is set to JTAG. You are not using a JTAG programmer so that is the source of the IDE not working correctly to upload. Your screen needs to resemble the guide screenshot:
Good thought trying to manually copy the UF2 did you drop it through the graphical 'Files' program under Ubuntu? That has worked for me on my Ubuntu laptop.
https://learn.adafruit.com/adafruit-qt- ... rl-3107182
Don't worry about the port not being available. The RP2040 does not need that for the Arduino IDE.
https://learn.adafruit.com/adafruit-qt- ... rd-3107193If there is no serial Port available in the dropdown, or an invalid one appears - don't worry about it! The RP2040 does not actually use a serial port to upload, so its OK if it does not appear if in manual bootload mode. You will see a serial port appear after uploading your first sketch
I am concerned that one of your Arduino IDE Tools setting is set to JTAG. You are not using a JTAG programmer so that is the source of the IDE not working correctly to upload. Your screen needs to resemble the guide screenshot:
Good thought trying to manually copy the UF2 did you drop it through the graphical 'Files' program under Ubuntu? That has worked for me on my Ubuntu laptop.
Please be positive and constructive with your questions and comments.