KEIL ARM Compiler usually will push LR to stack at the beginning of a function,But it will not when the function does not call any other functions. How Can I Force KEIL ARM Compiler PUSH LR At The Beginning Of Function?
If you insist on it, why not do what you already know and call a function. Even a dummy, do nothing, should suffice.
But it has to be asked ... Why would you insist on wanting it?