Function pointers beyond the "magical" 128 KiB barrier(s) on larger devices are supposed to be resolved through so-called trampolines by the linker, so the actual pointers used in the code can remain 16 bits wide.

In order for this to work, the option -mrelax must be given on the compiler command-line that is used to link the final ELF file. (Older compilers did not implement this option for the AVR, use -Wl,--relax instead.)

Back to FAQ Index.