Projects Window Use in MPLAB® X IDE

Last modified by Microchip on 2024/01/05 20:31

Projects Window

In MPLAB® X IDE, there are two ways to look at the files in your project. In the top left window, there are typically three tabs by default. The first two are used for looking at the files in your project: The Projects window (discussed here) and the Files window. Though they may show similar contents, their behavior and functionality are different.

To open the Projects window:

Keyboard :  Ctrl+1

Menu: Window >  open project Projects

projects window

The Projects window represents a logical view (also called a virtual view) of your project's files. The folders in this view are for your convenience only - they do not represent the actual locations or organization of the files on your hard disk.

Files must be added to this window (as opposed to the Files Window) for them to be a part of the project. The files themselves don't have to be in the project folder on your hard drive.

You can customize this view by creating or deleting folders (at the top level as well as sub-folders). If there are no open projects, the Projects window will be empty.

Using the Delete key or selecting Delete from the right-click menu will not only remove the file and/or folder from your project, it will also delete it from your hard drive. The deleted files do not go to the trash and are therefore not recoverable. To avoid this, use Remove From Project from the right click menu instead.

Logical Folders

​Logical folders are the blue folders displayed in the Projects window. These folders are strictly for organizing files within the IDE and do not represent the actual location of files on your hard drive. The Files window shows the actual files and directory structure of your project.

By default, MPLAB X IDE will populate your project with six logical folders:

  1. Header Files
  2. Important Files
  3. Linker Files
  4. Source Files
  5. Libraries
  6. Loadables

While most of the folders are dedicated to the function for which they are named and can only contain files related to those functions, the Header Files and Source Files folders are much more flexible. Either of those two folders may contain both source and header files and the folders themselves may be renamed to anything you like. The same is true for any logical folders you create yourself.

You may create new logical folders at the top level or as a sub-folder to one of the existing logical folders. This gives you tremendous flexibility in the organization of your files to make it easy to find and work with everything in your project. The libLCD24 folder shown in the image at left is one possible example of a user created logical folder. Also, if you prefer to mix related source and header files in a folder together, you are free to do so.

logical folder example

Create a Logical Folder

Right click on the node in the project tree where you wish to create a new logical folder.

For example, to create a logical folder at the top level, right click on the chip icon pic-memory-views-memory icon with your project name. Or, to create a sub-folder in the Source Files folder, right click on the Source Files folder logical-folder-files icon. Then, select New Logical Folder from the pop-up menu. By default, the new folder will be named "New Folder n", where n is an integer, but you can rename it to almost anything you like.

creating a new logical folder

Rename a Logical Folder

  1. Right click on a logical folder (if you just created one it's probably called New Folder 1)
  2. Select Rename… from the pop-up menu.
  3. In the dialog box that opens, type in the new name and click OK.

rename a logical folder window
rename dialog box

Remove a Logical Folder

​Removing a Logical Folder will also remove all of its contents from the project. The files will not be deleted from your hard drive.

  1. Right click on the folder you wish to remove
  2. Select Remove From Project from the pop-up menu.
  3. Click OK in the confirmation dialog.

remove a logical folder window
remove logical folder coonfirm dialog box