Skip to content

PlatformIO: upload to Adafruit Trinkey RP2040 QT errors out #1149

Closed
@salfter

Description

@salfter

Maybe I'm doing something wrong, but I've tried uploading both with and without holding in the BOOTSEL button and I keep getting an error. With BOOTSEL pressed, it usually fails like this:

Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Error: Please specify `upload_port` for environment or use global `--upload-port` option.
For some development platforms it can be a USB flash drive (i.e. /media/<user>/<device name>)
*** [upload] Explicit exit, status 1

Without pressing BOOTSEL, I get this:

Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = picotool
Looking for upload port...
Auto-detected: COM5
Forcing reset using 1200bps open/close on port COM5
Uploading .pio\build\pico\firmware.elf
rp2040load 1.0.1 - compiled with go1.15.8
.....................
*** [upload] Error 1

I can copy firmware.uf2 from .pio/build/pico/ onto the device and get my code running that way, so this isn't a showstopper, but it'd be nice to have the upload button working as it does for the other platforms I use.

Steps to duplicate

Create a new PlatformIO project for the Raspberry Pi Pico, and override the settings in platformio.ini as follows:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:pico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = adafruit_trinkeyrp2040qt
framework = arduino
board_build.core = earlephilhower

The code I'm testing with is a mouse wiggler that I can change over to a mouse clicker, though I suppose a "blinky" program or anything known to work could be used for main.cpp:

#include <Arduino.h>
#include <Mouse.h>

void setup() {
  Mouse.begin();
}

void loop() {
  Mouse.move(-5,0,0);
  delay(1000);
  Mouse.move(5,0,0);
  delay(1000);
  // Mouse.click();
  // delay(30000);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions