I'm working on a project for which I need all three timers from the ATMega328 with interrupts. I get an error when I try to compile because Timer0 is used in the millis() function, so it already has an ISR defined in wiring.c. I've commented out the ISR in wiring.c, but I'd prefer to have a different solution: is there a way to exclude certain default libraries (i.e., tell the IDE to not compile wiring.c with the rest of my project)?
I think, the only way is to modify Arduino source files as wiring.c etc. IDE has no any option for your needs. Anyway, HW it is ATmega and you need not the Arduino SW to create program.
Another solution is to use different device with different MCU with more timers.
copy the default arduino core and make a new core from it, and make your changes to that one.