Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) [Solved] Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Exam. Sketch Question (Read 13369 times)
pcfreak
Newbies
*
Offline


Posts: 6
Joined: Apr 27th, 2016
[Solved] Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Exam. Sketch Question
Apr 27th, 2016 at 4:31pm
Print Post  
Will AVR Dragon work with this setup or do I have to stay with Atmel Studio 7 for this?  Is there an easy way to get the Example Sketches from Arduino IDE and convert them to use in either Atmel Studio 7 or MS Visual Studio with the Visual Micro Plugin?

With Atmel Studio 7 and the Start a New Project with Arduino IDE plugin does not work well for me because I am using an Atmega1284P and that chip is not supported in Arduino IDE libraries.  I can deal with that later I just want to be able to import and have either Atmel Studio 7 or Visual Studio 7 with Visual Micro plugin convert them to an usable format and then go from there.

You Tube showed a very easy way on an older version of Atmel Studio 6 and Visual Studio plugin that created a menu VAssistX which seamlessly imported all the Arduino IDE examples sketches ready to use.

Thanks
« Last Edit: Apr 29th, 2016 at 5:59am by pcfreak »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #1 - Apr 27th, 2016 at 4:41pm
Print Post  
Hi,

maybe some confusion

VAssistX is simply intellisense. Visual Micro provides all the Arduino libraries as standard and also allows you to install new ones.

You do not have to convert any code to use Arduino projects with Visual Micro. The code remains compatible with the Arduino ide.

The Arduino Ide and Visual micro support additional hardware which can be installed using the Board Manager in either ide. There are Arduino cores for the 1284p.

After you have a working system with Visual Micro and Arduino Ide and have had a change to clear the confusion about what is what we can discuss how to hook up the AVR Dragon.

Did you want to use the dragon for upload or debug?

I found this article that explains how to configure the dragon for upload using the Arduino Ide. Visual Micro will work with the same config.

http://fab.cba.mit.edu/classes/863.12/people/charles.fracchia/wk6.html

Hope this helps.

  
Back to top
WWW  
IP Logged
 
pcfreak
Newbies
*
Offline


Posts: 6
Joined: Apr 27th, 2016
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #2 - Apr 27th, 2016 at 9:30pm
Print Post  
Tim@Visual Micro wrote on Apr 27th, 2016 at 4:41pm:
Hi,

maybe some confusion

VAssistX is simply intellisense. Visual Micro provides all the Arduino libraries as standard and also allows you to install new ones.

You do not have to convert any code to use Arduino projects with Visual Micro. The code remains compatible with the Arduino ide.

The Arduino Ide and Visual micro support additional hardware which can be installed using the Board Manager in either ide. There are Arduino cores for the 1284p.

After you have a working system with Visual Micro and Arduino Ide and have had a change to clear the confusion about what is what we can discuss how to hook up the AVR Dragon.

Did you want to use the dragon for upload or debug?

I found this article that explains how to configure the dragon for upload using the Arduino Ide. Visual Micro will work with the same config.

http://fab.cba.mit.edu/classes/863.12/people/charles.fracchia/wk6.html

Hope this helps.



Thanks that will help immensely.  For some reason the ForLoopIteration does not seem to work that way.  I  made a post on this already over on another forum regarding the compile errors I see in Atmel Studio 7.  I will add this config file first then try to see if I can upload the ForLoopIteration directly using Dragon AVR.  But I still have to figure out how to get the Atmega1284P libraries into Arduino IDE and Visual Studio with Visual Micro.  Maniacbug released the libraries for the 1284P as the Mighty and Barbuino I think it was called but those libraries are for earlier versions of Arduino IDE.

Where can I find and add the 1284P config/libraries into Arduino IDE and Visual Studio 2105 with Visual Micro.

I am using the Dragon only to upload for now.  Also when I got done installing Visual Studio 2015 community and adding the C++ add-on as well as the Android add-on etc after installation was complete it broke Atmel Studio 7 so all I had to do is repair it.  Both AS and VS work perfectly now.  Well I hope AS has not broken anything in the VS/VM installation.  As far as I could see everything was working.

Do I need to do any more configuring on VS 2015/Visual Micro?   Tip from your documentation below and a thread you linked to which I read through already.  Will this be a concern for basic Arduino Sketch Examples?

Quote:

