-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add additional Bazel config tinyUSB and pico_stdio_usb #2264
base: develop
Are you sure you want to change the base?
Conversation
I chatted with @armandomontanez on Friday and I'm going to upload a narrower patch based on his feedback. |
d878d50
to
1bf7317
Compare
I've uploaded a new patch which is a subset of the previous patch Add Bazel label flag for overriding tusb_config.h This adds |
This adds `//bazel/config:PICO_TINYUSB_CONFIG`, which is used to select which tusb_config.h gets linked into the tinyUSB port. This defaults to the tusb_config.h from the pico_stdio_usb (same as before), but allows Bazel users to override this config with their own.
1bf7317
to
8669b97
Compare
Hi, I'm ready for this to be reviewed |
@@ -43,10 +46,6 @@ cc_library( | |||
hdrs = ["include/pico/stdio_usb.h"], | |||
includes = ["include"], | |||
target_compatible_with = compatible_with_rp2(), | |||
visibility = [ |
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.
Publicly exposing this is a little unfortunate, but it's probably the only path forward anyway.
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.
Yeah, I wanted to include the stdio_usb.h in my tusb_config.h, much like the default tusb_config.h does, and I need the header only target to avoid a circular dependency.
Bazel changes look good to me, sorry for the dealy. |
This change the makes the following defines setable in Bazel:
LIB_TINYUSB_HOST
LIB_TINYUSB_DEVICE
PICO_STDIO_USB_ENABLE_RESET_VIA_BAUD_RATE
PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE
This also adds
//bazel/config:PICO_TINYUSB_CONFIG
, which allows overriding the "tusb_config.h" header used to build tinyUSB. This might be used to add additional USB interfaces while preserving the functionality from pico_stdio_usb.