Hi, I want to avoid the CALL \ RET overhead of a certain function which is called only once in my program.
I understand the uVision compiler does not support the inline keyword (http://www.keil.com/support/docs/1755.htm), and I should use macros instead. The problem is that uVision cannot step into macros when debugging.
Is there any good solution for this problem?
"This will produce function with hundreds of lines, that is obviously not likely."
There's nothing "unlikely" about it.
If execution speed is of paramount importance, then you do what is necessary...
You can have it "pretty" or you can have it "fast" - you can't have your cake and eat it!
"I want to keep a modular and efficient code"
Whether you use a macro or write the code verbatim makes no difference to either modularity or efficiency!
"think of it within a loop"
Is it in a loop? You didn't state that!