3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Use Visual Studio 2010 to Compile AVR Hex Files

Use Visual Studio 2010 to Compile AVR Hex Files
I'm not a huge fan of Microsoft, but man, they do make one slick programming IDE.  In searching around for a solution to use the IDE to program AVR's I came across some scattered instructions.  As I love the intellisense feature of Visual Studio (VS) that automatically makes suggestions for class methods and structure functions and members, I tend to use the IDE when working in largish-sized AVR projects.

This brief instructable will show you how to setup Visual Studio 2008/2010 to use WinAVR and compile your AVR programs into Intel Hex format suitable for uploading to your AVR/Arduino with AVRDUDE and your favorite programmer.

P.S.  Don't forget that if there is an "i" in the upper corner of the picture, you can click it and select a a larger image!
 
Remove these adsRemove these ads by Signing Up
 

Step 1Create your Makefile Project

Create your Makefile Project
Open Visual Studio 2010 and create a new Makefile project.
Select File->New->Project
Then select Visual C++ Projects and scroll until you see Makefile Project.
Select Makefile project, select a name for your project and whether you want VS to create a directory and import into Subversion or another version control management system.
Click Ok

Configure via Wizard
You will get a wizard dialog to create the Makefile project.
Select next to go to the first real page of the wizard.
In the next dialog (see below), you will fill in several boxes.
  1. For "Build Command Line" type make
  2. For "Clean commands: type make clean
  3. For "Rebuild command line:" type make all
  4. Change the name of the executable file output to the name of your hex file with the hex extension.
  5. In the "Include search path" type the name of the WinAVR include directory.  For me, it's C:\WinAVR\avr\include
Click NEXT.
Select the checkbox that makes the configuration the same for debug and deployment solutions, if not already checked. 
Click NEXT or FINISH.



« Previous StepDownload PDFView All StepsNext Step »
3 comments
Jun 8, 2011. 10:42 PMpavelluden says:
And what about gcc error handling by visual studio?
Jan 30, 2011. 1:42 PMZ.K. says:
So, do you have to have the real version of Visual Studio 2010 or will the express version work?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
63
Followers
22
Author:nevdull(The Bold Scientist)
Gian is the VP Research & Development at Open Design Strategies and holds a BA in Molecular/Cellular Biology and an MS in Computer Science. He has a collection of 8-bit microcontrollers and a room fu...
more »