7

I just discovered the files in the directory nbproject are required for MPLABX to realize a .X directory is a project. I don't want my teammates to continually struggle with having to update every single time I make a small change, like recompile. What are the minimum files I should I add to my version control system?

Screenshot of what I think are too many files to manage a project:

enter image description here

tarabyte
  • 3,112
  • 10
  • 43
  • 67
  • This seems to be purely a software question, maybe best asked at stackoverflow. What is the recommendation at microchip? – gbulmer Oct 02 '14 at 00:44
  • 1
    Some information from Microchip on the files and directories is here: http://microchip.wikidot.com/mplabx:directory-structure – David Nov 26 '15 at 13:35

2 Answers2

7

We use Mercurial for our embedded projects at the office, including MPLAB X. I came up with the following guidelines for the team when Mercurializing MPLAB X projects:

  • Version all of the source files in the project root directory (duh)
  • Version the Makefile in the project root directory
  • Inside \nbproject, version the following:

    • configurations.xml
    • project.properties
    • project.xml
  • Inside \nbproject\private, version everything:

    • configurations.xml
    • private.properties
    • private.xml

This works well for us where we have varying operating systems and varying versions of MPLAB X. Cloning the repo and opening it works, MPLAB X will recreate the missing files and away you go. The only nuisance will be having to select your own programmer/debugger in project config, but there's no avoiding that - MPLAB X tracks the tools by serial number.

Before starting all this, we also figured out that we need the compilers to be installed in a common location (C:\Microchip\MPLABXC16\vX.XX, C:\Microchip\MPLABXC32\vX.XX, etc.) because depending on 32-bit or 64-bit O/S they end up in \Program Files or \Program Files (x86) which was problematic. I don't think this is still necessary with the above versioning scheme - YMMV.

David
  • 4,504
  • 2
  • 25
  • 44
Adam Lawrence
  • 32,921
  • 3
  • 58
  • 110
5

From http://microchip.wikidot.com/faq:72

Which files in an MPLAB® X Project should be under version control?

The following table lists project files that either need or do not need to be committed to a version control repository.

Directory or File(s) Commit?

Project Directory

Makefile Yes

Source files Yes

build directory No

dist directory No

nbproject directory

configurations.xml Yes

project.properties Yes

project.xml Yes

Makefile- * No

Package- * No

private directory No

Yes: Required to generate the project image. No: These directories/files are regenerated and therefore do not need to be saved.