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: AVR ISP MK2 only work on Atmel Studio (Read 23815 times)
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Solved: AVR ISP MK2 only work on Atmel Studio
Feb 19th, 2015 at 7:42pm
Print Post  
Hello!
I've got my new Clone of AVR ISP MK2 and also installed new Arduino IDE v1.6 just for mk2 to working properly, 
It's work well on Atmel studio 6.2 thank to your Visual micro lasted version  Smiley 
but I got a problem with visual studio, Their is no mk2 available in programmer list as attachments below any idea?
« Last Edit: Feb 24th, 2015 at 1:47pm by Tikki »  

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


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #1 - Feb 19th, 2015 at 8:33pm
Print Post  
Hi,

AVRISP mkII is shown on the Visual Studio menu just below the programmer that you have ticked AVRISP

Thanks
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #2 - Feb 20th, 2015 at 6:11am
Print Post  
I've tried  that option with no success, It come up with this Error

Quote:
Uploading to I/O board using 'AVRISP mkII'
Error during upload using programmer
avrdude: usbdev_open(): did not find any USB device "usb"

The uploader returned an error
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #3 - Feb 20th, 2015 at 11:03am
Print Post  
Hi,

When you install Atmel Studio is conflicts with the std Arduino usb driver.

You have two options. 

1) Switch the usb driver back to arduino. You can do this with the top part of this article http://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.as...

2) Rename the programmers.atmel.txt to programmers.txt in "program files/visual micro/arduino for visual micro/micro platforms/arduinoVER/avr/" and add an environment variables with the location shown inside the text file.
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #4 - Feb 21st, 2015 at 9:10am
Print Post  
Hi, Tim
I've tried the 1st option, It's appeared that driver is installed successfully but disappear from both atmel studio and visual studio,
It might be something wrong with my window's driver, 
So I go with 2nd option and came out with this output error

Quote:
Uploading to I/O board using 'Atmel Studio AVRISP MkII (ISP)'
Error during upload using programmer
The system cannot find the file specified
The uploader returned an error



Update: I've try a few thing on your first option and discover that  driver is installed successfully and work well in 
"Atmel Studio >Tools> Device programming" 
It can read device's id and write bootloader and other thing, 
Only in visual micro mode that is not working
So I start by select AVR ISP MK2 and it came with this error

Quote:
Error during upload using programmer
[ERROR] USB driver attach timed out. (TCF Error code: 1)
The uploader returned an error


then I've try Atmel Studio AVRISP MK2 and get this

Quote:
Uploading to I/O board using 'AVRISP mkII'
Error during upload using programmer
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: usbdev_send(): wrote -5 out of 1 bytes, err = libusb0-dll:err [submit_async] submitting request failed, win error: The system cannot find the file specified.

avrdude: stk500_send_mk2(): failed to send command to serial port

The uploader returned an error
« Last Edit: Feb 21st, 2015 at 1:54pm by Tikki »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #5 - Feb 21st, 2015 at 6:58pm
Print Post  
Hi Tikki,

I think it is all working correctly.

The Visual Micro programmers that have names starting with "Atmel Studio" such as "Atmel Studio AVRISP MkII (ISP)" will only work when the Atmel Usb drivers are installed.

The Visual Micro and Arduino programmers called "AVRISP Mkii" and "AVRISP" will only work when the Arduino (or libusb) usb drivers are installed.

So when using Visual Micro with your current usb driver config you need to select the "AVRISP Mkii" and NOT the "Atmel Studio AVRISP MkII (ISP)"

Does this make sense or have I missed the point?

Thanks


  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #6 - Feb 21st, 2015 at 7:27pm
Print Post  
In that case I use libusb, I've follow your step in 
http://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.as...

Which mean right now I've Avr ISP MK2(lipusb) along side withJungo WinDriver

So I have to select programmer "AVRISP MKii" right?
 
Then I've got this error after try to upload code to arduino

Quote:
Uploading to I/O board using 'AVRISP mkII'
Error during upload using programmer
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive

Upload timed out waiting for a response

The uploader returned an error


What do I need to do next?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #7 - Feb 21st, 2015 at 7:31pm
Print Post  
Thanks for the info.

1) are you saying that the "arduino ide > file upload using programmer" is working okay?

2) please switch on tools>visual micro>verbose messages and try the upload again the post the output

Thanks

  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #8 - Feb 21st, 2015 at 7:40pm
Print Post  
1) No from arduino ide It's got an error like this

Quote:
avrdude: usbdev_open(): error claiming interface 0: libusb0-dll:err [claim_interface] could not claim interface 0, win error: The requested resource is in use.

