Closed sanjay900 closed 1 year ago
You're listing a ton of USB callbacks that your code itself needs to implement if you disable the built-in core USB. If you don''t need to do a MSD, just bring in the code from here: https://github.com/earlephilhower/arduino-pico/blob/84206eb237ae2cc966c0eae759ba09c33367bb77/cores/rp2040/RP2040USB.cpp#L383-L457
There are also some other USB callbacks (BLE??) that show up in your code which are not part of any of the core/libpico.a at all. Nothing we can do here about those, you'll need to implement the CBs as appropriate.
Thank you, that works, however, my other problem is that usb host support is also not enabled, which leads to errors like
src/pico/pico/main.cpp:189:17: error: 'tuh_control_xfer' was not declared in this scope; did you mean 'tud_control_xfer'?
189 | tuh_control_xfer(&xfer);
| ^~~~~~~~~~~~~~~~
| tud_control_xfer
src/pico/pico/main.cpp:200:17: error: 'tuh_control_xfer' was not declared in this scope; did you mean 'tud_control_xfer'?
200 | tuh_control_xfer(&xfer);
| ^~~~~~~~~~~~~~~~
| tud_control_xfer
Sorry, I have no idea how the host stuff in TinyUSB works, and it's not supported in the core build of tinyUSB. Maybe you can enable it using Adafruit_TinyUSB?
I was able to enable it by simply changing tools/libpico/tusb_config.h
and enabling host support there and then running make-libpico.sh.
I may just do this anyways since i want to use a custom build of tinyusb anyways, thanks for your help!
I would like to use NO_USB (with platform.io, so PIO_FRAMEWORK_ARDUINO_NO_USB) so that i can implement a custom vendor device and some host devices with
Pico-Pio_USB
, but it seems thatlibpico.a
does not have support for this built in, and i end up with a lot of linker errors and things don't compile, is there a way around this? I know i can just rebuild libpico.a, but are any plans for a more flexible solution than this?