TIP - New Clang intellisense system will shortly be released as the default project type for Visual Micro. Clang C++ project types (in Visual Studio) are a better fit for Arduino development than the current Microsoft C++ project type that Visual Micro uses. You can try this out for yourself by installing the Android tools for Visual Studio which use a similar system.


Thanks Again!!
« Last Edit: Apr 27th, 2016 at 9:36pm by pcfreak »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #3 - Apr 27th, 2016 at 9:50pm
Print Post  
Hi,

You will not be able to debug the resulting visual micro or arduino program with a dragon you need to build with visual micro or arduino then in atmel studio click "File>Open object file for debugging". Open the .elf and it will guide you through to a read-only project that can be debugged.

If you want to use Visual Micro to open an existing Arduino project, example or create a new one then the documentation on visualmicro.com clearly shows how to do that and what user interface to expect.

If you open an arduino project with visual micro and have a usb or ftdi connection to the board you can use the serial debugger provided by visual micro. It's simple but has a lot of interesting features.

You can use older version of arduino with visual micro. in fact you can use the zips from arduino.cc and installed 1.0, 1.5.x and 1.6.x all at the same time.

You can use the Micro Explorer in Visual Micro to open examples, install boards or libraries. See the picture below I have selected the mightyCore using auto-discovery then installed the package. (I had to click re-scan a couple of times but it allowed me to install the 1284p)

The downloads page on visualmicro.com gives instructions of how to install for each ide. The atmel version will only work with arduino 1.6.6 and below.
« Last Edit: Apr 27th, 2016 at 9:52pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
WWW  
IP Logged
 
pcfreak
Newbies
*
Offline


Posts: 6
Joined: Apr 27th, 2016
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #4 - Apr 28th, 2016 at 2:14am
Print Post  
Thanks again for all this great information.  Everything is way more fluid with Visual Micro over Atmel Studio and Arduino IDE.  I am almost there with the AVR dragon but unfortunately its using the Jungo Driver so Visual Micro does not see it as a USB device.
« Last Edit: Apr 28th, 2016 at 2:14am by pcfreak »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #5 - Apr 28th, 2016 at 9:20am
Print Post  
Yes, annoyingly this is always a problem after installing atmel studio it breaks the arduino avrdude.exe uploader

This article explains how to set the driver back to something the Arduino ide can work with. Visual Micro will also then be happy.

http://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.as...




  
Back to top
WWW  
IP Logged
 
pcfreak
Newbies
*
Offline


Posts: 6
Joined: Apr 27th, 2016
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #6 - Apr 28th, 2016 at 2:17pm
Print Post  
Tim@Visual Micro wrote on Apr 28th, 2016 at 9:20am:
Yes, annoyingly this is always a problem after installing atmel studio it breaks the arduino avrdude.exe uploader

This article explains how to set the driver back to something the Arduino ide can work with. Visual Micro will also then be happy.

http://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.as...







Thanks again.  Will the AVRDragon show up in Device Manager after this procedure?  It did show up when I ran the inf-wizard.exe in the root of the bin but I uninstalled AVRDragon from device manager and went into bin/amd64 and ran the install-filter-win.exe and it was successful but I do not see the AvrDragon in Device manager?  I removed all instances of LibUSB0.dll's from the arduino 1.6.8 folder.  I wonder if I need to actually run the Arduino EXE installer rather than unzipping it to my own directory or does this matter?  I am thinking if Arduino exe is installed then maybe it will look for the LibUSB in C:\windows\system folder?  Anyhow avrude still gives gives me a message unable to find programmer at com5.  I am on windows 10 64 bit.


Edited a few minutes later:

I actually looked for the Wow64 driver both dll and sys in the system folder and copied them into the Arduino folder root and in drivers/amd64 and Visual Micro worked perfectly.  Arduino IDE still complains about not finding the programmer on com5.  I will work on this some more but great progress so far.  I was never able to program my Atmega1284P in atmel studio 7 with the example script ForLoopIteration which I was able to do today so I am very happy about this.   Thanks Again!!
« Last Edit: Apr 28th, 2016 at 2:37pm by pcfreak »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #7 - Apr 28th, 2016 at 3:20pm
Print Post  
Great.

Yes I think it should show up in device manager. I am not sure why libUsb files ended up in the arduino ide folder because the two things are unconnected.

I don't think the Arduino Ide installs a usb driver for the dragon.
  
Back to top
WWW  
IP Logged
 
pcfreak
Newbies
*
Offline


