Let's Make Robots!

Manual compile and upload

We decided to get rid of the Arduino IDE for our project, and switch to make/avr-gcc/avrdude. Sure, the IDE is great for beginners and those who write small to medium-small projects, but it's awkward to use with larger projects using lots of files and several people coding at the same time. And the PC our university has provided to us is quite slow so some stuff take way too much time.

The transition wasn't as easy as we had hoped for though, and it took a day to figure everything out. So to hopefully make things smoother for others, here's how we did it.

Download and install gcc-avr, avrdude and gnu make.

Get this makefile ( http://electrons.psychogenic.com/modules/arms/art/8/AVRProjectOrganizationStandardizedAVRMakefileTemplate.php ) which is a very good start, and requires few changes to add files to your project. I added some extra variables for avrdude to set the conf file and upload speed.

Set avrdude to use stk500v1 as programmer and override comport baudrate to 57600. Got lots of error messages from avrdude until I finally managed to turn on upload.verbose in the Arduino preferences.txt (go to the IDE's preferences, and there's a link to this file) so I could see the exact commands that it used to launch avrdude.

If you're having problems with avrdude you maybe have to use the files shipped with Arduino IDE, as I read something about a patched version. We're using them now and I don't want to risk breaking something by installing the vanilla avrdude :)