Automate design rule checks in Autodesk Eagle

In my humble opinion, software engineers are spoiled. They have all the best automation tools because they’re the people that make the tools. In the last decade or so we’ve seen tooling came light-years into the future. With the increased popularity of open source we’ve been spoiled with tools like Travis CI that have become the cornerstone of the open source movement. Without the ability to iterate software confidently in a community setting we never would have made the advances that make open source software so ubiquitous and accessible to programmers of any skill. So why then have we not seen the same advances in the open hardware movement?

Quite simply, the existing tools for open hardware suck. Don’t get me wrong, there’s some gems out there, but where pray tell does one find all the open hardware in the world? Where is the authoritative directory of open hardware? GitHub? That’s a shame. Because last time I checked you couldn’t even preview most CAD files on GitHub.

The good news is that there is a new kid on the block that’s trying to make iterating on hardware as a community a little better. It’s limited right now and (full disclosure) it’s built by yours truly, but I hope it’s a step in the right direction for all you makers out there.

The What, Why, and How

So, you want to put your Eagle CAD files somewhere like GitHub and automatically check them for errors on each change? Previously you would have been hooped – the best bet was to ask people to put a screenshot of their DRC output in a pull request, or download proposed changes yourself and check. EDRC however, will automate all of this for you. Every time you or some else makes a change on GitHub, EDRC will automatically check the design against the DRC (.dru) file you’ve defined and report back whether the check passed.

Here’s how to setup it up, assuming you’ve already setup your project with Git and GitHub:

Create an edrc.yml file in the root directory of your project. This file tells EDRC what to check when you make a change. The file looks something like this:

    - file: "path/to/my-design.brd"

Here’s what each line does:

  1. eagle: tells EDRC that this is an Eagle board file (more formats coming in the future)
  2. drc: tells EDRC that the following files need to have a design rule check run on them.
  3. - file: ... tells EDRC the path to the board file you would like to check. You can put more than one file here.

Once you’ve created the edrc.yml and made sure to give it the path to each .brd file in your repo you now have to setup EDRC to check your design on every change. I assume you’ve already logged into using your GitHub account. Once you have you need to click the Add Project button at the bottom-left-hand corner.

Once you’ve done that, select your GitHub project from the list.

Right now EDRC only supports public projects from GitHub

After you select your GitHub project EDRC will automatically kick off a build of the most recent commit in the project. If you haven’t already committed edrc.yml then it’s time! Commit it with either git commit -ap "adding edrc.yml config" or use your favorite git client to commit. Once that’s done push the change to GitHub and EDRC will automatically pick it up and test it.

A sample build generated by EDRC.

That’s it! Now consider embedding the generated images of your build or the status of your build into your GitHub README or website. Here’s what that looks like for one of my projects:

design rule check status

Happy Making!

, , , , ,

No comments yet.

Leave a Reply

Proudly made in Canada