6.7.2 Add a File to the Project

To add a C code template file to the project:

  1. Right click on the “Source Files” folder in the project tree. Select New>mainXC16.c to open the “New mainXC16.c” dialog.
  2. Enter a name for the new file. The default is newmainXC16.c.
  3. Enter a folder in which to place the file. The default is the project folder. Keeping the file in the project folder makes the project more portable.
  4. Click Finish.

The project tree should now have the Source Files folder open, containing the file added, as well as the new file open in an Editor window (see following figure).

Note: If you add more than one file, the order in which you add these files to the project is the order in which they will be linked.
Figure 6-4. Project Tree and Source Code