So I created a new project using the Adafruit TinyUSB library resulting in the following platformio.ini:
[env:samd21_xpro]
platform = atmelsam
board = samd21_xpro
upload_protocol = cmsis-dap
framework = mbed
lib_deps = adafruit/Adafruit TinyUSB Library@^1.0.3
Then I copied
<project_folder>.pio\libdeps\samd21_xpro\Adafruit TinyUSB Library\examples\CDC\no_serial\no_serial.ino
to
<project_folder>\src\no_serial.cpp.
When trying to compile I get this message:
Compiling .pio\build\samd21_xpro\src\no_serial.o
src/no_serial.cpp:12:10: fatal error: Adafruit_TinyUSB.h: No such file or directory
**************************************************************************
* Looking for Adafruit_TinyUSB.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:Adafruit_TinyUSB.h"
* Web > https://platformio.org/lib/search?query=header:Adafruit_TinyUSB.h
*
**************************************************************************
#include "Adafruit_TinyUSB.h"
^~~~~~~~~~~~~~~~~~~~
compilation terminated.
The suggested web search sports this:
Indeed Atmel SAM is listed as a supported platform. So where is the problem?
By the way: #includes of <Arduino.h> or <mbed.h> are not found either.