Indexer not propagating makefile symbols to included headers [message #1858879] |
Thu, 27 April 2023 18:27 |
Eclipse User |
|
|
|
I am working with a makefile based SDK. Macros defined in the project makefile determine which SDK modules are included in the build. These are then passed to the compiler using "-DBUILD_[module]" parameters in calls to arm-none-eabi-gcc. [module] is used here as an example, actual code contains a valid switch.
The main.c file #includes a header provided by the SDK named "test_dev.h". This header then conditionally includes module headers based on the BUILD_[module] macros, as follows:
main.c
test_dev.h
#define SOMETHING
// Conditional include
#if defined (BUILD_[module])
#include <[module].h>
#endif
[module].h
As is, the indexer resolves SOMETHING, but not SOMETHING_ELSE. If I move the conditional include block from test_dev.h to main.c, both SOMETHING and SOMETHING_ELSE get resolved.
I've done the following so far:
1. Enabled VERBOSE builds to include the compiler calls in the Console
2. Enabled the CDT GCC Build Output Parser with the pattern: (arm-none-eabi-gcc)
3. Rebuilt the project from scratch
4. Rebuilt the index
5. Created a Parser Log File for main.c
6. Verified that BUILD_[module] symbol IS listed in the log
Not sure where to go from here.
|
|
|
Powered by
FUDForum. Page generated in 0.03688 seconds