Problem with Rasberry Pi Pico and TinyUSB for usbMIDI

Hi all,
Been using Platoform IO for a couple of years but first time poster. Hope I’m in the right sub:)

I decide to give the Pico a go for a project with midi over USB but ran into some problems. I managed to set up the earlephilhower core with the platformio.ini example from the bottom of this page:

Everything seems to work fine until I try to change USB stack to access tinyUSBs midi implementation. When I add the build flag (below) the pico doesn’t show up as a com port or as a midi device.
build_flags = -DUSE_TINYUSB

The closest I’ve gotten to figuring out where the problem lies is that, from the picos side, the command TinyUSBDevice.mounted() never returns true.

Setting up the same project with the same core in the Arduino IDE works.

I’m in quite over my head here so please let me know if I’ve just misunderstood something or what other info I should post

Can you show the exact used platformio.ini and src/main.cpp code? (I’m the mantainer of the Pico PlatformIO build scripts)

I recognise you’re name form my .ini file;) Thanks for taking a look!


platform =
board = pico
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
; note that download link for toolchain is specific for OS. see
platform_packages =

upload_port = D:
build_flags = -DUSE_TINYUSB


#include <Arduino.h>
#include <Adafruit_TinyUSB.h>

// FSR
int fsrPin = A0;

void setup()
  pinMode(fsrPin, INPUT);

  digitalWrite(LED_BUILTIN, LOW);

void loop()
    digitalWrite(LED_BUILTIN, HIGH);
  long fsrVal = analogRead(fsrPin);
  Serial.print("FSR val: ");

Thanks, I will very soon have a look at reproducing + bugfinding.

1 Like

Any luck with this?
Have been using the Arduino IDE and also tried other micro controllers for this project but the Pico in PlatformIO with this core would still be my first choice if this works