Eagle PCB files and SVN

So I was searching around and didn’t find many pages talking about revision control of Eagle PCB files so I struck out on my own. I have a license for Eagle 5.X so this post covers binary files (Guess where the previous post came from), not Eagle 6 with the new XML based files.

Version control of almost any file becomes a necessity when you work on multiple computers and recently I have needed to use my laptop in addition to my desktop for PCB development. I have a number of existing Eagle projects and a custom library with parts that aren’t included in the normal Eagle libraries on my main desktop. The projects I have contain a schematic file and a board file in a folder under the eagle home directory and the library is also under the same default eagle folder . I’m not a fan of the default directory since all my project stuff is in multiple SVN folders and directories so this post covers SVN management with different folders from the default eagle directory.

The first thing I did is make sure my library would be shared on both my laptop and desktop, first I copied the library to a new folder under an existing SVN checkout. Add and commit the new folder and library as you would any other file. Next select “Options>Directories” menu from Eagle, click at the end of the Libraries entry box and browse and select the file or (if you know where it is relative to your home directory) add $HOME/path/to/library. After clicking OK you should see the library folder under the “Libraries” main list. On the laptop I updated the SVN folder and added the path to the library in that install of Eagle in the same way. For each Eagle install, make sure you click the dot next to the library name in the main list so Eagle knows you want to use this library for your projects.

Next I copied the schematic and board files for a project to a new SVN folder (it doesn’t have to be the same folder as the library) and did an Add and Commit to the files. Going back to the “Options>Directories” I added a new entry to the “Projects” list the same way as for the library. After clicking OK I had the new directory under the Projects list in the main menu. Again, update the SVN on other computers and point any Eagle install to that local checkout. Opening the schematic and board on my laptop, Eagle knew I wanted to use my custom library and all symbols, packages and devices were exactly as they were on the original computer. Just for a test I moved the old library folder and projects on the original desktop to another directory and the schematic and board for the new SVN project loaded up just fine.

I generate Gerber manufacturing files for Eagle using the gerb274x.cam and excellon.cam CAM files provided by Eagle.  The output files are by default added to the root of the project directory, after generation I move them to a rev_X (rev_A, rev_B, etc) folder in the root of the project.  Use SVN Add and Commit the folder and files to have a history of when different releases were created.

The binary files generated by Eagle can be a little difficult to manage in SVN.  My suggestion is to understand a revision control system such as SVN in depth and follow a set of rules to minimize editing the wrong file (Binary files and revision control article).

Anyone else use revision control for Eagle files?

1 Comment

  • By Rick Barnich, June 20, 2014 @ 11:52 am

    I’m just putting Eagle design on Sourceforge SVN for client. Sort of stumbled into creating dirctory, populaitng it with client directories and files, adding my directories anf files.
    Wish had seen your post a day ago. I’m used to using my own files and releasing a snapshot to client on version release. Noticed file date differences between my files and committed files. I understand now.
    Thanks for the post. I plan to look at your other posts as well.

    Rick Barnich KA8BMA

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment

WordPress Themes