why we set CAMDIVN and CLKDIVN

xiangfu xiangfu at openmoko.org
Fri Jun 20 13:22:10 CEST 2008


Andy Green wrote:
> | ----i still can't run the C function by add "stack_setup".
>
> Can't help from this description. 
i mean if i change
----extern void delay(int time);
to :
----int delay(int time)
----{
----    int i=0;
----    for(i=0;i<time;i++);
----    return 0;
----}

the program not run.the led not blink.
i think this[1] is the problem(I'm not very sure),
in the blink_led program the TEXT_BASE is 0x000000;
so the sp is wrong.
How to resolve this problem.


[1]:
stack_setup:
    ldr    r0, _TEXT_BASE        /* upper 128 KiB: relocated uboot   */
    sub    r0, r0, #CFG_MALLOC_LEN    /* malloc area                      */
    sub    r0, r0, #CFG_GBL_DATA_SIZE     /* 
bdinfo                        */
    sub    r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
    sub    sp, r0, #12        /* leave 3 words for abort-stack    */






More information about the openmoko-kernel mailing list