Posts: 6
Joined: Apr 27th, 2016
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #8 - Apr 28th, 2016 at 3:47pm
Print Post  
Tim@Visual Micro wrote on Apr 28th, 2016 at 3:20pm:
Great.

Yes I think it should show up in device manager. I am not sure why libUsb files ended up in the arduino ide folder because the two things are unconnected.

I don't think the Arduino Ide installs a usb driver for the dragon.



I purposely copied them there sorry for not making that clear.  I did that to see if Arduino IDE would see the board if the driver was placed in the Arduino folder.  Remember I don't use Arduino IDE exe installers unless the installer only places a folder in c:\programs but I would think it would also do some registries to windows registry not sure.  Anyhow that is why I placed them in there.

I cannot get Arduino IDE to work but I am trying a few other ways maybe run the Arduino IDE installer rather than just downloading the zip and extracting it anywhere I want it.

It not showing up in device manager does not affect Visual Micro it works perfect and when I run the USBtest from the libusb-win32-bin-1.2.6.0\bin\amd64 it shows the AVRDragon.  

I will continue to work on this but really I don't think I need Arduino IDE anymore when I can do everything in Visual Micro.  For troubleshooting purposes I would like to resolve it but for now everything is solved!!

Thanks Again!
« Last Edit: Apr 28th, 2016 at 3:48pm by pcfreak »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #9 - Apr 28th, 2016 at 4:45pm
Print Post  
Great. I agree thanks for the update. 

Tips

1)
Arduino should be working if visual micro is. In the Arduino Ide don't forget to click "Sketch>Upload using programmer". The standard Arduino Ide upload button ignores the programmer selection and always attempts normal usl/serial upload.

2)
Because it's working with Visual Micro it sounds like it doesn't appear in Device Manager
  
Back to top
WWW  
IP Logged
 
pcfreak
Newbies
*
Offline


Posts: 6
Joined: Apr 27th, 2016
Re: Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Example Sketch Question
Reply #10 - Apr 29th, 2016 at 5:56am
Print Post  
Tim@Visual Micro wrote on Apr 28th, 2016 at 4:45pm:
Great. I agree thanks for the update. 

Tips

1)
Arduino should be working if visual micro is. In the Arduino Ide don't forget to click "Sketch>Upload using programmer". The standard Arduino Ide upload button ignores the programmer selection and always attempts normal usl/serial upload.

2)
Because it's working with Visual Micro it sounds like it doesn't appear in Device Manager


I have to thank you again for the wonderful help.

I solved the Arduino IDE issue, as you said in #1, I need to upload to programmer from the Sketch Menu but I still got the error that the programmer could not be found.  After looking over the programmers.txt file I tried a couple things and nothing work until I added this last line about avrdude and not it works 100%.  I had noticed that last line was added to the STK500 and AVRISP MKII so I gave it a try and it worked.  Maybe because AVrDragon is not in device manager it needs that one extra script to work I really don't know?  Can't thank you more than enough for this great help.

I had tried everything in so many combinations to get this ForLoopIteration to work in Ateml Studio 7 but the sketch just would not compile without errors.  If it would have compiled then I would have been able to use Atmel Studio 7 with the Atmega1284Pand get this to upload no problems.  I am actually glad now that I was not able to do this because I never would have found your site and help.  Now I can use all 3 products if I want but Visual Micro is just way beyond MVS and AS in my opinion.

dragon.name=Atmel AVR Dragon in ISP mode
dragon.communication=usb
dragon.protocol=dragon_isp
dragon.program.tool=avrdude
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: [Solved] Visual Studio 2015 and VisualMicro support for AVR Dragon and Arduino Exam. Sketch Question
Reply #11 - Apr 29th, 2016 at 12:25pm
Print Post  
Great.

Yes good point. Since Arduino 1.5.x we need to set .program.tool

I didn't see in the original example that it was for Arduino 1.0.x so you did well to spot that.

Normally it is difficult to help people with "non-standard" config because there are so many confusing options but it helps when users are as observant as you are  Smiley

Many people have asked for the dragon but until now no body has confirmed it works.. I have included the dragon in the next release of Visual Micro but it won't affect your config. The Visual Micro one is named "AVR Dragon As ISP". http://www.visualmicro.com/forums/YaBB.pl?num=1462021235/0#0
« Last Edit: Apr 30th, 2016 at 1:49pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint