MPLAB® Harmony Project Organization and Version Control

MPLAB® Harmony comes with many demonstration examples. These are documented in the Harmony Help File under Volume I: Getting Started > Applications Help.
These demo projects are stored on your computer in the following folder:
<install directory>/apps

You may make a copy of a demo project (closely resembling their application) and locate the copied project in a parallel directory for testing purposes. You may rename the demo folder and design your whole application from this point. Alternatively, you may start a project from scratch (using MHC of course), but still locate your project in the <install directory>/apps folder.

There are clear disadvantages to organizing the project this way when using version control. If you use version control (which is advised when using Harmony and the MHC), don't use this organization because it's not practical for migration to the next versions of the underlying framework.

The following organization is common when using version control (assuming Windows® is used):

  1. Install the Harmony Framework into: C:\projects\harmony Note that there is NO version number after the harmony.
  2. Locate the project in: C:\projects\my_project_name
    • The actual MPLAB X project would be in: C:\projects\my_project_name\firmware\my_project_name.X
  3. Then use MHC to:
  4. Then check your data into your repository.

The recommended way of organizing the repository is to have two of them and use a version control system which is distributed (like GitHub). The advantage of this is when you want to change between framework versions (which involves huge files), the changes can happen in a few seconds, rather than over the time it takes to transfer the data through a network. The general idea is for one of the repositories to be dedicated to the framework, and the other repository to be dedicated to your project.

When it is time to migrate to the next framework, simply create a branch for the next framework version, install it, and check it in. To change between framework versions, simply check out a branch containing the desired framework. The project repository can then be treated as a typical project repository where you wrote all the source (branching and tagging don't depend on framework versions).

© 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.