Skip to content

usb: make device-next default and move legacy sample code to legacy directory #87269

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

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

jfischer-no
Copy link
Contributor

Make USB device-next samples default and move legacy code to legacy directory.

Copy link
Contributor

@tmon-nordic tmon-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are also some CDC ACM twister failures, some where both USB stacks seem to be active simultaneously and some where there doesn't seem to be CDC ACM devicetree instance.

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endif() without corresponding if.

Copy link
Member

@henrikbrixandersen henrikbrixandersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much same comment as last time this was proposed (see #80985 (comment)):

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.

@jfischer-no jfischer-no force-pushed the pr-samples-usb-use-device_next branch from 53c9919 to 15be1f2 Compare March 26, 2025 12:08
@carlescufi
Copy link
Member

the lack of support for a number of platforms (I know some people find it acceptable to "leave these behind"),

We agreed those would not be a factor I believe, after I sent an informative email to devel@

the list of open bug reports

Which are those? I am not familiar with these.

and especially the vastly increased RAM/ROM footprint as reported in #83309.

Agreed, this needs to be addressed.

@henrikbrixandersen
Copy link
Member

Which are those? I am not familiar with these.

I meant the open issues reported against the device_next stack here on GitHub. Personally, I think the following would be relevant to look at before making this the default stack. Some of these have gone months without any maintainer feedback:

@carlescufi
Copy link
Member

I meant the open issues reported against the device_next stack here on GitHub. Personally, I think the following would be relevant to look at before making this the default stack. Some of these have gone months without any maintainer feedback:

I agree with you. @jfischer-no and @tmon-nordic could you please go over these and see what can be fixed?

@jfischer-no
Copy link
Contributor Author

I meant the open issues reported against the device_next stack here on GitHub. Personally, I think the following would be relevant to look at before making this the default stack. Some of these have gone months without any maintainer feedback:

I agree with you. @jfischer-no and @tmon-nordic could you please go over these and see what can be fixed?

I am on
#74058
#87732 (is not a bug)
#86718 (is not a bug)

@jfischer-no jfischer-no modified the milestones: v4.2.0, v4.3.0 Jun 25, 2025
Use new USB device stack (next) for CDC ACM serial backend. Keep the
legacy configuration for the boards whose drivers are not ported.

Signed-off-by: Johann Fischer <[email protected]>
The driver for the last board, sam4l_wm400_cape, that uses the legacy
device stack was not ported in time, remove CDC ACM serial backend
configuration from this board.

Signed-off-by: Johann Fischer <[email protected]>
Move Audio 1.0 headphones-microphone and headset samples that
demonstrate only legacy device stack functionality to the legacy
directory.

Signed-off-by: Johann Fischer <[email protected]>
Move legacy USB DFU sample to legacy directory and make USB DFU next
sample default.

Signed-off-by: Johann Fischer <[email protected]>
Move legacy WebUSB sample to legacy directory and make WebUSB next
sample default.

Signed-off-by: Johann Fischer <[email protected]>
Move legacy console sample to legacy directory and make console-next
sample default.

Signed-off-by: Johann Fischer <[email protected]>
Move the legacy code of the CDC ACM sample to a separate sample in the
legacy directory.

Signed-off-by: Johann Fischer <[email protected]>
Move the legacy code from the HID mouse sample to a separate sample in
the legacy directory.

Signed-off-by: Johann Fischer <[email protected]>
Move the legacy code from the USB MSC sample to a separate sample in the
legacy directory. Make legacy sample very simple and drop all filesystem
dependencies.

Signed-off-by: Johann Fischer <[email protected]>
Move the legacy code from HCI USB sample to a separate sample in the
legacy directory.

Signed-off-by: Johann Fischer <[email protected]>
Add a sample that covers legacy CDC EEM/ECM and RNDIS functions.
Network functionality is limited to ICMP.

Signed-off-by: Johann Fischer <[email protected]>
Remove legacy netusb code.

Signed-off-by: Johann Fischer <[email protected]>
Use new USB device stack.

Signed-off-by: Johann Fischer <[email protected]>
The change only affects board nrf52840dongle_nrf52840.

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]>
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]>
Use new USB device stack.

Signed-off-by: Johann Fischer <[email protected]>
Add note about legacy samples and update USB samples root documentation.

Signed-off-by: Johann Fischer <[email protected]>
Deprecate legacy USB device support.

Signed-off-by: Johann Fischer <[email protected]>
Document that the legacy stack is now deprecated.

Signed-off-by: Johann Fischer <[email protected]>
Update MCUboot to the version needed for the deprecation of the legacy
stack.

Signed-off-by: Johann Fischer <[email protected]>
@jfischer-no jfischer-no force-pushed the pr-samples-usb-use-device_next branch from 76754f0 to 72a1bf8 Compare June 27, 2025 14:48
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Samples Samples area: USB Universal Serial Bus DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-mcuboot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants