Add TinyUSB option to USB support #2906
Open
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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