avrdude: usbdev_open(): did not find any USB device "usb"
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #9 - Feb 21st, 2015 at 7:42pm
Print Post  
2) here is verbose message
  

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


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #10 - Feb 21st, 2015 at 8:06pm
Print Post  
Thanks. It might be worth restarting your pc and getting a clean run at upload via arduino ide.

If that still fails it indicates that the latest arduino 1.6 version has an issue with the libusb system. Maybe fixed in the latest libusb http://sourceforge.net/projects/libusb-win32/

I haven't had a chance to try out the combination with the latest 1.6.

For compile and upload Visual micro just runs the exe commands defined in the arduino config files so in theory things should be the same.

I'll try to find my avrisp mkII and give it a go. Maybe the usb drivers that came with your device dvd might work better. 

Obviously visual micro just uses whatever the manufacturers (arduino/atmel) provide so this is mostly beyond our direct control.
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #11 - Feb 21st, 2015 at 8:25pm
Print Post  
Ok I've try restart and still get the same result.

My device is a clone of mk2 and it's user manual indicate that this device use the same driver as original mk2, So I'm not sure if it is a fault of my device or not.

Anyway  I've order original atmel-ice from atmel company and will arrive in 2 days so I'll give a try on atduino 1.0.5 and atmel-ice then will come to report again if it success or not

Thank you very much for your help Smiley
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #12 - Feb 21st, 2015 at 8:48pm
Print Post  
Hi Tikki,

Okay thanks but for clarity ...

1)
You can install arduino 1.0.5/1.0.6 alongside arduino 1.6.0 and also configure both for visual micro. So you could try this now with your existing hardware?

2)
You had it working with the Atmel/Jungo drivers using the Visual Micro "Atmel Studio" programmers? This won't work in the arduino ide with the atmel drivers but we can make it work in visual studio if you want.
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #13 - Feb 23rd, 2015 at 3:57pm
Print Post  
Hi Tim,
I've got my Atmel Ice this morning and I'm just try it right now.
I've remove everything visual micro, Arduino, Atmel studio, Atmel usb, libusb driver then restart and install it all again (this time no libusb)

Then after I plug Ice, It get driver from windows as attached image below.

In Atmel Studio 6.2 + visual Micro every thing work pretty great!!
I can write bootloader and upload program at speed without any problem but..

In visual studio, Ice did not show up in programmer list.
I've try this method

Quote:
2) Rename the programmers.atmel.txt to programmers.txt in "program files/visual micro/arduino for visual micro/micro platforms/arduinoVER/avr/" and add an environment variables with the location shown inside the text file
.

also  take a look inside the file and found that Atmel-ICE is already in the list

but ICE still not show up as attached image, Any idea?


By the way I discover that if I copy programmer parameter of atmel-ice in visul micro to arduino folder "C:\Program Files (x86)\Arduino\hardware\arduino\avr\programmers.txt"

"Atmel Studio Atmel-ICE" did show up in programmer list but get this error when use

Quote:
Uploading to I/O board using 'Atmel Studio ATMEL-ICE'
Error during upload using programmer
The system cannot find the file specified
The uploader returned an error

« Last Edit: Feb 23rd, 2015 at 5:17pm by Tikki »  

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


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #14 - Feb 23rd, 2015 at 8:39pm
Print Post  
Ok,

leave the programmers.atmel.txt and copy it to programmers.vs.txt

Thanks
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #15 - Feb 24th, 2015 at 1:11pm
Print Post  
From what you say, I'm complete remove every thing, atmel arduino visual micro along with registry key and every folder that are left then begin to install it all over again. 

After finish everything I try to compile in atmel studio first and it is work fine, but for visual studio, after I copy to programmes.vs.txt the open visual studio and compile code  It come out with error as attached file below
  

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


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #16 - Feb 24th, 2015 at 1:13pm
Print Post  
Hi,

You can see in the error message that the path for atmel studio back end is wrong

%AVRSTUDIO_EXE_PATH%\atbackend\atprogram

This means you need to set an environment variable called AVRSTUDIO_EXE_PATH to contain the location of the atmel studio install or edit the programmers.vs.txt and hard code the path

Thanks
  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: AVR ISP MK2 only work on Atmel Studio
Reply #17 - Feb 24th, 2015 at 1:46pm
Print Post  
Wow!! After I set an environment to atmel studio folder It's working!!

Everything is fine now, Thank you very much!!
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12181
Location: United Kingdom
Joined: Apr 10th, 2010
Re: AVR ISP MK2 only work on Atmel Studio
Reply #18 - Feb 24th, 2015 at 1:47pm
Print Post  
Great thanks for the update
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint