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

Prevent to generate "BX LR"

Dear All
How can I force the compiler to not generate the "BX LR" for the return function.
I also set the option --ARM_only(in compiler + assembler + linker) but this is not useful and I have this code at last in axf file.
my target in Keil is set to ARM7TDMI (I can not set my target to ARM7 or any other target without Thumb)
so what can we do to prevent generate "BX LR"?

Parents
  • Note that the linked document is describing calling ARM code from Thumb. So it is only relevant if the startup code (and the C RTL) is using Thumb mode.

    What really is important is that running a program that interfaces a Thumb-mode CRTL really must be compiled to play nice with Thumb-mode code. Look at your map file for all your nice CRTL functions you use - they have odd or even address? Any veneers to access them?

Reply
  • Note that the linked document is describing calling ARM code from Thumb. So it is only relevant if the startup code (and the C RTL) is using Thumb mode.

    What really is important is that running a program that interfaces a Thumb-mode CRTL really must be compiled to play nice with Thumb-mode code. Look at your map file for all your nice CRTL functions you use - they have odd or even address? Any veneers to access them?

Children