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) Using with AVRDragon (Read 15274 times)
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Using with AVRDragon
Dec 23rd, 2013 at 3:14pm
Print Post  
I have just downloaded the Visual Micro plug in for Atmel Studio and I am having problems with debugging using an AVRDragon programmer.

I understand that VM uses USB serial port for its debugging info but can I switch off VM debugging so it uses the native Atmel Studio debugging?   

I have tried the options to disable it but whenever I try to debug it insists on trying to upload via USB rather than the programmer
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #1 - Dec 23rd, 2013 at 5:43pm
Print Post  
Hi,

Yes as you have noted we use the program called avrdude that installs with Arduino to upload. This program requires the usb drivers specified in this post http://www.visualmicro.com/forums/YaBB.pl?num=1386692800

However, we are currently evaluating how we might support deviations from the standard Arduino system for more advanced users.

This work should include supporting the native Atmel upload process and also better support for Atmel hardware debugger and simulator.

I hope this makes sense, we hope to look at this during the next few months.
  
Back to top
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #2 - Dec 24th, 2013 at 5:02pm
Print Post  
I followed the instructions exactly and created a new driver but now my AVRDRagon isnt even listed in either Arduino IDE or AtmelStudio.

It does show in Windows device manager as working.

This is turning out to be a bit of a nightmare as I am worse off than I was previously
  
Back to top
 
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #3 - Dec 24th, 2013 at 5:18pm
Print Post  
I should add that I am now getting this error showing in Atmel Studio:   usb WDU_INIT failed: error 0x20000007.

I have tried going back to the previous drivers but it makes no difference Cry
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #4 - Dec 24th, 2013 at 9:41pm
Print Post  
Hi,

Sorry for the confusion. When you posted against the avrisp mk II saying the problem was similar I thought you also meant the solution in the thread was similar.

I know the avrisp programmer because I have one and it is listed under programmers in the Arduino Ide.

If listed in the Arduino ide is should also be listed by Visual Micro under tools>visual micro>programmers in Atmel Studio. 

Visual Micro does not currently use any of the Atmel Stdio features for compile or upload. All of these features are overiden to ensure Arduino compatibility. 

However, as an advanced user, you can open the resulting elf and hex files manually in Atmel Studio and do with them as you please. We hope shortly to add some extra features that allows an Arduino project to be easily converted to a standard Atmel Studio project.

So in terms of USB drivers for the AVRDragon programmer to work with Arduino Ide, you should find some examples on the internet maybe on arduino.cc. 

When you have it working in the Arduino Ide it should work with Visual Micro, if not then we would appreciate a bug report to this forum.

Sorry if the documentation has confused this issue.

So right now I think you can only get the AVR Dragon to work easily with normal avr projects. You can delete the usb drivers via control panel>device manager and run the Atmel Studio installer again just selecting re-install of the default Jungo usb drivers or whatever drivers you were previously using. 

Visual Micro uses the same configuration system as Arduino 1.5.5. This system allows news programmers to be easily defined and added to the list of programmers in the Arduino ide and in Visual Micro. You might find that someone has made an Arduino 1.5 format configuration entry for the programers.txt config file?
« Last Edit: Dec 24th, 2013 at 9:54pm by Tim@Visual Micro »  
Back to top
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #5 - Dec 26th, 2013 at 6:48pm
Print Post  
I now understand the issue.  I didn't realise that VM compile was using the Arduino IDE settings.

I still have a problem

Firstly,  I cannot get the AVRDragon to work with the arduino IDE.  I have modified the programmers.txt file but I am getting an error which I think relates to libusb.dll.

So I tried a different tack.  I have a USBasp programmer that works fine with Arduino IDE.  I therefore selected that as the default and tried again in VM/AS6 to see if that would upload.   

Once again I get  'Upload Using' requires a programmer. Upload cancelled.

I have searched for USBasp on this forum and it seems that people have got it working - is this correct?
  
Back to top
 
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #6 - Dec 26th, 2013 at 7:05pm
Print Post  
I have managed to get the USBasp working so we seem to be getting somewhere.

Call me stupid but I didn't realise there was a Visual Micro/Programmers menu.  I was using the preferences menu and the visual micro section at the bottom.

So now I have begun to understand the principles I can probably sort this out now.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #7 - Dec 26th, 2013 at 7:14pm
Print Post  
Great thanks for the update.

Yes the menu options are slightly different to the Arduino Ide. Select programmer from "Tools>Visual Micro>Programmers" and also tick the "Tools>Visual Micro>Upload Using Programmer" (which you had already done)

The idea being that all the standard Atmel or Visual Studio upload/deploy functions (and short cuts) will then use the selected programmer.

Thanks again for the update
« Last Edit: Dec 26th, 2013 at 7:15pm by Tim@Visual Micro »  
Back to top
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #8 - Dec 26th, 2013 at 7:34pm
Print Post  
Another query:  do you have any info on using a programmer such as USBasp together with the usb serial debugger.   

If I plug USBasp into the ISP header on my board as well as the usb port on my board (for debugging) my PC 'blue screens'
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #9 - Dec 26th, 2013 at 7:47pm
Print Post  
Hi, okay I will give that a try but it will still require a usb connection or ftdi type connection with 1 or 2 digital pins on the Arduino. The debugger will not work via the programmer.

I can't say there has been much debugger testing with a programmer connected but there are a few options for you to consider that should provide a solution...

1) The debugger uses the upload port for the default debugger. So first question is have you selected a serial port in the tool bar or on the Tools menu? Even though the upload is not using the port Visual Micro probably will not be expecting an empty/undefined default port unless project properties have been changed.

2) If that fails then try to enter the name of the PC COM port in the "Micro Debug>LocalPort" project property tool window (see "Properties Window" when a project is selected in the solution explorer)

Hope that works okay, if not please let us know. Thanks
« Last Edit: Dec 26th, 2013 at 7:51pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #10 - Dec 26th, 2013 at 7:52pm
Print Post  
Just tested upload via programmer but debug via serial with the default Visual Micro project settings. It worked fine, I had selected the correct COM port using the tool bar.

So I guess you didn't have a port selected?
  
Back to top
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #11 - Dec 26th, 2013 at 7:59pm
Print Post  
Yes I did have a port selected.  I think it's a hardware issue between the USBasp and the arduino USB port.  If I plug the programmer in it works fine but if I then plug in the arduino USB,  the USBASP stops working and after about a minute the BSOD appears.

I will try with FTDI

  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #12 - Dec 26th, 2013 at 8:48pm
Print Post  
Oh sorry. I was being thick. My avrisp mkII uses the ICSP port so I can connect programmer and usb at the same time. From the sounds of it the usbasp programmer uses the usb port of the board. (I haven't had a chance to read up on it).

If you have a board with more than one hardware serial tx/rx port then this is the best option with ftdi. Otherwise the digital pin option automatically makes use of the standard Arduino SoftwareSerial system. SoftwareSerial is okay but normal hardware serial is preferred. 

The youtube video on the debugger wiki page explains some options (the first few seconds are for beginners).

How to use different ports is explained in a few places but this document might give enough info
« Last Edit: Dec 26th, 2013 at 8:50pm by Tim@Visual Micro »  
Back to top
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #13 - Dec 26th, 2013 at 9:34pm
Print Post  
No,  the USBasp has it's own USB interface and connects to the target board via ICSP just like the avrisp.   
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #14 - Dec 26th, 2013 at 9:55pm
Print Post  
Well if you have selected the port then you should be able to leave both usb cables connected to your pc. Upload via one and debug via the other.

Does normal arduino serial work ok in the Visual Micro serial Monitor? Upload without debug then open the Serial Monitor.

void setup()
{
Serial.begin(115200);
}

void loop()
{
Serial.println("Hello world");
}
  
Back to top
IP Logged
 
drpeej
Junior Member
**
Offline


Posts: 27
Location: UK
Joined: Dec 22nd, 2013
Re: Using with AVRDragon
Reply #15 - Dec 27th, 2013 at 12:03am
Print Post  
I have done more testing and I think the problem lies with the USBasp.  The board and the USBasp both work fine on their own but as soon as both are plugged in,  the USBasp stops working and eventually crashes the PC.  I've tried changing the USB Com port number but it makes no difference.   

All serial stuff as well as the debugger work fine if the USBasp isnt plugged in.   I've ordered an AVRisp Mk 2.  Hopefully that will work better.

Thanks for your help on this
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Using with AVRDragon
Reply #16 - Dec 27th, 2013 at 12:34pm
Print Post  
Hi, that makes sense. Nice to have someone with knowledge confirm the situation. Thanks!
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint