Visual Studio and the VisualMicro Arduino Plug In

Would you like to help?
Share your walkthrough tutorial with others
Post Reply
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

For those interested in an alternative to the Arduino IDE, there is now the option of building and debugging your project using Visual Studio 10 and a Arduino plugin from Visual Micro.The following link has the steps to register for a free legit copy of Visual Studio 10 and the details for downoading and installing the plugin.

http://www.visualmicro.com/

Additional info
http://arduino.cc/forum/index.php/topic,91434.0.html

Video on the debugging process
http://www.visualmicro.com/tutorials/Ar ... evel1.html


In order to enable debugging you must sign up as a Beta Tester, there is likely going to be a cost for the plugin after the beta stage I would assume. Hope it is reasonable.

As you can see here is the simple Arduino Blink example being debugged, it compiled fully and uploaded to my UNO using Visual Studio and the plugin.
Blink.JPG
Blink.JPG (171.45 KiB) Viewed 13469 times
As well the Reef Angel ExampleCode 1 sketch easily compiled. Unfortunately I don't USB to TTL cable so could not confirm that it would upload correctly to the ReefANgel. I can not see why it would not. I can upload the *.hex using my AVR dragon and ISP and it is fine, but can not debug with the Dragon setup.
RACapture.JPG
RACapture.JPG (215.72 KiB) Viewed 13469 times
I think this setup will be very useful for those power users.
-=Bryan=-
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by binder »

That's cool. pretty interesting.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by rimai »

Awesome.
Thanks for sharing.
I registered. Let's see if I can still get a beta tester license to try out.
Roberto.
Visual Micro
Posts: 4
Joined: Sun Sep 09, 2012 9:13 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Visual Micro »

Thanks for making this post. To answer a few questions:-

1) Yep the upload just uses avrdude.exe in the same way that the Arduino Ide uses it, so upload will be fine.
2) Debug will be very cheap :)
3) I see lots of libraries in your project source. You might find the "Project>Show all arduino files" option useful. It toggles the library sources in/out of the project. With the library sources in your project they will appear in the standard vs tools such as the "Class Explorer". This is also useful for power users that develop the libraries. Allows them to more easily be edited at the same time as the sketch project is edited.
4) Yep beta is still open for the debugger testing because we haven't had time to package and price it:) Good posters and reviewers will get a free license for life. Hint hint :)

Best of luck
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

Thanks for jumping in Visual Micro, good info on the libraries, was wondering how to see the source (.cpp) files in a project

Roberto, I signed up yesterday and got in. From VM's post beta is still open.
-=Bryan=-
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by rimai »

I got the email from them, but I can't find the menu referenced in the instructions :(
Tools>Options>Visual Micro
I'm using the new VS2012 and it seems it is not supported.
So, I have to download the older VS2010 version
Roberto.
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

Hmm, thought it was but perhaps it's just 2008 and 2010 that's supported. Are you trying to install the plugins etc and change settings or trying to show "All Arduino files"
-=Bryan=-
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

Roberto:

Saw your post on the VM forum, was going to ask, but you beat me to the punch :D


Saw this on the main page, but it may be outdated.

"Arduino for Visual Studio 2008 and 2010 is a free Arduino development alternative that provides 100% compatibility with the Arduino programming IDE. Arduino for Visual Studio is currently tracking at nearly 20,000 downloads per year."
-=Bryan=-
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by rimai »

