Add TinyUSB option to USB support#2906
Conversation
Allows user to make use of TinyUSB if using Generic F4 boards.
|
Hi @code-fiasco I've planned to add tinyUSB support in the coming month. And also deployed the PluggableUSB from ARduinoCore-API. |
|
Hi, Yeah no problem! You'll want to install the version of the TinyUSB library from this link: Then using the updated boards.txt you should be able to select 'Adafruit TinyUSB' in the USB Support menu in arduino IDE. With that selected all the TinyUSB examples should work with no further modification. I've only tested it with an F411 board as that's all I have, but it should work with all F4 boards so do let me know if you test it on anything else. Hoping the port files will be added to the main TinyUSB branch soon. |
|
Sorry I just realised I haven't given you the actual lines for the boards.txt! All that needs adding to work with that branch of TinyUSB is: GenF4.menu.usb.TinyUSBMIDI=Adafruit TinyUSB |
|
No worry. It is in the PR. |
|
Added support for F1 and G4 as well as F4. Also increased functionality in general. Correct version of TinyUSB at: |
This release adds more lines to boards.txt to extend support for Adafruit TinyUSB library and also adds DFU push functionality using 1200bps touch. For testing with this branch of the TinyUSB library: https://github.com/code-fiasco/Adafruit_TinyUSB_Arduino/tree/stm32-support-v2
|
Hi, Just letting you know I added more lines to boards.txt to include nucleo-64 boards (F1xx, F4xx, WB55 & some G4xx variants) and implement DFU push with 1200bps touch. I noticed there's no clock config included for the generic WB55 boards, I was thinking of updating this pr to include the one I added but not sure if I should be adding extra things like that or just submit a separate pr? |
|
Thanks for the update. |
|
Yeah I thought so, thanks!
On 26 Feb 2026, at 08:28, Frederic Pillon ***@***.***> wrote:
[https://avatars.githubusercontent.com/u/20641798?s=20&v=4]fpistm left a comment (stm32duino/Arduino_Core_STM32#2906)<#2906 (comment)>
Thanks for the update.
It is better to add clock config in a separate PR. This one is only for USB TinyUSB thanks Adafruit library.
—
Reply to this email directly, view it on GitHub<#2906 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/B5JMO4V7UVBSQWUZ5QAXAWL4N2VBFAVCNFSM6AAAAACS5Q7WXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTSNRUHE2TOMZWGQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Summary
Add a TinyUSB USB menu option for Generic STM32F4 boards to improve compatibility with the Adafruit TinyUSB Arduino library.
This PR fixes/implements the following bugs/features
Feature
TinyUSBUSB menu option forGenF4boards inboards.txtARDUINO_ARCH_TINYUSBviabuild.usb_flagswhen selectedNon-breaking
TinyUSBis explicitly selectedMotivation
I have completed the STM32 port files for the Adafruit TinyUSB Arduino library and a pull request has been submitted upstream to include them after testing.
Without a dedicated USB menu option in the STM32 core, using TinyUSB currently requires sketch-level workarounds or manual defines. Adding a
TinyUSBoption inboards.txtallows the core to expose the required build flag cleanly and consistently.This change enables TinyUSB to work across all STM32F4 boards using the Generic core configuration, simplifying usage and improving compatibility.
While this approach could be extended to other STM32 families in the future, testing for this change has currently been limited to an STM32F411 BlackPill board.
Validation
#defineworkaroundsCode formatting
Closing issues