I
iC and iC++
I am developing C code on a micro controller.
I have a bunch of printf statements that I am using to debug my code.
Now, when I am done, i just want to be able to complile the program
and take my hex file and load it onto my chip.
This is what I did..
#define DEBUG_ON
#ifdef DEBUG_ON
#include <stdio.h>
#endif
main()
{
while(1){
//bunch of printf statements for debugging
}
}
Is there a way to make the compiler ignore the printf statements
without me having to individually go and comment them out..
like a macro of some kind..
All help is appreciated..
Thanks,
I have a bunch of printf statements that I am using to debug my code.
Now, when I am done, i just want to be able to complile the program
and take my hex file and load it onto my chip.
This is what I did..
#define DEBUG_ON
#ifdef DEBUG_ON
#include <stdio.h>
#endif
main()
{
while(1){
//bunch of printf statements for debugging
}
}
Is there a way to make the compiler ignore the printf statements
without me having to individually go and comment them out..
like a macro of some kind..
All help is appreciated..
Thanks,