About AVR-Libraries

AVR Libraries tried hard to bring maximum functionality at minimum space as it is regularly needed in embedded devices. Unfortunately this implies using RJMP and RCALL instructions which are limited to jumps inside a 4k boundary.

This means that the developers of the library live in the hope that all parts used from the library fit into 4k (more exactly, no jumps more far than 4k would be necessary) even if the whole library is bigger than 4k. From my point of view this is, lets say, stupid.

I hit the limits of this strategy quite soon and the fact that a library fails is extremely frustrating. It costs days and weeks for every single developer just to recognize that you cannot do anything against it. The library developers are responsible for this what, thanks to GPL, does not cost them anything. As a software developer you are faced to the situation that your (error-free) code does not link and there is nothing you can do!

The only possibility would be to build the library yourself and replace at least the problematic RJMP/RCALL by JMP/CALL and thus create something like a private branch of the library. This negates the sense of a library namely you would not have to bother about elementary functions. Bug reports addressing this issue are plodding along for half a year and more without a decision or clear statement of the developers. In my point of view, the developers completely failed in this point. Sit down, dummy.

That's why I had to introduce WITH_UPDATE in my sources. Since the update command is hopefully never needed and it compiles for now (just by accident). I did not find a way to influence the order and thus the necessary jump space to other functions and no official statement on how to get your project working after a "relocation truncated to fit: R_AVR_13_PCREL"!