I'm trying to wrap V-USB into a Library for Arduino IDE. I've got it working, but I can't configure it from the sketch. The code is quite old and using defines to configure most of the parameters, such as pin numbers, VID, PID, various USB descriptions, additional API/callback calls.
One idea is to have vusbconfig.h file in the sketch folder that is used when the library is compiled, but apparently the working directory is different from the sketch folder itself and compiler can't locate the file. The sketch directory is not listed during the building process (-I flag) either so I can't make it working. I tried both:
It works just fine when the full path is used from the library, but this will work only for a single sketch.
Another idea is to have dummy header-only library that includes all code in the .h file. The problem with this approach is that I can't compile ASM code this way. I tried C-include and ASM-include:
asm( #include "usbdrv/usbdrvasm.S" );
asm( ".include \"usbdrv/usbdrvasm.S\"" );
but neither worked (compiler can locate the file, but compilation fails).