Arduino Forum

Development => Other Software Development => Topic started by: Owen-Schwartz on Apr 21, 2020, 10:13 pm

Title: Custom Board Windows IDE USB HID Fails to Compile
Post by: Owen-Schwartz on Apr 21, 2020, 10:13 pm
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!
Title: Re: Custom Board HID.h and Keyboard.h Compiling Issues
Post by: Owen-Schwartz on Apr 25, 2020, 05:16 pm
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.
Title: Re: Custom Board Windows IDE USB HID Fails to Compile
Post by: Owen-Schwartz on Apr 30, 2020, 06:00 pm
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
Title: Re: Custom Board Windows IDE USB HID Fails to Compile
Post by: senderene on Apr 30, 2020, 06:18 pm
It must be in the code...
Title: Re: Custom Board Windows IDE USB HID Fails to Compile
Post by: Owen-Schwartz on Apr 30, 2020, 06:45 pm
If I understand correctly, you are referring to the sketch? I still get the error simply by including Keyboard.h.

I appreciate the response!