-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/tinyusb: fix Kconfig problems #19023
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
include $(RIOTBOARD)/common/arduino-zero/Makefile.features | ||
|
||
FEATURES_PROVIDED += tinyusb_device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this with #19007?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, unfortunatly it seems so. If you take a look into the Nightlies output , the compilation of
tests/pkg_tinyusb_cdc_acm_stdio
fails forstm32f429i-disco
becauseusbus*
modules are enabled in Kconfig due to the unconditional settings in the application configuration file boards/stm32f429i-disco/stm32f429i-disco.configRIOT/boards/stm32f429i-disco/stm32f429i-disco.config
Lines 1 to 3 in 2274a56
That is, even if we enable
MODULE_STDIO_TINYUSB_CDC_ACM
, allMODULE_USBUS*
symbols are unconditionally enabled. The only solution for now is to disable the tinyUSB device feature for this board.This is exactly the same problem I have with all boards that use the single USB interface as
highlevel_stdio
andusb_board_reset
to control the bootloader mode, for exampleboards/common/arduino-mkr
. I can't enable the tinyUSB feature for these boards, although we supportstdio_tinyusb_cdc_acm
andusb_board_reset
in tinyUSB, because the symbolsMODULE_STDIO_CDC_ACM
andMODULE_USBUS*
are unconditionally enabled by such application configuration files, for example boards/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.configRIOT/boards/common/samdx1-arduino-bootloader/samdx1-arduino-bootloader.config
Lines 1 to 3 in 2274a56
I have been trying and thinking about how to solve this problem for days, because this problem is exactly what prevents PR #18998 from being compilable. We could enable the tinyUSB feature for all these boards, but the unconditional activation of
MODULE_STDIO_CDC_ACM
andMODULE_USBUS*
prevents this.I have already discussed the problem a bit with @MrKevinWeiss. The reason is that the logic of when
MODULE_STDIO_CDC_ACM
andMODULE_USB*
are enabled in Kconfig is the reverse of the logic in the Makefile dependencies for these modules. In the Makefile dependenciesstdio_cdc_acm
and thus also theusbus*
modules are enabled automatically when needed. It is easy to define an additional prerequisite for them that thetinyusb_device
is not enabled. In Kconfig, the user has to enableMODULE_USBUS
first, then he can enableMODULE_USBUS_CDC_ACM
and thenMODULE_STDIO_CDC_ACM
or evenMODULE_USB_BOARD_RESET
afterwards. The only way to enable them by default if needed is their unconditional activation in such application configuration files which are included inMakfile.features
for test compilation at the moment.I personally don't like this logic since the the application/user has to enable them explicitly even if they are required to flash the board at all.
Any suggestion how to solve this problem would be welcome, otherwise we can't enable the tinyUSB feature for a large couple of boards.