Adafuit TinyUSB on Arduino M0

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dpit
 
Posts: 2
Joined: Wed Oct 06, 2021 1:52 am

Adafuit TinyUSB on Arduino M0

Post by dpit »

I have been looking at the Adafruit TinyUSB library for a MIDI project I'm working on. It looks like it has everything I need.
I've tried building the midi_test example in PlatformIO using the build_flags = -DUSE_TINYUSB for my Arduino M0 board, but I keep getting errors. The problems I'm seeing are as shown in the screenshot below.
Has anyone managed to get this working on an Arduino M0 board?
What am I missing?
Screenshot 2021-10-06 190400.png
Screenshot 2021-10-06 190400.png (34.67 KiB) Viewed 267 times

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: Adafuit TinyUSB on Arduino M0

Post by westfw »

It compiles fine from the Arduino IDE.
I'd suspect that in addition to -DUSE_TINYUSB, you need to do something to exclude the non-tiny USB code from the PlatformIO build.
(although, I'm not sure TinyUSB is supported on an Arduino M0 board. Perhaps you can lie and compile a metro m0 Express image instead...)

Please don't post pictures of error messages; cut and paste a more complete log (in code tags) instead.

User avatar
dpit
 
Posts: 2
Joined: Wed Oct 06, 2021 1:52 am

Re: Adafuit TinyUSB on Arduino M0

Post by dpit »

Thanks for the feedback.

I've tried a few things since my initial attempts. Firstly, the midi_test example compiles in the Arduino IDE without any issues provided I select an Adafruit board, in my case, I used the Feather M0 board. Selecting the Arduino M0 board and setting a build flag in a boards.local.txt file, results in a fail. So maybe the Arduino M0 board just won't work with this library.

Returning to Platformio I tried to do the same midi_test example build with the Feather M0 board selected and with a build flag -D USE_TINYUSB in the Platformio.ini file. This again failed. It seems that Platformio is not tolerant of non C++ coding conventions. See attached errors text.

Since I'm not familiar enough with all this. I might just have to move onto using another, less capable library, unless someone has any ideas on how to resolve this.
Attachments
Errors.pdf
(95.5 KiB) Downloaded 9 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”