I have this
[env:m0]
platform = atmelsam
board = adafruit_feather_m0_express
framework = arduino
build_flags =
-std=gnu++17
-D__SAMD21G18A__
-DADAFRUIT_FEATHER_M0
-DADAFRUIT_FEATHER_M0_EXPRESS
-DARDUINO_SAMD_ZERO
-DARM_MATH_CM0PLUS
-D USE_TINYUSB
-D SH110X_NO_SPLASH
lib_deps =
adafruit/Adafruit DAP library@^1.8.3
adafruit/Adafruit SleepyDog Library@^1.8.4
adafruit/Adafruit SSD1306@^2.5.17
When I build this project, it seems to pull in a local version of TinyUSB For example:
Dependency Graph
|-- Adafruit DAP library @ 1.8.3 (License: Unknown, Path: /Users/mark/Projects/multi-flash/.pio/libdeps/m0/Adafruit DAP library)
| |-- Adafruit TinyUSB Library @ 3.7.7 (License: Unknown, Path: /Users/mark/Projects/multi-flash/.pio/libdeps/m0/Adafruit TinyUSB Library)
| | |-- SdFat - Adafruit Fork @ 2.3.103 (License: MIT, Path: /Users/mark/Projects/multi-flash/.pio/libdeps/m0/SdFat - Adafruit Fork)
But that library is already included in the framework, and when compiled, things get confused because there are two sets of include files:
.pio/libdeps/m0/Adafruit TinyUSB Library/src/common/tusb_common.h:197:45:
error: redefinition of 'uint8_t tu_u16_low(uint16_t)'
197 | TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_u16_low (uint16_t ui16) { return TU_U16_LOW(ui16); }
| ^~~~~~~~~~
/Users/mark/.platformio/packages/framework-arduino-samd-adafruit/libraries/Adafruit_TinyUSB_Arduino/src/arduino/../common/tusb_common.h:141:45:
note: 'uint8_t tu_u16_low(uint16_t)' previously defined here
141 | TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_u16_low (uint16_t ui16) { return TU_U16_LOW(ui16); }
| ^~~~~~~~~~
How do I keep the library manager from trying to include a second copy of the library?