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"?
The ARM7TDMI supports the instruction BX LR when in ARM mode. Look at the ARM instruction summary (as opposed the the Thumb instruction summary) and you will see that it mentions BX{cond} Rn.
infocenter.arm.com/.../index.jsp
What exactly do you think your problem is? It is clearly not what your problem really is. I will not waste any more time on you. Goodbye.