Skip to content
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

feat(cmock): Enable linux target build for HID, CDC-ACM and UVC hosts #65

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

peter-marcisovsky
Copy link
Collaborator

@peter-marcisovsky peter-marcisovsky commented Sep 19, 2024

Description

As a part of Linux host testing, we have created a mock of USB component in the esp-idf, which will be used for testing of Class drivers within this (esp-usb) repository using Cmock test cases.

This MR adds Linux target build for:

  • HID Host
  • UVC Host

Already buildable Class drivers for linux:

  • CDC ACM Host

Not buildable Class drivers for linux:

  • MSC Host - vfs not buildable for linux
  • UAC Host - Ringbuffer support missing in Freerots Cmock
  • esp_tinyusb - vfs not buildable for linux

As discussed, rather than adding new supported target into the idf_component.yml file, (linux in this case, and other targets in future) the target list was removed from (those class drivers buildable for linux) and a target compatibility will be handled during build.

Changes

  • HID Host linux build + simple cmock unit test
  • UVC Host linux build + simple cmock unit test
  • CDC ACM simple cmock unit test

Related

  • IDF-10351 - USB host testing: CMock on Linux

Testing

  • For each class driver buildable on Linux a simple cmock host test has been added

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@peter-marcisovsky
Copy link
Collaborator Author

MR on hold, until idf core team finds a workaround for linux build without using pthread

@peter-marcisovsky peter-marcisovsky self-assigned this Oct 8, 2024
@peter-marcisovsky peter-marcisovsky force-pushed the feat/hid_host_linux_build branch 2 times, most recently from cd17856 to 00694af Compare October 14, 2024 12:58
@peter-marcisovsky
Copy link
Collaborator Author

Waiting for esp-idf GL sync wit GH, to enable linux build with the current critical section API.

@peter-marcisovsky peter-marcisovsky changed the title feat(cmock): Enable linux target build for HID and CDC ACM host feat(cmock): Enable linux target build for HID, CDC-ACM and UVC hosts Oct 14, 2024
@peter-marcisovsky peter-marcisovsky force-pushed the feat/hid_host_linux_build branch 3 times, most recently from 7b9d757 to f2b3091 Compare October 21, 2024 10:43
@peter-marcisovsky peter-marcisovsky force-pushed the feat/hid_host_linux_build branch 2 times, most recently from da2337f to 74598f7 Compare October 29, 2024 17:24
Copy link
Collaborator

@roma-jam roma-jam left a comment

Choose a reason for hiding this comment

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

Cool! That is a huge start, thanks for this!

Two more questions, otherwise LGTM!

host/class/hid/usb_host_hid/hid_host.c Outdated Show resolved Hide resolved
host/class/hid/usb_host_hid/idf_component.yml Show resolved Hide resolved
Copy link
Collaborator

@tore-espressif tore-espressif left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you !

…ivers

    - HID, CDC-ACM, UVC class drivers can be build on linux target
    - Added linux build test and simple Cmock test run in CI
@peter-marcisovsky peter-marcisovsky merged commit dd9fca9 into master Oct 31, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants