1

I am following a DIY guide that requires me to patch two arduino core library files: HID.cpp and USBAPI.h. This is not really practical for many reasons. I am not a native C programmer, but I am sure there are better ways to achieve the same without messing directly with system files. How can I override system library files without modifying the originals?

3
  • That all depends on what the modifications are you need to do...
    – Majenko
    Nov 4, 2015 at 18:05
  • @Majenko principally it adds a third device description (HID Remote) to the two devices that are described in those two files (Keyboard and Mouse). I can upload a diff. Nov 4, 2015 at 18:30
  • Can't you just place a copy in the sketches folder and alter this local copy?
    – Gerben
    Nov 4, 2015 at 19:03

1 Answer 1

2

Unfortunately there really isn't any way of doing that other than modifying those files. The good news is that it is perfectly viable to make the modifications under a different "core" and then amend boards.txt with the core containing the modifications.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.