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.

header and source files in CCS v5



I am trying to get familiar with CCS v5.

I imported my projects from CCS v3 pjt file to CCS v5 and I would like to understand the layout of the project in the Project Explorer:

  • In CCS v3 all the header files (.h) where located in the include folder and the all the source files (.c) in the source folder,

after importing to CCS v5 all the source files where located directly to the project and i con't see the header files. (without using CTRL+Left Mouse)

(I have no problem to compile my project).

  •  when i try to add to the project a new header file it appears with all the source files. how can i set the file to appear in the include folder. 

Thanks,

ami

  • The way projects are handled is quite different in CCSv4/5 compared to CCSv3. All source files (.asm, .c, .cpp) within the project folder will automatically picked up as part of the project. Header files are not displayed in the Project Explorer view in a manner similar to CCSv3. However, paths to header files should still be specified in the compiler options under "include options". The directories specified under the compiler include options will then appear in the Project Explorer view but it will be a link to the entire folder, not display only the header files being used by the project.

    This wiki page should help you get familiar with some of the Eclipse concepts that CCSv5 is based on.

  • ami,

    In CCSv3 the \include and \source folders are not real folders.  The project manager just displayed all the source files in the source folder and for the include folder this was populated via the dependency scan, i.e. all the .h files that it found that were referenced were listed.

    In CCSv4/5 the folder structure is file system based.  You see the source files in the root of the project as that is where they are physically located.  If you want to put them into a folder you can create a folder in your project (right click on your project and select New -> Source Folder) and then drag your files into this folder.  This will physically create the folder and then move the files into them.

    The "Includes" folder you see in v5 lists the search paths that you have setup in your build options.  You can expand them and see all the files in these folders.  However it will show all the files and not just the ones that your project references.  Another thing you could do is create a folder, maybe call it Headers.  Then go to your windows explorer.  Drag all the files that you want to see in the project view into this headers folder.  When you drag in a file a dialog will appear asking you if you want to add the file or link it.  If you select add it will copy the file into the folder so instead select link.  This will create an entry in the folder for the file but won't copy it.  This could make it easier for you to navigate your files.

    Regards,

    John