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

USB Middleware #1365

Merged
merged 23 commits into from
Dec 7, 2024
Merged

USB Middleware #1365

merged 23 commits into from
Dec 7, 2024

Conversation

liam-ilan
Copy link
Contributor

@liam-ilan liam-ilan commented Oct 26, 2024

Changelist

  • Added USB middleware flag to stm32 h7 and f4 binary building functions.
  • Setup USB Echo Program on F4 and H7 (H7 not tested due to clock misconfiguration).

Testing Done

  • USB Device Appears as device when plugged into computer (f4dev).
  • Able to communicate with f4dev via pyusb (@setaremalekiii).
  • h7dev untested, to be done when clock configs fixed.
  • Ran subsequent hw_usb library on top of this one, usb comms working awesome.

Resolved Tickets

FIRM-159

@liam-ilan liam-ilan self-assigned this Oct 26, 2024
@liam-ilan liam-ilan added Drivers Shared Hardware Abstractions throughout the boards. Chimera labels Oct 26, 2024
@liam-ilan liam-ilan force-pushed the liam-ilan/usb branch 2 times, most recently from ef5dbfd to 2f9424b Compare November 2, 2024 18:28
@liam-ilan liam-ilan requested a review from Lucien950 November 2, 2024 18:32
@liam-ilan liam-ilan marked this pull request as ready for review November 2, 2024 18:33
Copy link
Contributor

@Lucien950 Lucien950 left a comment

Choose a reason for hiding this comment

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

I am lowkey leaning on not using the STM generated stuff for CDC level of USB at least cause it seems very big and confusing.

Is the delieverable here to have any communication between USB and STM? I assume in a later PR you will do the migration for Chimera from UART to USB.

Overall very good work, and I look forward to the demo on software-dubs

firmware/cmake/embedded.cmake Outdated Show resolved Hide resolved
firmware/cmake/stmlib.cmake Outdated Show resolved Hide resolved
firmware/cmake/stmlib.cmake Outdated Show resolved Hide resolved
firmware/cmake/stmlib.cmake Outdated Show resolved Hide resolved
firmware/dev/f4dev/CMakeLists.txt Outdated Show resolved Hide resolved
firmware/dev/f4dev/cubemx/Src/usbd_cdc_if.c Outdated Show resolved Hide resolved
firmware/dev/h7dev/CMakeLists.txt Outdated Show resolved Hide resolved
firmware/shared/src/app/app_utils.h Show resolved Hide resolved
@Lucien950 Lucien950 marked this pull request as draft November 12, 2024 05:03
@liam-ilan
Copy link
Contributor Author

Whoops - should have left this as draft, need to bring back that -Werror flag. This PR is mine - Setare is building on top of it, I'm assigning myself again.

@liam-ilan liam-ilan marked this pull request as ready for review November 16, 2024 22:50
@liam-ilan liam-ilan requested a review from Lucien950 November 16, 2024 22:50
@Lucien950 Lucien950 added Validation Validation Boards/SSM/Chimera and removed Chimera labels Nov 26, 2024
Copy link
Contributor

@Lucien950 Lucien950 left a comment

Choose a reason for hiding this comment

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

last few things

@@ -81,9 +84,16 @@ function(stm32f412rx_cube_library
"${SEGGER_SYSTEMVIEW_SOURCE_DIR}/Sample/FreeRTOSV10"
)

file(GLOB USB_SRCS
Copy link
Contributor

Choose a reason for hiding this comment

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

no glob required

please move to line 126

Copy link
Contributor

Choose a reason for hiding this comment

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

actually why this cause down there it's the same files

firmware/cmake/stmlib.cmake Outdated Show resolved Hide resolved
firmware/cmake/stmlib.cmake Show resolved Hide resolved
firmware/cmake/stmlib.cmake Outdated Show resolved Hide resolved
firmware/cmake/stmlib.cmake Show resolved Hide resolved
@liam-ilan liam-ilan requested a review from Lucien950 December 3, 2024 01:21
firmware/cmake/stmlib.cmake Show resolved Hide resolved
@liam-ilan liam-ilan merged commit af67934 into master Dec 7, 2024
27 checks passed
@liam-ilan liam-ilan deleted the liam-ilan/usb branch December 7, 2024 19:55
DJ90864 pushed a commit that referenced this pull request Dec 7, 2024
### Changelist 
- Added USB middleware flag to stm32 h7 and f4 binary building
functions.
- Setup USB Echo Program on F4 and H7 (H7 not tested due to clock
misconfiguration).

### Testing Done
- USB Device Appears as device when plugged into computer (f4dev).
- Able to communicate with f4dev via pyusb (@setaremalekiii).
- h7dev untested, to be done when clock configs fixed.
- Ran subsequent `hw_usb` library on top of this one, usb comms working
awesome.

### Resolved Tickets
[FIRM-159](https://ubcformulaelectric.atlassian.net/browse/FIRM-159)


[FIRM-159]:
https://ubcformulaelectric.atlassian.net/browse/FIRM-159?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Drivers Shared Hardware Abstractions throughout the boards. Validation Validation Boards/SSM/Chimera
Development

Successfully merging this pull request may close these issues.

3 participants