Open beeka opened 2 years ago
same problem here. undefined reference to `USB_GetHIDReportItemInfo'
undefined reference to `USB_ProcessHIDReport'
compiled on macos 12.1.
git clone -b main https://github.com/fieldofcows/atari-st-rpikb.git cd atari-st-rpikb git submodule sync git submodule update --init --recursive
I've had the same error trying to compile on my Mac (Intel), I tried also in Ubuntu and on a Raspberry Pi running Raspbian, each gave me the same error. The missing symbols are part of HIDParser which seems not to be included in the Makefile, so I added it and it successfully compiled.
Edit following file : atari-st-rpikb/pico-sdk/src/rp2_common/tinyusb/CMakeLists.txt
Add following line after line 91: ${PICO_TINYUSB_PATH}/src/class/hid/hidparser/HIDParser.c
You should have something like this.
target_sources(tinyusb_host INTERFACE
${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/hcd_rp2040.c
${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/rp2040_usb.c
${PICO_TINYUSB_PATH}/src/host/usbh.c
${PICO_TINYUSB_PATH}/src/host/usbh_control.c
${PICO_TINYUSB_PATH}/src/host/hub.c
${PICO_TINYUSB_PATH}/src/class/cdc/cdc_host.c
${PICO_TINYUSB_PATH}/src/class/hid/hid_host.c
${PICO_TINYUSB_PATH}/src/class/hid/hidparser/HIDParser.c
${PICO_TINYUSB_PATH}/src/class/msc/msc_host.c
${PICO_TINYUSB_PATH}/src/class/vendor/vendor_host.c
)
Go back to your build directory and rebuild.
I am unable to build this, getting link errors:
This function looks like it is in
lib/tinyusb/src/class/hid/hidparser/HIDParser.c
but don't see this mentioned in any CMakeLists.txt file (should it be inpico-sdk\src\rp2_common\tinyusb\CMakeLists.txt
?). Adding it to the target_sources for tinyusb_host does build and link but no idea if it is meant to be there.As I wasn't sure what tweaks you had made to tinyusb (and seeing that the library has moved on since your changes), I figured I would try using the current SDK but get errors starting with:
The current SDK doesn't mention
USB_GetHIDReportItemInfo
at all, so the HID_TYPE error is likely to be the first of many.FYI: I'm building this using Ninja in a container based on xingrz/rpi-pico-builder.