This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

startup file add c-function

Hi,

could you tell me how is it possible to include the At91F_LowLevelInit() function from Atmel in the startup file for the AT91RM9200 controller? The lowlevel-function (written in c) will init the sdram, clocks, flash memory and so on.

(short part of the startup file from Atmel, where the lowlevelinit function is called)

;------------------------------------------------------------------------------
;-Low level Init (PMC, AIC, EBI, ....)
;------------------------------------------------------------------------------

;- Add loop to compensate Main Oscillator startup time
        ldr     r0, =0x00000010
LoopOsc
        subs    r0, r0, #1
        bhi     LoopOsc

        IMPORT    AT91F_LowLevelInit

        ldr       r0, = AT91F_LowLevelInit
        mov       lr, pc
        bx        r0

When I use the startup file from Atmel with this init-function I'm able to start an application downloaded via xmodem in the internal RAM. When I use the startup file from Keil, I'm not able to reach the __main function within the startup file. I don't know why but it seems that the controller is not able to run the whole file supported by keil.

best regards
Hans

0