AnsweredAssumed Answered

Where does MCUXpresso search for #ifdef's

Question asked by Andy Berger on Mar 6, 2018
Latest reply on Mar 6, 2018 by Erich Styger

Where does MCUXpresso search for defined symbols in order to evaluate active/inactive code as dictated by #ifdef statements?

I'm aware of the Preprocessor "Defined symbols" list in Project Properties.



However, I think that it must also search source files. For example, I have the following code in a header file, module1.h

I have not #define'd DEFINE_GLOBALS anywhere in module1.h. I have defined it in module1.c. However, the Project has other source files that #include module1.h, but which do not #define DEFINE_GLOBALS.


So how does the IDE decide where to look for the #define DEFINE_GLOBALS directive, and how does it choose what to highlight as the inactive code?