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.
HUH?
I have several such.
is 'likely' a language problem???? do you mean that you do not 'like' long functions?
Erik
If for some reason you can't live with #define'ing the macro, there's the brutally ugly #include method for inlining:
MyMacro.i -- // I have no idea what the real code is doing // so here's some random small calculation i >>= 1; i++; -- Caller.c -- for (i = 0; i < A_BAZILLION; ++i) { #include "MyMacro.i" } --
The debugger should be able to step into this code. The definition exists in only one place for maintenance.