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

BX LR generation

Hello,

I hope somebody can clarify this issue for me - I am sure it is somewhere in th ABI for it escapes me.
Using ARM7 architecture (LPC2478), I have a function written in C that is called (BL) from the startup file. The problem is that the compiler does not generate a "BX LR" instruction at its end. Is there some limitation in place that I am not aware of?

Parents Reply Children
  • if I place the function that is called from startup code in a separate C module - a "BX LR" is generated!

    And you're sure that's not just because the compiler inlined that function, and thus there was no need to return from it?

    A little actual source and actual assembler output of both that function and its caller would go a long way towards clarifying this puzzle...