[En-Nut-Discussion] ARM Init code

Michael Jones Michael.e.Jones at web.de
Wed Oct 13 13:54:18 CEST 2010


Hi,
When I look at the init assembler code for e.g. the AT91SAM7se I find the
following:

                
            
        ldr     r1, =RSTC_MR
        str     r0, [r1, #0]
        
        b       __set_stacks

        .ltorg

/*
* Section 2: Set stack pointers.
*/
        .section .init2,"ax",%progbits        
        .global __set_stacks
__set_stacks:

        /*
         * Set exception stack pointers and enable interrupts.
         */
       


Doesn’t the jump (b __set_stacks) totally defeat the point of putting the
different parts of the init phase into different .init segments? And also,
shouldn’t there be a gap between the .init segments so that somebody could
insert enhancements? And, especially before the segment where NutInit gets
called it would be nice to be able to insert some further init code. 

In the AVR code this used to work. Are there some fundamental changes in how
the ARM works or am I overlooking something? Elsewise I would suggest
changing the numbering of the segments and removing the jumps


And ideas or comments?

cu,
Kind Regards,
Mit freundlichen Grüßen,

Michael Jones
Phone:  +49 (6721) 98817-44

L-S-B Broadcast Technologies GmbH
Gustav-Stresemann-Strasse 8, D-55411 Bingen
Amtsgericht Mainz HRB 23345
Geschäftsführer: Frank Sucky, Wilfried Luff

Disclaimer 
As this message might contain confidential information, please notify the
sender if you have received this e-mail by mistake. The sender accepts no
liability for any damage caused by any information or virus transmitted by
this email.






More information about the En-Nut-Discussion mailing list