-
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: implement stdio via CDC ACM #18804
Conversation
8a65ed4
to
7869593
Compare
Funny, I was working on the same feature in my branch pkg/tinyusb_stdio commit a3048979f18372fc67117989ac3f026d92a4de41 😉 I would drop my work in favor of yours because yours seems to be finished while mine was still in progress. |
BTW, I'm working on a |
@@ -0,0 +1,317 @@ | |||
/* |
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.
Regarding this file, it makes little sense to redefine it again, since most of the parts are always the same. Furthermore, an application can't use other device classes if module tinyusb_cdc_acm_stdio
is used.
That's why I'm working on a common tinyusb_descriptors.c
file that uses the configuration and the Kconfig CONFIG_*
symbols from the usbus
to implement the descriptors. Once I have finished that work, we should be able to drop this file and it should be possible to use tinyusb_stdio
together with other device class just by enabling the according tinyusb_class_*
modules.
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.
If you already have a common tinyusb_descriptors.c
in the works, I'll just wait for that 😃
Moving this to XFA seems to be a bit tricky, you'll likely be faster with providing a generic solution as you already have experience with this package.
I renamed the module
what kind of auto-magic am I missing? |
Target diff --git a/pkg/tinyusb/Makefile b/pkg/tinyusb/Makefile
index 770f956d1a..6bc7c7afd7 100644
--- a/pkg/tinyusb/Makefile
+++ b/pkg/tinyusb/Makefile
@@ -11,7 +11,7 @@ PSRC = $(PKG_SOURCE_DIR)/src
.PHONY: all
-all: $(filter tinyusb_%,$(USEMODULE))
+all: $(filter stdio_tinyusb_cdc_acm tinyusb_%,$(USEMODULE))
$(QQ)"$(MAKE)" -C $(PSRC) -f $(RIOTBASE)/Makefile.base MODULE=tinyusb
stdio_tinyusb_cdc_acm: |
13d07bb
to
ddfb8e9
Compare
fails due to multiple definitions of several |
ddfb8e9
to
5ccaa8e
Compare
5ccaa8e
to
f676096
Compare
Murdock results✔️ PASSED ea0cf85 tests/pkg_tinyusb_cdc_acm_stdio: add test for stdio via CDC ACM
ArtifactsThis only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now. |
db50b27
to
8edb2d8
Compare
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.
Feel free to squash it directly.
86fdcdd
to
ea0cf85
Compare
thank you for the common USB descriptors! |
Next task on my ToDo list is a tinyUSB netdev driver for CDC ECM. |
With PR RIOT-OS#18804 the approach to override the default tinyUSB configuration was changed. The update of the documentation was forgotten.
@benpicco Now that we have the stdio implementation for tinyUSB, we could theoretically enable the Before this PR, we couldn't enable tinyUSB for such boards due to the conflict between
What do you think? |
Sounds good! |
I will provide a PR in next few days. |
With PR RIOT-OS#18804 the approach to override the default tinyUSB configuration was changed. The update of the documentation was forgotten.
Contribution description
This hooks up tinyUSB CDC ACM to stdio.
Some more work is needed so this can be used as default stdio on e.g.
esp32s2-mini
:[ ] Use XFA for commonusb_descriptors.c
So we can use application unmodified without providing a custom
usb_descriptors.c
.Testing procedure
Flash the
tests/pkg_tinyusb_cdc_acm_stdio
application on any supported board.Issues/PRs references