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

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

Re: [avr-gcc-list] mcall-prologues completely broken for >128k


From: Sean D'Epagnier
Subject: Re: [avr-gcc-list] mcall-prologues completely broken for >128k
Date: Wed, 13 May 2009 08:35:05 -0600

On 5/13/09, Anatoly Sokolov <address@hidden> wrote:
> Hi.
>
>
>> On 5/12/09, Weddington, Eric <address@hidden> wrote:
>>> I don't understand what you're doing here.
>>>
>>> You've completely removed EIJMP from gcc.
>>>
>>
>> That is correct.  It is better for gcc not to use this instruction.
>>
>
> This prevent using indirect function call in bootloader code for >128KB
> FLASH devices.
>

Well as it stands now, gcc emits eijmp and eicall, but never sets
EIND, so if EIND is non-zero, then the call will most likely fail.
EIND is set by longjmp but not cleared, so if you use longjmp or set
EIND for some other reason, then do an indirect jump, your program
will crash as mine did before I modified gcc (now it runs perfectly)

As far as indirect function call to bootloader goes.. I don't think
it's prevented at all.  You still jump to a trampoline which jumps to
the bootloader which is no different from before.

Sean

> Anatoly.
>
>




reply via email to

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