Go Down

Topic: Custom Board Windows IDE USB HID Fails to Compile (Read 1 time) previous topic - next topic

Owen-Schwartz

Apr 21, 2020, 10:13 pm Last Edit: Apr 30, 2020, 06:05 pm by Owen-Schwartz
Hi,

I have created a custom board based off of the Arduino Lillypad USB board. I also wrote a simple library that wraps the Keyboard library and provides some other functions to work with my board. The library and board files can be found here: https://github.com/oschwartz10612/Scanner-Pro-MK3/tree/master/arduino_board

My problems comes when trying to compile the simple sketch. On macOS it compiles fine and uploads, but on Windows I get the following error when compiling with my board.

Code: [Select]

fatal error: HID.h: No such file or directory

 #include "HID.h"



It is my understanding that Keyboard only compiles correctly if it is using a supported board. Lillypad USB should be compatible and is the derivative of my board, though some things may have changed and I am unable to identify what those are.

Thank you!

Owen-Schwartz

#1
Apr 25, 2020, 05:16 pm Last Edit: Apr 25, 2020, 05:17 pm by Owen-Schwartz
I figured I would update the current situation with the things I have tried:

- Including the HID library in the libraries folder.
- Including the Keyboard.h library.
- Including the HID cpp and header files in the cores folder.
- Copying over the arduino cores folder and libraries folder.
- Checking boards.txt and the other folders and filed to try to understand how Keyboard compiles for supported boards.

I am at a loss. I cant get this thing to compile.

Owen-Schwartz

#2
Apr 30, 2020, 06:00 pm Last Edit: Apr 30, 2020, 06:04 pm by Owen-Schwartz
I have further tried reverse analyzing other boards.txt and packages to understand the issue here but to no avail. I tried removing the cores folder from my package as do other packages but the IDE could then not find the Arduino.h file.

Why does HID compile for Lillypad USB and micro and not my board despite my package being a clone of the Arduino package? Furthermore with the boards.txt and bootloader being essentially the same with changed names?

I really dont know what to do here guys. Any point in the right direction would be appreciated.

The updated package is here: https://github.com/oschwartz10612/Scanner-Pro-MK3/tree/master/arduino_board


Owen-Schwartz

#4
Apr 30, 2020, 06:45 pm Last Edit: Apr 30, 2020, 06:46 pm by Owen-Schwartz
If I understand correctly, you are referring to the sketch? I still get the error simply by including Keyboard.h.

I appreciate the response!

Go Up