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
If the flashing script failed, you may need to manually install the necessary dependencies.
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:
avrdude
in your distribution's package manager.avrdude
with HomebrewThe 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.