Multiple libraries were found for "HID.h"

I tried checking out all the firmware code from github plus all the libs. I am running on Win10 with cygwin and unforunately was unable to get it compile properly. So instead I decided to try to open it with the Arduino IDE.

I’ve installed the Keyboard Model 01 via the Board Manager in the IDE, but when I try to open the Model01.ino sketch that I downloaded from github, it fails with the following error message:
Arduino: 1.8.9 (Windows 10), Board: “Keyboardio Model 01”

WARNING: Category 'Debug' in library Kaleidoscope-Hardware-Virtual is not valid. Setting to 'Uncategorized'
Model01-Firmware:67:43: error: Kaleidoscope-HardwareTestMode.h: No such file or directory

Multiple libraries were found for "HID.h"
compilation terminated.

 Used: C:\Users\erbe\AppData\Local\Arduino15\packages\keyboardio\hardware\avr\1.94.0-beta\libraries\HID
 Not used: C:\dev\tools\Arduino\hardware\arduino\avr\libraries\HID
exit status 1
Kaleidoscope-HardwareTestMode.h: No such file or directory

Is there no way to compile a github version of the Firmware with the IDE? I don’t like the idea of downloading the firmware/sketch from within the IDE itself as it puts it in some burried source folder completely outside of my typical development path. Furthermore, I want to add mine to a git repo and keep in sync with changes made to the stock firmware, which I don’t see how I can manage using the IDE alone.

Thanks,
Eric

I’ve had lots of trouble when trying to build the source from a git clone after installing the Boards-Manager version. I think the latter’s libs take precedence somehow, making it impossible to build the master branch. That said (and because of that experience) I religiously avoid even starting the Arduino GUI now, and haven’t touched it in well over a year, so anything I can say about this may be very out of date.

I’d love to build from git source as well, but I just can’t seem to get the Makefiles to work properly under cygwin.

I’ve setup my SKETCHBOOK_DIR and the ARDUINO_PATH environment variables, but when I run make, I get the following error messages:

$ make -d
GNU Make 4.2.1
Built for x86_64-unknown-cygwin
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'Makefile'...
Reading makefile '/cygdrive/z/keyboardio/hardware/keyboardio/build-tools/makefiles//rules.mk' (search path) (no ~ expansion)...
Updating makefiles....
 Considering target file '/cygdrive/z/keyboardio/hardware/keyboardio/build-tools/makefiles//rules.mk'.
  Looking for an implicit rule for '/cygdrive/z/keyboardio/hardware/keyboardio/build-tools/makefiles//rules.mk'.
  Trying pattern rule with stem 'rules.mk'.
  Found an implicit rule for '/cygdrive/z/keyboardio/hardware/keyboardio/build-tools/makefiles//rules.mk'.
  Finished prerequisites of target file '/cygdrive/z/keyboardio/hardware/keyboardio/build-tools/makefiles//rules.mk'.
 No need to remake target '/cygdrive/z/keyboardio/hardware/keyboardio/build-tools/makefiles//rules.mk'.
 Considering target file 'Makefile'.
  Looking for an implicit rule for 'Makefile'.
  Trying pattern rule with stem 'Makefile'.
  Found an implicit rule for 'Makefile'.
  Finished prerequisites of target file 'Makefile'.
 No need to remake target 'Makefile'.
Updating goal targets....
Considering target file 'all'.
 File 'all' does not exist.
  Considering target file 'build-all'.
   File 'build-all' does not exist.
   Looking for an implicit rule for 'build-all'.
   Trying pattern rule with stem 'build-all'.
   Found an implicit rule for 'build-all'.
   Finished prerequisites of target file 'build-all'.
  Must remake target 'build-all'.
BOARD_HARDWARE_PATH="/cygdrive/z/keyboardio/hardware" /cygdrive/z/keyboardio/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder build-all
Putting child 0x60006aee0 (build-all) PID 4103 on the chain.
Live child 0x60006aee0 (build-all) PID 4103
Building ./Model01-Firmware 0.0.0-g
v1.22-67-g4299-dirty into /tmp/kaleidoscope-erbe/sketch/19140298416722601-Model01-Firmware.ino/output...
FindFirstFile /tmp/kaleidoscope-erbe/sketch/19140298416722601-Model01-Firmware.ino/build: The system cannot find the path specified.
Reaping losing child 0x60006aee0 PID 4103
make: *** [/cygdrive/z/keyboardio/hardware/keyboardio/build-tools/makefiles//rules.mk:80: build-all] Error 1
Removing child 0x60006aee0 PID 4103 from chain.

At which point I get lost how to get this to build from the command line. The tmp folder gets created, but there is nothing in that folder.

Any suggestions would be helpful.

Thanks,

Eric

I ended up bailing on cygwin; it was taking much too much efforts to hack into the kaleidoscope-builder.conf files to set up appropriate Windows-based paths (even using cygpath -d), but in the end, it became too complicated to make sure everything was configured. I found myself hacking away at it piece by piece, and came to the conclusion that anything I did would be a terrible hack job and not survive any changes upsteam.

Instead, I switched to a virtual vm in VirtualBox. My biggest problem was having the VM catch the keyboard while it was bootloader mode. I ended up needing to create a Settings->USB Filter in VirtualBox which mapped any USB device with VendorId 1209 and DeviceId 2300/2301, and change the sleep (post the reset) to 5 seconds. It just catches the bootloader mode and is able to upload the firmware.

You can read more details in the github issue I created to track this.

2 Likes