Reputation: 21
I am using PlatformIO in VSCode working on a school project. I am trying to upload the code from my desktop to my Raspberry Pi Pico via USB. The code has uploaded many times before, but now it will not work. This issue is one that has popped up, I have had it previously able to upload. I changed some code since it has worked, but I don't see why that would prevent it from uploading. The code builds no issue. I am now just trying to upload a simple blink program as a test, but this is still failing.
I have swapped to just uploading a simple blink program instead of my larger project. I have uploaded python code using Thonny IDE, so I know it is being recognized by my pc and the cable is a good cable. The issue is somewhere within VSCode or platform IO, I think? This is the error output:
Processing pico (platform: raspberrypi; board: pico; framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https:
//docs.platformio.org/page/boards/raspberrypi/pico.html
PLATFORM: Raspberry Pi RP2040 (1.9.0) > Raspberry Pi Pico
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, raspberrypi-swd)
PACKAGES:
- framework-arduino-mbed @ 4.0.2
- tool-openocd-raspberrypi @ 2.1100.0 (11.0)
- tool-rp2040tools @ 1.0.2
- toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> https://bit.ly/
configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 41 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Checking size .pio\build\pico\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 15.1% (used 40740 bytes from 270336 bytes)
Flash: [ ] 0.2% (used 4034 bytes from 2097152 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Using manually specified: COM8
Forcing reset using 1200bps open/close on port COM8
Uploading .pio\build\pico\firmware.elf
rp2040load 1.0.1 - compiled with go1.15.8
.....................
*** [upload] Error 1
================================================================================ [FAILED] Took 11.99 seconds ================================================================================
* The terminal process "C:\Users\dylan\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload', '--upload-port', 'COM8'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
and here is the platformio config file:
[env:pico]
platform = raspberrypi
board = pico
framework = arduino
upload_protocol = picotool
Upvotes: 1
Views: 699
Reputation: 1
I tried today to solve this problem and my solution was to add the letter when you insert the Pico with BOOTSEL button pressed upload_port = E:
in my case it's E:, then i additionally add the upload_protocol = mbed
, this line in particular i get it from maxgerhardt in this PlatforIO thread.
Hope it helps.
Upvotes: 0