µVISION: ADDING HEADER FILES TO A PROJECT
Information in this article applies to:
I have created a HEADER FILES group under my TARGET folder. Then I try to add .H files to the group. However, the .H file extension is not listed as an option. What is the proper way to add header files to the project structure in µVision?
Add a header file to the Project window
µVision does not require you to add header files in the project structure, but you may want to add them so you can easily locate and open them for reference. Note that you can right-click on an #include filename in your source code to open that header file.
Add a header file to a source file
In µVision5, towards the top of the source file, right-click and select Insert '#include file' and then select the file.
Some header files get called by other header files, e.g., for projects using CMSIS-compliant code, include the [device_name].h file includes many other helper header files.
If header files don't display in the project window
After successfully building a project, the header file names appear under each source file. Expand each source file to see the header file names. Double-click the header file name to display the header file.
If the header file names do not appear, the Show Include File Dependencies option in the Project window may be disabled.
To enable the option right click on a item in the Project Window and enable Show Include File Dependencies. After that, µVision's Find-in-Files feature will also consider the include files of your project when you search at the project level.
Specify an 'Include Path' for your project's header files
In the Options for Target, C/C++ tab of your project, the Include Paths box allows you to specify the one or more additional folders to search for header files. For more information, see the Include Paths section of the C/C++ on-line help page.
The following Discussion Forum threads may provide information related to this topic.
Last Reviewed: Thursday, August 29, 2019
of your data.