Pages: 1 [2] 3   Go Down
Author Topic: Setting up MS Visual Studio to compile/upload?  (Read 2729 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The free Visual Studio extension for the Arduino IDE was released in beta today by Visual Micro. The addin supports all arduino/avr boards, all libraries and any other source or header files that you might need.

http://www.visualmicro.com/post/2010/04/11/How-to-enable-arduino-Intellisense-in-visual-studio.aspx

If you don't want to use the addin you might find the supporting files useful.

The supporting files include simple .bat files that break up the arduino sketch compilation into obvious chunks. There is also an empty visual studio project file that provides an example of how to configure a visual studio project to compile arduino sketch files

You can read more about how to compile using visual studio here

http://www.visualmicro.com/post/2010/04/11/How-to-compile-an-arduino-sketch-in-visual-studio-using-avr-gcc.aspx

You can find the quick start guide here

http://www.visualmicro.com/post/2010/04/11/Quick-start-guide-to-arduino-programing-in-visual-studio.aspx

Please email beta@visualstudio.com for an unrestricted beta copy of the software
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Visual Micro - Arduino in Visual Studio

I think a fair point was made in this board, therefore, I have decided to make the visual studio addin open source.

Initially it is free to all, when I get a moment i will document and publish the code.


Introduction - Open Source Visual Studio for Arduino

I have been a keen arduino hobbyist for some years, but I have not enjoyed using the arduino/processing IDE. My preference is to use Visual Studio to create Arduino projects. This is why I have created the Visual Micro product, an Arduino AddIn for Visual Studio.

You will find information that explains how to use the product on this site. Use the search bar or "tags" list to find what you are looking for. The forum is a place for ideas, suggestions or general comments and feed back.

Initially I thought it right to charge for commercial use of the product but I have now decided that it should be free and also become open source. The reason for this is that, sites such as DIY Drones and Liquidware make some great products but I have also benefited from their code examples. So this is my opportunity to give to the community.

I have said that I developed this product because I want to use Visual Studio to create and maintain arduino projects. I am not the best developer to do this job and I also do not have much spare time. If anyone else would like to develop this product to be all it can be then I will be happy to supply all the information that I have and provide as much advice as I can give.

Currently in beta, please email for a download link

http://www.visualmicro.com
Logged

Holland
Offline Offline
Sr. Member
****
Karma: 0
Posts: 439
Arduino likes cookies too
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Kudos for converting it to open-source =)
Logged

Ohio
Offline Offline
Full Member
***
Karma: 0
Posts: 227
Arduino Hexapod
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, kudos!  I walked through the installation.  Pretty straight forward, and I only guessed wrong a few times.  smiley

Ahhhhh......  Intellisense......

Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is excellent news, thank you for the post. If you have time I would like to hear about the "wrong guesses" so I can make things more robust.

Any info will be very helpful.

If anyone has any icons for the the buttons it will save me looking. I am very bad at drawing icons!

Logged

Ohio
Offline Offline
Full Member
***
Karma: 0
Posts: 227
Arduino Hexapod
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On guesses:

One I got right - you wanted a file copied to the
You suggested C:\Users\tl\Documents\Visual Studio 2008\Addins
For me it was C:\Documents and Settings\vherm\My Documents\Visual Studio 2008\Addins

Ones I am not sure if I got right, but I see some results so I am hopeful:

>Aside from setting the Visual Micro Tools>Options (see web site for more info) you should also do two other things
Where is Visual Micro Tools?  Dot you mean Visual Studio>Tools>Options>Visual Micro?

On setting up the locations, I am not sure what to put in GCC Application.  I have it blank now.

That is all I can think of for now.  Did I mention that I had fumbled my way through it?  I have not tried compiling and uploading yet.  My project is currently disassembled and my brother wants to drink more than he wants to play robots with me. (shucks, I have to have a beer with him) smiley
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great feedback thanks.

The avr folder should point to the folder that contains the avr-gcc.exe

Mine is set to c:\arduino\arduinoide\tools\avr\bin. (I will put in more effort to discovering the paths)


Can you try this for me please

When you click in the empty gcc location does it auto fill?


Visuual Micro tools options

Yes, "Visuual Micro tools options" refers to Tools>Options>Visual Micro. I'll make that clearer on the site thanks

Compile and Upload

You will need the gcc location and also to set these two options to true

AllowCompile
AllowUpload

Thanks again

Tim
Logged

Ohio
Offline Offline
Full Member
***
Karma: 0
Posts: 227
Arduino Hexapod
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
When you click in the empty gcc location does it auto fill?
No autofill clicking on the empty gcc location.  I browsed.  The closest I could find to your example was this:
C:\ArduinoIDE\hardware\tools\avr\bin

Quote
AllowCompile
AllowUpload
Now set true.

My project is disassembled at the moment.  I will download a simple blink example this weekend and try uploading it from the Arduine IDE, and then from Visual Studio with your addin.

Vince
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Vince, I will look at the auto fill for everyone else but it looks like you have the correct folder name

Thanks again
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To Tim:

Hi Tim,

great ,

would like to try this , am using C# , VS on a daily basis.

Could you mail me the download, ?

thanks,

Pete
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sure, if you send an email to beta@visualmicro.com you should get an email back with a link within an hour or two

thanks
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

VS2010 doesnt have the C/C++ file extension like listed on the site so I am unable to add the arduino file extensions like in the guide. I tried adding to the "extensions to include" but that didnt work. Any ideas?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure you will need it. I didn't bother setting it up in 2010 and it seems to work. It certainly doesn't need any VS settings for the compile, so this would only affect intelliense.

...

Do look at the new VC++ Directories (Include Directories) in PROJECT properties. These really bring the intellisense alive. You need to maintain these manually until ms release a VC.10 addin lib. (See my note on the downloads page about this)

or

If you only use 2010 for arduino then you can globally set the intelliense "include directories" using the View>More windows>property pages>win32
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 25
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im sorry but .pde is not recognised by vs2010 natively and I cannot open any Ardupilot PDE file with any sort of logical method using 2010 and my directories are in the same place as my VB and C work.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 55
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No problem. I want to help sort this out and will post the solution to the visual micro forum

If you want to double click .pde files so that they open it in 2010 you can right mouse click a .pde in windows explorer and select open with?

or

To open a .pde for the first time in 2010 I use file>Open>File and select the .pde.

When you use File>Open>File you will be able to change the view to all files (*.*) and then you will see your .pde file?

Let me know if you need a screen shot of this from my vs 2010
Logged

Pages: 1 [2] 3   Go Up
Jump to: