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

Prefetch Abort while calling __main

Note: This was originally posted on 22nd October 2009 at http://forums.arm.com

Hi All,
    I am calling "__main" instead of "main" in my code for ZI data initialization, for copying code to ram, and for arm library initialization. But, during my program execution I'm facing Prefetch abort. This happens in "__rt_lib_init" function. Can anybody explain the reason for this ?

    I solved it by adding the following code:

    EXPORT __rt_lib_init
    IMPORT main
    __rt_lib_init
    LDR R0, =main
    BX R0

   But why should I get Prefetch abort if I call "__rt_lib_init" ?

Note:
The arm core being used here is ARM7TDMI-S (no cache).
Compiler Options: --apcs /interwork --thumb -O2
Linker Options: --datacompressor off --callgraph

Thanks in advance,
Gopu.S
0