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
Parents
  • Note: This was originally posted on 22nd October 2009 at http://forums.arm.com

    I wouldn't suggest your work around as a long term solution.  :lol:

    If you are scattering loading, I would suspect that something in your scatter file is wrong.  Scatter loading occurs in __main() before the call to _rt_lib_init().  I suggest that you double check your scatter file and compare with your memory map.  You might also want to check if you stop before _rt_entry(), that memory contains what you expect it to.
Reply
  • Note: This was originally posted on 22nd October 2009 at http://forums.arm.com

    I wouldn't suggest your work around as a long term solution.  :lol:

    If you are scattering loading, I would suspect that something in your scatter file is wrong.  Scatter loading occurs in __main() before the call to _rt_lib_init().  I suggest that you double check your scatter file and compare with your memory map.  You might also want to check if you stop before _rt_entry(), that memory contains what you expect it to.
Children
No data