Project Paths, Files, and Folders

Name Restrictions

You should only use the following ASCII characters for path, file and folder names:

Makefile Restrictions

If you have files or directories within the project directory using either the () or [] characters ( e.g., t (1).c ), or if you use absolute paths to directories with these characters, the characters will cause the "no rule to make target" problem.

The workaround is to avoid doing it at this time. System libraries can be added through the project properties and therefore, do not need to be added to the project.

Windows® Operation System Restrictions

Windows operating systems have a maximum path length of 260 characters. An explanation from Microsoft® is found here: Naming Files, Paths, and Namespaces

Although Windows will attempt to stop you from creating path lengths that are too long, it is possible to do this (from certain applications, cutting-and-pasting, etc.). If a project source file uses such a path, the project will not build correctly.

Additionally, there is a command-line limitation of 8191 characters for Windows OS.

Cross-Platform Operating Systems Restrictions

If you plan on using MPLAB® X IDE on different platforms (Windows, Mac, or Linux® operating systems), be aware of these issues:

  • Use the forward slash “/” in relative paths. The backslash “\” works only on Windows OS platforms. Example: #include headers/myheader.h.
  • Linux OS is case-sensitive, so generictypedefs.h is not the same as GenericTypeDefs.h.

Recommendations

When adding existing files or folders to a project, consider the name restrictions discussed above. Specifically, take care with long paths. Although there is a known limit for Windows OS (path length of 260 characters, command line of 8191 characters), a very long path on other systems may cause issues. If you have problems building, consider shortening long paths or moving files or folders into the project folder.

To ensure the most portable project, use relative paths when importing files or folders.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.