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

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

[avr-gcc-list] jump_to_null question


From: Dr. Jan Menzel
Subject: [avr-gcc-list] jump_to_null question
Date: Thu, 24 May 2007 14:40:09 +0200
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Hi all!
I'm currently working on a bootloader for Mega8 and 88 and found a problem I do not yet understand. At the end of the bootloader the code
has to jump to the main reset vector at address 0x0000. If I do the
usual way
        void (*jump_to_null)(void) = 0x0000;
gcc 3.4.6 complies:
        LDI     R30, 0x0102
        LDI     R31, 0x0103
        ICALL
and everything works fine, as expected.
        But if I try to be more specific and define
        void (* const jump_to_main)(void) = 0x0000;
gcc 3.4.6 complies
        RCALL   PC-0x0009
which unfortunately does not what I intended.
Could anyone please point me to my error in reasoning or lack of understanding? Many thanks!

        Best regards
                Jan






reply via email to

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