...
For 256 devices avr-gcc uses linker trampolines to allow 16 bit
function pointers to reach any function located anywhere in address map.
The EIND is set to zero by gcc. (Trampolines are located in lower memory)
When a function pointer is assigned the address of function (in
upper memory), a full sized jump to the function is added to trampoline table.
The function pointer gets the 16 bit address of this entry.
When the jump occurs - using EICALL, it will jump to trampoline
using 16 bit address and EIND set to zero. The trampoline JMP will
then take it to the function.
If the function is in lower memory, the trampoline is not created by
linker (though I have not checked that!)
Andy
Dusan Ferbas wrote:
Hi, your case is, that a bootloader (BL) uses trampolines.
I described a case in this list (June 2008 and Mar 2009), where an
application calls a BL, where eicall resides.
There is a wiki page about it: http://www.ethernut.de/nutwiki/Nut/ATmega256x
Dusan