-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
samples: usb: move legacy USB code to legacy directory and cleanup samples #80985
samples: usb: move legacy USB code to legacy directory and cleanup samples #80985
Conversation
74cf1f2
to
06022db
Compare
de242a5
to
061240a
Compare
061240a
to
a70d603
Compare
a70d603
to
6df2eaf
Compare
430de1c
to
f369530
Compare
Use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
Use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
Use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
Remove netusb code and use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
Remove netusb code, use new USB device stack and CDC NCM implementation. Signed-off-by: Johann Fischer <[email protected]>
Use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
Use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
USB device stack is not used in this sample, remove configuration file overlay. Signed-off-by: Johann Fischer <[email protected]>
Use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
Rework sample to use new USB device stack. Signed-off-by: Johann Fischer <[email protected]>
This function is used for testing purposes only, there is no real use for it in a user application. Remove in favor of implementation in new device stack. Also remove the part of the documentation that depends on loopback. Documentation on how to implement your own USB device function using the new USB device support will follow during the documentation rework. Signed-off-by: Johann Fischer <[email protected]>
7a9729b
to
e12c57a
Compare
@henrikbrixandersen @kartben @nashif we seem to have a problem here preventing us from deprecating the old USB stack: the wio_terminal board uses an IC that has not been ported to the new stack (Atmel SAM0) and enables USB by default, which would then trigger deprecation warnings building any sample with that board. So I think we have 3 options moving forward:
|
Mmmh option 2 is certainly a big no from me, and I'm a bit shocked you even consider this to be an option TBH :) Option 4 sounds like something that impacts MANY boards, a lot more than just Wio Terminal. 21, actually, judging by the upcoming "filter by supported HW feature" addition to the board catalog :) (https://builds.zephyrproject.io/zephyr/pr/79754/docs/boards/index.html then select |
I had to write it, for completness ;)
No, actually, because the other boards do not enable USB by default, and so this would not be an issue: in the legacy samples we would enable the legacy USB stack and that would work just fine with those SAM0/SAM boards. To be clear, the issue with the wio_terminal is that it enables the legacy USB stack by default in its defconfig file, because it enables CDC ACM by default. @kartben I think the simplest would be 3. in my opinion. But 4 could also be a good option for 4.1, since we are unlikely to be able to fully transition to the new stack by then. |
As already stated in an earlier comment on this PR (#80985 (review)) I do not think "device_next" is ready becoming the default USB device stack in Zephyr v4.1. There's the issue with lack of "vendor" testing (tested it on a random selection of development boards, three of the new USB device drivers failed to enumerate on MS Windows), the lack of support for a number of platforms (I know some people find it acceptable to "leave these behind"), the list of open bug reports - and especially the vastly increased RAM/ROM footprint as reported in #83309. These are all mentioned in #42066 but not yet handled with 9 days until v4.1 feature freeze. |
Switching this just before release does not strike me as a great idea regardless of the how ready we think it is. Would make more sense to switch default at the beginning of the cycle and then we'd have the whole integration period for the vendor to test and stabilize. Regardless, switching knowing that some platforms are missing entirely does not sound great either, unless you can make an argument that those platforms are not really used or something like that. |
There was enough time for this platform to move. Also, I did not see you helping, but I did not expect you to.
There is a bug list for the new device stack? Where is this list? The increased resource usage is something you have to live with and accept. There are few things that can be improved, but this is a new design that cannot be compared to legacy device support. Likewise, it is accepted that the resource consumption of the Zephyr RTOS increases with each release. |
I'm not sure I agree here. Define "enough time", and in particular I'm not sure it was clearly communicated that every driver had to move - and by when. I might have missed announcements in TSC meetings or on devel mailing list but simply adding an item to a GitHub issue checklist saying that "stragglers may be left behind" is likely not enough of a notice IMO.
Says who? I really don't think that blanket statement reflects reality, or that users just expect Zephyr to inevitably grow. And Zephyr's footprint has actually remained pretty stable over the years. |
Having read all the comments, here's my two cents. I have to agree it is too late to transition at this point, so instead I would focus on the 4.2 development cycle and warn maintainers early that they need to transition their drivers (Atmel ones in particular) to avoid being left behind. I was convinced I had sent an email about this to the devel@ mailing list some time ago, but I can't find it so I was wrong. I will send an email about this. |
There is an open issue for each driver. This was on Arch WG agenda long time ago, and not once. Finally, the drivers will not be removed now, they will still be there for 2 or 3 releases.
Maybe look at something that can be used in the real world, even something trivial like bt_peripheral grows Or compare LVGL resource usage from version to version. |
All of this is correct, and I guess that's why I had assumed that there was enough visibility about it. The tracking issue has been featured both in the agenda and minutes multiple times, and we had pinged everyone we thought could work on these drivers. But it is true that we did not broadcast it via the mailing lists, which we should've done. |
Move legacy USB code to legacy directory and cleanup samples.
WIP
depends on
#81308#79794