This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: Include Files Recursively

Part Number: AM2434

Tool/software:

Hi,

I'm working on a CCS empty project, and whenever I try to include a header file, I have to put the relative path for it.
is there a way in the new CCS (that's based on vscode) to add the include folder in the settings and it reads them all recursively,
so I don't need to modify the #include every time I put a new one.

  • Hello,

    I'm not sure I quite understand. Are you looking to just have a way to add all the *.h files in a folder to your project? You can explicitly add the whole folder of include files to your project folder so that they are part of the build.

    Thnaks

    ki

  • I acutally found in the settings that I can add a folder or a file path of the header files, but I use it to add the absolute paths. my question is: what is the root path variable so I can do something like this: ${Root_Path}/inc/my_header.h .. where {Root_Path} is the root path of the project.

  • I use ${PROJECT_ROOT}. If you look under General->Variables you can change the selection on the right to show you the system defined variables to see what your options are and what all the variables resolve to.

    Regards,

    John

  • Thanks John. The "PROJECT_ROOT" variable worked, although it's not shown in the variables. All I have in the variables is the MCU_PLUS_SDK_PATH.