Posts: 7
Registered: ‎09-13-2017
Accepted Solution

Include not resolving in example software?

Is there a way to fix includes resolving in the example projects, specifically the ones for Thread development are the ones I'm referring to? Using the switch example these:



... etc.


These don't resolve, I assume just because there is a limitation of the IDE trying to convert the macros, but it makes development and trying to understand the code rather difficult. Is there a simple fix to this, some configuration box to check somewhere in project preferences?

Posts: 518
Registered: ‎12-05-2016

Re: Include not resolving in example software?

Hi @brengera,


I don't know of an easy way to fix this so that the Eclipse CDT indexer will resolve those include files.  I was able to create a file I called preinclude.h that has #define values for each of those include files and I added it to the project and then referenced it in the Project Properties [IAR C/C++ Compiler for ARM] > [Preprocessor] section I added it in the "Preinclude file" section.  Then after reindexing the project the include files were resolved so that the value shows up in the hover window and selecting the file and hitting F3 would open the include file.




Probably not the best solution, but the files / paths in the preinclude.h file are pretty generic, so that file or something similar could be added to Thread projects that use the IAR ARM compiler.  Not all Silicon Labs SDKs specify include files in this way, so it is really only an issue for the Thread, EmberZNet and Flex SDKs.


I hope this is useful to you.


Thank you,



Posts: 7
Registered: ‎09-13-2017

Re: Include not resolving in example software?

Shame, I was really hoping there was a simple 'make the indexer better' button hidden away, but your suggestion at least makes it more bearable. Thanks for the help