avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

R: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?


From: palmerino tallarico
Subject: R: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?
Date: Tue, 15 Dec 2009 15:50:06 +0100

A note about the use of the trampoline in the AVR256. 
I was in trouble cause a wrong address in the upper 128K using the
trampoline itself due to a linker error (I suppose). At the moment I don't
use EICALL for this reason.
If someone has news about this issue I'm very interested to fix the problem
in my code.
Thank you in advance

Rino Tallarico
_________________________
via Pola 26 - 10135 Torino
tel. +39 347 2261196
mailto: address@hidden

-----Messaggio originale-----
Da: address@hidden
[mailto:address@hidden Per
conto di address@hidden
Inviato: martedì 15 dicembre 2009 14.35
A: Sean D'Epagnier
Cc: address@hidden; Weddington, Eric
Oggetto: Re: [avr-gcc-list] Why are we using EICALL and EIJMP for AVR256?

Thanks, it would be nice if this was documented.

I noticed it when reviewing addressing modes and a omission in call
patterns.

void  (*fptr)();

fptr = main;

(*fptr)();  //Will use EICALL - should be CALL main


which become readily apparent with inlined code.


Andy



---- Sean D'Epagnier <address@hidden> wrote: 
> On 12/14/09, Andrew Hutchinson <address@hidden> wrote:
> > The patterns for AVR mega 256 use EICALL an EIJMP
> >
> > Both require EIND to be set to provide upper address bits
> >
> > However, we are using linker trampolines for both, so in either case the
> > 16 bit jump or call is to the trampolines.
> >
> > Are not the trampolines always located in first 128Kbytes? Thus we
> > should be using ICALL and IJMP and not needing to set use EIND at all.
> >
> > What have I miss-understood?
> >
> 
> Hi,
> 
> Yes this confused me a lot too, but the reason is because the
> trampoline is not in the first 128kbytes for a bootloader, so if the
> compiler uses eijmp and eicall, then it is possible to do indirect
> calls there too, but it still works fine in normal code.
> 
> Sean
> 
> >
> > Andy
> >
> >
> >
> > _______________________________________________
> > AVR-GCC-list mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
> >



_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list





reply via email to

[Prev in Thread] Current Thread [Next in Thread]