The webspark only allowed me to download the VS2012 version :(
Roberto.
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

Hmm, thats strange, I had no issues downloading. There is a couple versions of VS2010 available, only the Professional version is available for download not Premium. I see Visual Micro has uploaded a new update for VS2012 so you should be good to go with VS2012. If it works let me know and I will install 2012 as well.
-=Bryan=-
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

Roberto;

Was able to get the plugin installed in VS2102. Compiles code and uploads fine, but seems to be a isue with debugging. Getting there anyway. :D
Capture_2012.JPG
Capture_2012.JPG (211.43 KiB) Viewed 11026 times
-=Bryan=-
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

Roberto, do you have a dropbox account?.
-=Bryan=-
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by rimai »

no
what for?
vs2010?
Roberto.
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Bryan »

yes if you needed it..
-=Bryan=-
thekameleon
Posts: 137
Joined: Sat Feb 16, 2013 7:44 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by thekameleon »

For those of you using Visual Studio such as myself. I found some weird behavior with uploaded sketches, sometimes my screens would be blank for no good reason. It appeared to get more severe as I kept adding new code. In the Tools > Options > Visual Micro section there are two Compiler Optimization settings for Core and Library, make sure that are both set to false. That cleared up my issue.
Visual Micro
Posts: 4
Joined: Sun Sep 09, 2012 9:13 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Visual Micro »

thekameleon wrote:For those of you using Visual Studio such as myself. I found some weird behavior with uploaded sketches, sometimes my screens would be blank for no good reason. It appeared to get more severe as I kept adding new code. In the Tools > Options > Visual Micro section there are two Compiler Optimization settings for Core and Library, make sure that are both set to false. That cleared up my issue.
@thekameleon It should not be required to switch off the optimization. It would be appreciated if you would join the Visual Micro forum and help us work through this issue. In the meantime I have a few questions that would be appreciated if answered...

Were you renaming source files?
Setting any compiler #defines?
Just editing code files?
Did you have more than one project of the same name open in different instances of VS?
Do you get this problem with the latest version of Visual Micro?

Thanks, Tim

Tim
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by cosmith71 »

I'm trying to get Atmel Studio to work, as the stock Arduino editor gives me problems.

My problem is, I'm a total noob to this and I can't figure out how to upload to the RA. Anyone have any tips? It seems to want to go to the simulator. Maybe I'm way off?

Thanks,

--Colin
Visual Micro
Posts: 4
Joined: Sun Sep 09, 2012 9:13 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Visual Micro »

cosmith71 wrote:I'm trying to get Atmel Studio to work, as the stock Arduino editor gives me problems.

My problem is, I'm a total noob to this and I can't figure out how to upload to the RA. Anyone have any tips? It seems to want to go to the simulator. Maybe I'm way off?

Thanks,

--Colin
Collin, this might be a bit late but the Visual Micro plugin was released for Atmel Studio last month, see it on visual micro .com
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by cosmith71 »

I have it. I'm just too ignorant to get it to work. :oops:

--Colin
thekameleon
Posts: 137
Joined: Sat Feb 16, 2013 7:44 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by thekameleon »

Visual Micro wrote:
thekameleon wrote:For those of you using Visual Studio such as myself. I found some weird behavior with uploaded sketches, sometimes my screens would be blank for no good reason. It appeared to get more severe as I kept adding new code. In the Tools > Options > Visual Micro section there are two Compiler Optimization settings for Core and Library, make sure that are both set to false. That cleared up my issue.
@thekameleon It should not be required to switch off the optimization. It would be appreciated if you would join the Visual Micro forum and help us work through this issue. In the meantime I have a few questions that would be appreciated if answered...

Were you renaming source files?
Setting any compiler #defines?
Just editing code files?
Did you have more than one project of the same name open in different instances of VS?
Do you get this problem with the latest version of Visual Micro?

Thanks, Tim

Tim
@Tim,
the two things I was doing was editing code files and renaming a few code files. I will try to turn on the optimization and see if it works with the latest.
Visual Micro
Posts: 4
Joined: Sun Sep 09, 2012 9:13 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Visual Micro »

thekameleon wrote:@Tim,
the two things I was doing was editing code files and renaming a few code files. I will try to turn on the optimization and see if it works with the latest.
Okay if renaming files then the compiler cache probably wasn't clearing correctly. If you have renamed files then click "Build>Clean Solution" to clear the cache.

You can also switch on "Tools>Options>Visual Micro>Compiler>Show Build Folder". Switching this option on will give you a little extra detail when you compile. A CTRL+CLICK hyperlink will allow you to view the temporary folder that the compiler uses during an Arduino build. Deleting the TEMPORARY folder will also clear the cache but it can also be useful to have easy access to the build output and the compiled Arduino files.

Best of luck, do feel free to join the Visual Micro forum if you need any speedy help. We can't always promise to spot posts on other forums, not enough man power :)
thekameleon
Posts: 137
Joined: Sat Feb 16, 2013 7:44 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by thekameleon »

I wonder if anyone has actually tried the Visual Micro debugging experience with Reef Angel and Visual Studio
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by rimai »

I know one person that is using it all the time and I used it in the past too, very briefly.
Roberto.
thekameleon
Posts: 137
Joined: Sat Feb 16, 2013 7:44 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by thekameleon »

Even the line by line step through?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by rimai »

No, I tried the variable debugging only :(
Roberto.
Piper
Posts: 298
Joined: Fri Jul 20, 2012 7:13 am
Location: Oakley, CA

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by Piper »

cosmith71 wrote:I have it. I'm just too ignorant to get it to work. :oops:
Colin,

Any luck? I only have the Express versions of VS so I was thinking about trying Atmel Studio today. Just want to know if you made any progress.

[EDIT]
I also found this: http://playground.arduino.cc/Code/VisualStudio Going to give that a shot as well and see which one works better (or works at all) for me.
[/EDIT]

~Charlie
thekameleon
Posts: 137
Joined: Sat Feb 16, 2013 7:44 am

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by thekameleon »

I don't think it will work with VS Express
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by cosmith71 »

Piper wrote:
cosmith71 wrote:I have it. I'm just too ignorant to get it to work. :oops:
Colin,

Any luck? I only have the Express versions of VS so I was thinking about trying Atmel Studio today. Just want to know if you made any progress.

[EDIT]
I also found this: http://playground.arduino.cc/Code/VisualStudio Going to give that a shot as well and see which one works better (or works at all) for me.
[/EDIT]

~Charlie
Yes, after a re-install I got it to working. Apparently it doesn't compile the RA stuff correctly so it's only useful if you're tackling a larger project and don't mind using the Arduino software to compile. In the end I got the Arduino editor to work correctly (it was software that came with my video card causing problems) so I gave up on it. It would be way more than I would need at this point.

--Colin
jgwinner
Posts: 18
Joined: Fri Dec 27, 2013 8:22 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by jgwinner »

PMFJI an older thread, but I've had it working with both the Express or "community" edition of 2013 along with the Visual Micro.

The editor is SO much better than the Arduino editor - intellisense, proper indenting, jump to references, I could go on and on. I'm learning a lot just by poking around the functions.

The only thing I'm unsure of right now is what programmer to use.

I get a choice of:

AVR ISP
AVRISP mkII
USBtinyISP
USBasp
Parallel Programmer
Adruino as ISP

Looking through the Reef Angel IDE, it looks like we use AVRDude. Would the other AVR's work? (wow, a lot to learn!)

== John ==
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Visual Studio and the VisualMicro Arduino Plug In

Post by rimai »

You can use any if them if you have them. They are all going to use avrdude, regardless of which one you use.
If you are using the boot loader that comes with RA and the USB programming cable, it gets uploaded through mkii emulation.
Roberto.
Post Reply