Windows Notes

The upload_hex.sh script will work in Cygwin in Windows, but if you see the error:

$ '\r: command not found

then your Git configuration added Windows-style CRLF line endings. To resolve the issue, run this command in Cygwin:

$ set -o igncr && export SHELLOPTS

Installing Dependencies

If the flashing script failed, you may need to manually install the necessary dependencies.

AVR Programmer

The AVR Programmer is included in MPIDE, a package which your computer might or might not already have. Regardless, here are the steps you'll need to take to obtain an AVR Programmer.

If MPIDE is installed: The AVR Programmer avrdude is included in MPIDE. To resolve the dependency issue, you need to set the MPIDE_DIR environment variable in your terminal to point to your MPIDE installation. Check below for more information on setting this.

If MPIDE is not installed: If you don't have MPIDE (don't worry if you don't, you only need the AVR programmer), you can install the programmer separately:

  • Windows
    • Download and install WinAVR
    • or download and install MPIDE from Digilent and set the MPIDE environment variables (see below).
  • Linux - Find avrdude in your distribution's package manager.
  • OS X - Install avrdude with Homebrew

Configuring the MPIDE Environment Variables

The MPIDE_DIR environment variable must be set to the proper installation path of MPIDE for the upload script to work.

To set the variable, find your MPIDE install directory (the default is shown below) and use the export command:

$ export MPIDE_DIR=/Applications/Mpide.app/Contents/Resources/Java

When using export, variables are only saved for your current terminal session (and only in that terminal window). To make the change permanent, add the 'export command above to the file ~/.bashrc (in Windows(Cygwin)/Linux) or ~/.bash_profile (in OS X), then start a new terminal.

If you're still having issues getting your firmware to flash, search the Google Group for the error you're getting, and if you still need help, open a new discussion.