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 Keyboard Build Error #8

Open
sharpie7 opened this issue Jan 8, 2022 · 4 comments
Open

USB Keyboard Build Error #8

sharpie7 opened this issue Jan 8, 2022 · 4 comments

Comments

@sharpie7
Copy link

sharpie7 commented Jan 8, 2022

Thanks for an amazing project. I mentioned this on the star-dot forum, but maybe it was missed.

I am having trouble building the USB support version on a new-installed OS on a Pi4.

Without the USB keyboard it works fine. However, when I try and make with the USB keyboard support added I get this error:

/home/pi/b-em/src/pico/usb_host_hid/usb_host_hid.c:31:10: fatal error: bsp/board.h: No such file or directory
 #include "bsp/board.h"
          ^~~~~~~~~~~~~

Possibly a missing dependency or bad path somewhere? There doesn't seem to be a board.h file in the listed dependencies, so I am guessing the former. Any advice? Thanks.

@sharpie7
Copy link
Author

On further examination, I believe the missing library is tinyusb, but I am not sure how to configure and incorporate it in this project.

@sharpie7
Copy link
Author

Progress of a kind: it seems you need to manually clone tinyusb in to pico-sdk/lib. Then the make finds the tinyusb install. However, there seems to be a version incompatibility problem due to changes in the API. I tried stepping tinyusb back to commit e0aa405 which might be the version this was originally built against, but even that still has problems.

@sharpie7
Copy link
Author

I have updated the code to use the latest tinyusb release and it is working on my Pico. I will do some more tweaks and upload to a GitHub fork in a few days.

@sharpie7
Copy link
Author

I have added an experimental branch on my fork which will build against the new tinyusb API.

**NOTE: This version seems to compile OK using the latest 'master' branch of tinyusb as at 2022-01-22 and will run, but does exhibit a number of problems: **

  • Occasionally the wrong modifier keys will be detected which causes odd behaviour, including the on-screen menu appearing randomly
  • Keybaord operations (particularly mounting and unmounting) creates glitches in the emulation due to overload
  • Updating the keyboard LEDs does not work for reasons I can't figure out!
  • Keyboards with external or built-in hubs are not supported

The problem with modifier keys is odd and seems to originate in wrong values reported over the tinyusb API. However, I am unable to reproduce it outside of this
application so I assume it is an interaction between this app and tinyusb. Either way, I am not currently able to make progress on fixing it. If anyone has
expertise to help then please drop me a note.

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

No branches or pull requests

1 participant