[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Re: eicall & EIND
From: |
Dusan Ferbas |
Subject: |
[avr-gcc-list] Re: eicall & EIND |
Date: |
Sat, 07 Mar 2009 17:47:33 +0100 |
Hi,
in June 2008, I discussed here calling a bootloader from an application.
Now, we recognized that this is a common problem with calling
functions with eicall instruction.
I was asked if I save regs properly etc.
This is not the issue.
Problem was, that once I set eind to 1, proper routine was called,
but at that time an interrupt occured and used another eicall, which
expected eind==0.
But eind was 1 at that time.
So our current solution is to have ints disabled while having eind=1.
Any other advice ?
Upcoming avr-gcc with fixing this ?
Is using trampolines described somewhere ?
------------
This problem is I think common, not only with a bootloader. Once
eicall is generated for a function in upper half flash, targeting
call is misplaced.
The easiest way should be to prepend eicall with eind setup and
linker should modify eind with 1 or 0.
Unless this is implemented instead of eicall, simpler icall is sufficient.
I like this 3 byte PC :-).
------------
I would like to hear from others with 256x applications how they are running ?
Can you check eicall instructions in your listings and report if all
targeting functions are in lower flash half ?
Anyone, who fixed this issue differently ?
At 12:14 30.6.2008, Dusan Ferbas wrote:
Hi guys,
we have 2 issues with eicall instruction on ATmega2561 platform.
1st is, that a call to a constant bootloader (BL) location is
compiled with eicall instruction without setting EIND register.
2nd is, that in BL area, indexed call /that is compiled with eicall/
seems not to work, when used from application area.
We tried both WinAVR-20071221 and WinAVR-20080610.
...
Dusan
- [avr-gcc-list] Re: eicall & EIND,
Dusan Ferbas <=
- RE: [avr-gcc-list] Re: eicall & EIND, Weddington, Eric, 2009/03/08
- [avr-gcc-list] RE: eicall & EIND, Han Hoekstra, 2009/03/09
- Message not available
- RE: [avr-gcc-list] Re: eicall & EIND, Dusan Ferbas, 2009/03/09
- RE: [avr-gcc-list] Re: eicall & EIND, Stu Bell, 2009/03/09
- RE: [avr-gcc-list] Re: eicall & EIND, Stu Bell, 2009/03/10
- RE: [avr-gcc-list] Re: eicall & EIND, Dusan Ferbas, 2009/03/11
- RE: [avr-gcc-list] Re: eicall & EIND, Stu Bell, 2009/03/11
- RE: [avr-gcc-list] Re: eicall & EIND, Dusan Ferbas, 2009/03/11