I am working with the Teensy core libraries and I need to make some modifications for my custom bare-metal board (MK20DX256VLH7).
I have some questions and I don’t understand how to do this:
I have several library files that need modification, but what I would prefer to do is modify copies of these files (i.e., usb_desc.c, usb_desc.h, usb_joystick.c, usb_joystick.h) and force the compiler/linker to use these copies instead. How would I do that?
More importantly I don’t understand how to control the compilation of the program’s attributes such as found in the Arduino Tools menu (Specifically: Board, USB Type, CPU Speed). There must be some file(s) somewhere that sets those definitions or #define statements. Where is that done?
Specifically, what I am trying to accomplish is this: I am trying to modify the Teensy 3.2 Joystick program. I have successfully changed the USB Descriptor report structure to do what I need, but the Teensy also attaches something called Flightsim to the USB packets which include definitions for SEREMU_INTERFACE and FLIGHTSIM_INTERFACE. Again, these appear in the Arduino Tolls menu and there is no option for Joystick by itself.
The SEREMU_INTERFACE is not needed because I debug using J-Link and my board does not use the Teensy boot loader. I’d like to scrap this.
The FLIGHTSIM_INTERFACE is used for X-Plane and not needed. It’s extra baggage I need to get rid of.
If I understood questions 1 and 2 better I might be able to do this on my own, but I am stuck. Any help would be greatly appreciated.