Where should be defined a device specific ISR when making a static library?
My answer doesn't answer the actual question but proposes a different solution.



I wouldn't try to include the link to the actual ISR into the library.

Instead write code which is supposed to be called by the actual ISR and let the people using your library handle the implementation of the ISR.

This could also mean, that your library is no longer device dependent, as you offload those parts to the outside of the library.

You must document the interface to your library very well, so people know what your function requires to work correctly - if you have any part where you think "Oh that's just logical" - write it down. You're so involved with the library that you don't realize how different it might be for a "simple" user.