You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PlatformIO Core.
If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Windows 10 x64
PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.13
Description of problem
A Atmel SAM project that attempts to include Adafruit TinyUSB library of the latest version (2.3.2 down to and including 2.2.2) fails to properly compile, not finding the SPI.h header declared in the Adafruit_USBH_Host.h file. Version 2.2.1 compiles fine, because it did not have an include for SPI.h.
The LDF fails to find the dependency on SPI.h no matter the lib_ldf_mode setting (deep+, deep, chain, chain+ tested and failed). This makes this library impossible to compile for the board in PlatformIO.
Use platformio.ini and src/main.cpp provided below
Build
Observe build failure
Change version to adafruit/Adafruit TinyUSB [email protected] and rebuild
Observe build success
Actual Results
Compiling .pio\build\busylight\lib4ff\Adafruit_ZeroDMA\Adafruit_ZeroDMA.cpp.o
Compiling .pio\build\busylight\lib361\SPI\SPI.cpp.o
In file included from .pio\libdeps\busylight\Adafruit TinyUSB Library\src/Adafruit_TinyUSB.h:76,
from C:\Users\Max\.platformio\packages\framework-arduino-samd-adafruit\libraries\Adafruit_ZeroDMA\Adafruit_ZeroDMA.cpp:35:
.pio\libdeps\busylight\Adafruit TinyUSB Library\src/arduino/Adafruit_USBH_Host.h:30:10: fatal error: SPI.h: No such file or directory
Especially concerning are the messages in verbose mode that the LDF fail to evalute the TinyUSB macro TU_CHECK_MCU correctly.
Warning! Classic Pre Processor is used for C:\Users\Max\temp\trinkey\.pio\libdeps\busylight\Adafruit TinyUSB Library\src\arduino\Adafruit_TinyUSB_API.cpp, advanced has failed with Incorrect number of arguments to TU_CHECK_MCU'Warning! Classic Pre Processor is used forC:\Users\Max\temp\trinkey.pio\libdeps\busylight\Adafruit TinyUSB Library\src\arduino\Adafruit_USBD_CDC.cpp, advanced has failed with Incorrect number of arguments to TU_CHECK_MCU'
Warning! Classic Pre Processor is used for C:\Users\Max\temp\trinkey\.pio\libdeps\busylight\Adafruit TinyUSB Library\src\arduino\Adafruit_USBD_Device.cpp, advanced has failed with Incorrect number of arguments to TU_CHECK_MCU'Warning! Classic Pre Processor is used forC:\Users\Max\temp\trinkey.pio\libdeps\busylight\Adafruit TinyUSB Library\src\arduino\Adafruit_USBH_Host.cpp, advanced has failed with Incorrect number of arguments to TU_CHECK_MCU'
The text was updated successfully, but these errors were encountered:
maxgerhardt
changed the title
LDF can't work with Adafruit TinyUSB on any setting
LDF can't work with latest Adafruit TinyUSB on any setting
Jan 23, 2024
Hi @maxgerhardt, thanks for reporting. I've reproduced the issue and it seems it's caused by a circular dependency between Adafruit TinyUSB, Adafruit Zero DMA and SPI libraries. I'm wondering if the latest versions of the TinyUSB library are compatible with their SAMD core. The libraries in the SAMD repo were updated just yesterday and they still prefer to stick to a quite old version 1.4.7 of the Adafruit TinyUSB library for some reason.
As a workaround I'd recommend using the library version bundled with the framework package at the moment.
What kind of issue is this?
If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Windows 10 x64
PlatformIO Version (
platformio --version
):PlatformIO Core, version 6.1.13
Description of problem
A Atmel SAM project that attempts to include Adafruit TinyUSB library of the latest version (2.3.2 down to and including 2.2.2) fails to properly compile, not finding the
SPI.h
header declared in theAdafruit_USBH_Host.h
file. Version 2.2.1 compiles fine, because it did not have an include for SPI.h.The LDF fails to find the dependency on SPI.h no matter the
lib_ldf_mode
setting (deep+
,deep
,chain
,chain+
tested and failed). This makes this library impossible to compile for the board in PlatformIO.Per community topic.
Steps to Reproduce
platformio.ini
andsrc/main.cpp
provided belowadafruit/Adafruit TinyUSB [email protected]
and rebuildActual Results
Expected Results
Compiles fine
If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
Additional info
Especially concerning are the messages in verbose mode that the LDF fail to evalute the TinyUSB macro
TU_CHECK_MCU
correctly.The text was updated successfully, but these errors were encountered: