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.
e.g.
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?
Solved! Go to Solution.
Eclipse uses a special source file parser which reads the source files and defines. This is independent of the compiler itself you have presen in your tool chain.
That Indexer is configurable, see for example Fixing the Eclipse Index | MCU on Eclipse . Depending on your source files and how you use it, you might disable that heurstic option.
Below are my settings which I'm using for most of my workspaces.
I hope this helps,
Erich
Eclipse uses a special source file parser which reads the source files and defines. This is independent of the compiler itself you have presen in your tool chain.
That Indexer is configurable, see for example Fixing the Eclipse Index | MCU on Eclipse . Depending on your source files and how you use it, you might disable that heurstic option.
Below are my settings which I'm using for most of my workspaces.
I hope this helps,
Erich