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 14:42:04 -0600

Hi

On 5/13/09, Anatoly Sokolov <address@hidden> wrote:
>
>
> avr-libc/crt1/gcrt1.S :
>
>  .section .init0,"ax",@progbits
>       .weak   __init
> ;     .func   __init
> __init:
> .......
> #ifdef __AVR_3_BYTE_PC__
>       ldi     r16, hh8(pm(__vectors))
>       out     _SFR_IO_ADDR(EIND), r16
> #endif        /* __AVR_3_BYTE_PC__ */
>
> This code set EIND to third byte of '__vectors' address.
>
> 1. This code is not clear, it is better use start address of *(.trampolines)
> section instead of '__vectors' .
> 2. More logical to move this code from crt1/gcrt1.S to
> gcc\config\avr\libgcc.S. Btcause the GCC uses EIND internally, then it must
> initialize its.
>

I must be compiling my bootloader wrong, because I don't get any
trampolines in the bootloader.  My indirect jump to 0x0 didn't work,
and neither did my direct jump.  Is there a way to jump to the
application without setting EIND?

Sorry I missed how how gcrt1.S sets EIND since I was looking at the
gcc source code.  We should keep eijmp and eicall.

Also, there is the issue of longjmp setting EIND and not restoring it.
 It gets a little tricky with interrupts that can potentially set EIND
as well.

Sean




reply via email to

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