Windows build grbl

From ShapeOko
Revision as of 10:59, 17 January 2012 by Edward (Talk | contribs)

Jump to: navigation, search


grbl! is a free, open source embedded CNC controller for the AVR series of microcontrollers. The initial version is still under development. The source code and an overview of the current status can be found at the github repository.

So, what does this mean? It means that if you know enough to have found grbl, then you probably know enough to get started using it! We just need a couple of tweaks, a bit of black magic, and a little luck!

Installing winAVR

Here we go. First we will need to download and install winAVR. This is the program which will allow you to compile grbl.

  • Download winAVR -
  • Install WinAVR to the default location (C:\winAVR)*
    • NOTE: If you are a neat freak then you may be tempted to put your winAVR installation into your program files. Something like: C:\Program Files (x86)\WinAVR-20100110. You will find that things do not go quite so well if you do that. After trying to do a "make all", I came up with this error: make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4217b3)... after doing some googling, it ends up that it's not wise to change the default install path for winAVR. By putting it inside the program files (x86) folder, I inadvertently caused the error. Apparently, winAVR doesn't like the "()" in the file path! So I had to uninstall winAVR, reboot, and then reinstall winAVR to the DEFAULT path. If you would like to reproduce the error, feel free to install it to Program Files(x86), otherwise, just stick with the default location.

Downloading grbl

  • After winAVR has been downloaded and installed, we can go ahead and download grbl from github.

Verifying install

get to the root
windows command prompt

At this point, you can check your winAVR install by browsing to the grbl directory and typing "make clean" - if no errors occur, then you're good to go on the software front.

Wait, did I mention you have to use a command prompt? It's OK! Don't panic. This is easy stuff.

  • Windows XP: Click on your start button and in the run box type "cmd" (without the quotes).
  • Windows 7: click the start button and just type cmd, then press enter

When your command prompt launches you'll end up with something like this:

  • first type cd / that will bring you back to the root of your C: drive.

You should end up with a window that looks like this. Here are some basic command line commands to get you where you need to go:

  • dir - this will list the contents of the directory you are in. if you have a lot of stuff in the directory, you might want to type dir /p as they will pause after one screenfull of information is shown, press the space bar to see the next screen.
  • if you want to go "DOWN" a directory, or into a directory, type cd eford, this will move you into the eford directory if you were in the users directory
  • cd .. (note the space between cd and ..) This will move you "UP" one directory. so if you're in C:\users\eford and type cd .. you will move into C:\users directory.
  • press the tab button to complete what you're typing. If you're trying to get into the eford folder inside of C:\users you can type cd efo then press tab, and it will complete to eford, press enter and you'll be inside that directory.

Alright, now that we've mastered the command line, and tested that winAVR is installed correctly (by typing make clean inside the grbl directory), we're all set to start building some stuff!

Modify config.h

Before we get all crazy trying to build a hex file, let's modify the config.h file first.

Arduino Installation

  • plug in arduino to PC, wait for PC to install drivers.
  • Right click on "My Computer", select "properties", select device manager.
    • In the tree, expand "Ports (COM & LPT)", your arduino will be the USB Serial Port (COM?)", where the “?” represents the COM


    • If there are multiple USB serial ports, right click each one and check the manufacturer, the

arduino will be FTDI. (Mine is Com6)