What do you mean with tracing embedded code? You mean adding trace logging?
These are two logging macros which I have put in a file which I use in my home projects.
By turning the compiler switch USE_TRACE_LOGGING on, the macros will print some text to the screen. If the compiler switch is not turned on, then nothing is done. You can use it like this in your functions:
#define LOG_TRACE_ENTRY printf ("LOGGING: TRACE-ENTRY %s\n", __FUNCTION__);
#define LOG_TRACE_EXIT printf ("LOGGING: TRACE-EXIT %s\n", __FUNCTION__);
Note that __FUNCTION__ is a GCC specific feature which gives the name of the function. So it is not ANSI C.
int function ()