Skip to content

PlatformIO does not choose newer Adafruit TinyUSB #379

@DaAwesomeP

Description

@DaAwesomeP

Operating System

Linux

Arduino IDE version

PlatformIO Core, version 6.1.18

Board

TRRS Trinkey

ArduinoCore version

framework-arduino-samd-adafruit @ 1.10716.0 (1.7.16)

Sketch as ATTACHED TXT

N/A

Compiled Log as ATTACHED TXT

N/A

What happened ?

PlatformIO chooses the bundled Adafruit TinyUSB instead of the one specified in lib_deps. However, this version is out of date and does not reflect breaking changes in the core itself. It fails to compile simply including the libraries. PlatformIO seems to link libraries/board cores in a different order or priority than Arduino IDE, so the solution in #322 does not work (see platformio.ini below).

IMO TinyUSB should not be bundled if it is not updated for breaking changes. Even in Arduino IDE, this generates confusing errors because it looks like you accidentally installed an old version.

How to reproduce ?

Using this platformio.ini

[env:adafruit_trrstrinkey_m0]
platform = atmelsam
board = adafruit_trrstrinkey_m0
framework = arduino

lib_deps =
  SPI
  fortyseveneffects/MIDI Library@^5.0.2
  adafruit/Adafruit TinyUSB Library@^3.7.3

build_flags =
  -DUSE_TINYUSB

Note that I have my own board JSON for adafruit_trrstrinkey_m0 since it is not a part of PlatformIO yet, but this applies to all of the SAMD boards.

Debug Log as ATTACHED TXT

No response

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions