How to add entire path into IAR

7.9k views Asked by At

I just start to use IAR Embedded workbench and meet an issue now. What I need to do is to make a project via IAR with some specific file(.h and .c).

In Eclipse I can add a directory, and then when it compiles, it will scan every sub-directories in the directory to find the included files. I did the same in IAR, but it didn't work. The IAR only scans the directory I added in the 'preprocess' TAG, and it never scans the sub folders in it. Is there any way that can help me to let the IAR scan the 'entire directory', not only the current path?

I'm not sure if my description is accurate or not. Please let me know and help me with this issue. Thank you so much!!!!!

2

There are 2 answers

0
Thad Smith On

Your description of the IAR C and C++ include file search is correct: you must explicitly include the directory. The compiler does not search subdirectories.

If the number of subdirectories makes entry in the [IDE Options> Preprocessor > Additional include directories] entry table unwieldy, you can place them in a separate text file and add "-f " in the extra options. Note that using that parameter you may want to use the $PROJ_DIR$ as a root for a relative path.

0
badmojo On

$PROJ_DIR$ does not seem to get expanded if you put the include directories in a file and use -f