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] 2  Send TopicPrint
Hot Topic (More than 8 Replies) How to install AVRISP mkII programming usb drivers for Arduino? (Read 27678 times)
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
How to install AVRISP mkII programming usb drivers for Arduino?
Dec 10th, 2013 at 4:26pm
Print Post  
If I compile the standard Blink.ino in within Arduino IDE, then I can in AtmelStudio (6.1.2730 service pack 2) use Tools|Device programming to program the resulting hex file via AVRISP mkII to the arduino board.  That works.

But naturally I want to compile the same Blink.ino within AtmelStudio, and it should automatically upload via the AVRISP mkII after compiling (F5).
This does not work.  The menu item "Upload using programmer" is ticked and "Programmers" is set to "AVRISP mkII".  Pressing F5 produces:

Compiling 'Blink' for 'Arduino Nano w/ ATmega168'
Binary sketch size: 2952 bytes (used 21% of a 14336 byte maximum) (0.20 secs)
Uploading to I/O board using 'avrispmkii'
avrdude: usbdev_open(): did not find any USB device "usb"
« Last Edit: Dec 28th, 2013 at 4:19pm 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 AVRISP mkII for programming sketches does not work
Reply #1 - Dec 10th, 2013 at 4:49pm
Print Post  
Thanks for the report. We will investigate during the next few days
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: using AVRISP mkII for programming sketches does not work
Reply #2 - Dec 16th, 2013 at 3:30pm
Print Post  
One thing to check. Now that you have restarted your pc does this problems still happen?
  
Back to top
IP Logged
 
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
Re: using AVRISP mkII for programming sketches does not work
Reply #3 - Dec 16th, 2013 at 3:50pm
Print Post  
Yes, this problem still exists.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
How to install AVRISP mkII programming usb drivers for Arduino?
Reply #4 - Dec 16th, 2013 at 8:10pm
Print Post  
I'm setting up an avrisp mkII on a new computer to try to replicate the problem.

I haven't installed the usb driver yet so both Visual Micro and the Arduino Ide report.

1)

Can you please report the name, manufacturer and date of the usb driver that you see in "Windows Control Panel\Device Manager" for the avrispmkii so that I can use the same and also which area of device manager does the avrispmkii appear. 

2)
Please confirm that in the Arduino ide you are clicking File>Upload using programmer"


Thanks

Quote:
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "D:\Arduino\arduino-1.5.5/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : stk500v2
avrdude: usbdev_open(): did not find any USB device "usb"

« Last Edit: Dec 28th, 2013 at 4:17pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
Re: using AVRISP mkII for programming sketches does not work
Reply #5 - Dec 17th, 2013 at 2:21pm
Print Post  
1) At Device Manager|Jungo|AVRISP mkII|properties|Driver
I read:

Driver Provider: Jungo LTD
Driver Date: 2012-02-27
Driver Version: 11.0.0.0
Digital Signer: Atmel Norway

Under driver details there is also:
File version: 11.30 built by: WinDDK

Where can I get the avrdude info from your quote?  (Its not in the Arduino verbose output)

2) Tried that, but never could get it working:
avrdude: stk500_getsync(): not in sync: resp=0x00
Instead I've been uploading the hex files from Arduino IDE via AVRstudio5+AVRISP mkII in the past.  I suspect that the AVRstudio installation prevented Arduino IDE to use AVRISP mkII.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: using AVRISP mkII for programming sketches does not work
Reply #6 - Dec 17th, 2013 at 2:29pm
Print Post  
Good yes this makes more sense now. The Atmel install certainly causes these problems in both Arduino and Visual Micro.

I can tell you that Atmel Studio uses different usb drivers to Arduino and that Arduino uses avrdude.exe to perform the upload and that Visual Micro does the same.

The missing usb driver details I posted appear in the Arduino Ide when clicking "File>Upload using programmer" and the same appears in Visual Micro is "Always use programmer" is ticked. 

The Jungo driver doesn't work with avrisp mkII in Arduino mode. If you can't find the correct usb driver for Arduino let me know and I will try to find you an example.
« Last Edit: Dec 17th, 2013 at 2:31pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
Re: using AVRISP mkII for programming sketches does not work
Reply #7 - Dec 17th, 2013 at 3:02pm
Print Post  
Wow!   
So VisualMicro in AtmelStudio and cpp projects in AtmelStudio use incompatible drivers?!
Would using Jungo drivers for both not be a useful option?
Or why not: also using avrdude by both?  (for users where that works)

>The Atmel install certainly causes these problems in both Arduino and Visual Micro.
Did you mean earlier versions only?  Or is this still the case for new installs with Atmelstudio6?
And how can I repair these problems?

>The missing usb driver details I posted appear in the Arduino Ide when clicking "File>Upload using programmer" and the same appears in Visual Micro is "Always use programmer" is ticked.
Hmm, nothing appears in both when I do this.

>If you can't find the correct usb driver for Arduino let me know and I will try to find you an example. 
Any help would be appreciated.  Reinstalling Arduino is not enough (tried that before).  Just tried "Update driver" button in the Port properties (COM11 USB serial port) but it replies "The best driver software for your device is already installed".  No sign of any problem anywhere.

But as soon as the avrdude driver works, will the Jungo driver stop working?  In other words: will hex file Device Programming via AtmesStudio + AVRISP mkII still work?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: using AVRISP mkII for programming sketches does not work
Reply #8 - Dec 17th, 2013 at 3:12pm
Print Post  
Good questions. Well first of all please bear in mind that I have to work with whatever Arduino and Atmel produce so don't shoot me Smiley

Yes it is a problem. Atmel Studio usb drivers break Arduino programmers and renders the Arduino ide useless for MKII programmer uploads. Obviously currently Visual Micro is 100% Arduino compatible which includes the bad bits!

As my relationship with Atmel grows stronger it is becoming easier to discuss these things with them. This has been a problem for many years but this thread has reminded me of these issues.

I have today written to Atmel to ask for guidance on replicating their programmer upload process. I expect they will provide the info over the next month or two and as soon as I have it we will offer a more intelligent programmer upload feature that can switch between Arduino and Atmel mode.

One thing to keep in mind is that Atmel and Arduino are not currently compatible "out of the box". Visual Micro is a bridge that was implemented in Atmel Studio earlier this year. Stage 1 was the implementation and now we are moving to stage 2 which should see much closer ties and the gaps closed.
  
Back to top
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: using AVRISP mkII for programming sketches does not work
Reply #9 - Dec 17th, 2013 at 3:27pm
Print Post  
You can usually fix this problem by installing the drivers that is supplied with Arduino again. Atmel disbale all other USB drivers when it loads the Jungo driver. Either install Arduino again or just install the drivers.
  
Back to top
IP Logged
 
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
Re: using AVRISP mkII for programming sketches does not work
Reply #10 - Dec 17th, 2013 at 3:31pm
Print Post  
Aaah, I was under the impression that Visual micro was an Atmel project!  But you are independent of Atmel?  Many thanks for your work!!

I hope you'll be able to find a good solution in future, but meanwhile, if possible, can you offer any help on how to repair avrdude | visual micro for my current installation?
  
Back to top
 
IP Logged
 
Marius
Developer
****
Offline


Posts: 204
Location: Centurion RSA
Joined: Sep 7th, 2011
Re: using AVRISP mkII for programming sketches does not work
Reply #11 - Dec 17th, 2013 at 3:34pm
Print Post  
See my message above.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: using AVRISP mkII for programming sketches does not work
Reply #12 - Dec 17th, 2013 at 3:34pm
Print Post  
Thanks. Marius suggests installing the Arduino ide again using the windows installer options. Please try that.

I installed my mkII last night with Jungo, so I will give it a try later today. Otherwise I have another way to do it.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to install AVRISP mkII programming usb drivers for Arduino?
Reply #13 - Dec 17th, 2013 at 7:30pm
Print Post  
Update

Upload using an AVRISp mkII hardware programmer is working in the current release of Visual Micro but an AVRDUDE compatible  USB driver must be installed. The same applies to upload using the Arduino IDE

If installing the Arduino Ide doesn't provide a solution the following steps will:-

NOTE: These instructions and this topic are NOT applicable to normal Arduino upload using a USB cable.


Tested on Win7 and Win8.1

1) This might be optional. Open windows device manager and right click the Jungle items and delete the current driver

2) We downloaded the latest release (1.2.6.0) of libusb-win32 from http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/

3) Unpack the libusb zip and run the inf-wizard.exe in the bin folder AS ADMINISTRATOR

5) Select the avrisp mkII from the list that appears when you run inf-wizard then click next through the wizard.

6) When prompted select a place on your pc to save the .inf file that the wizard will create. (If you loose the file in the future you can simply repeat the task)

7) When prompted click OK to install the driver.

If required you can run the Atmel Studio 6.1 Jungo driver install again and revert to Atmel Studio drivers with the avrispmkII. 

It is probably also possible to switch back to arduino/avrdude mode by reapplying the .inf created in step 6) via device manager

I hope this helps.
« Last Edit: Dec 28th, 2013 at 4:18pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
Re: How to install AVRISP mkII programming usb drivers for Arduino?
Reply #14 - Jan 7th, 2014 at 11:09am
Print Post  
">If required you can run the Atmel Studio 6.1 Jungo driver install again and revert to Atmel Studio drivers with the avrispmkII."

How can this be done exactly?  I've re-run the Atmel Studio installer, selected repair mode (the only other option was de-install, there was no option for installing only drivers) but that did not fix it.  

The reason I ask is this: the Visual Micro programming via AVRISP mkII now works fine, but it seems to work only for chips that have previously been programmed: on a new empty AVR the programming appears to work, but the AVR runs extremely slow afterwards (*).  Tried another empty AVR, but same result.  On 2 other chips that have already been used before all still works fine.   So I'm guessing some fuse bits may be wrong in the empty chips?   And for setting those I need the Jungo driver so the "Device Programming" toolbar button can be used, is this not correct?   Any insights into this problem would be appreciated...

(*) Judging by LED blink rate, it seems to be about 10x slower.  Also the 16MHz xtal has no signal, I guess an internal oscillator is used instead.   
All 4 chips mentioned are ATmega328P.

I also tried the procedure at http://support.atmel.com/bin/customer.exe?=&action=viewKbEntry&id=1343

It produced: C:\Program Files (x86)\Atmel\AVR Jungo USB\usb64>wdreg.exe -log atmelusb.log -inf windrvr6.inf install
WDREG utility v11.00. Build Feb 27 2012 14:45:04

Processing HWID *WINDRVR6
Installing a signed driver package for *WINDRVR6
LOG ok: 1, ENTER:  DriverPackageInstallA
LOG ok: 1, ENTER:  DriverPackageInstallW
LOG ok: 1, Looking for Model Section [DeviceList.NTamd64]...
LOG ok: 1, Installing INF file 'C:\Program Files (x86)\Atmel\AVR Jungo USB\usb64\windrvr6.inf' (Plug and Play).
LOG ok: 1, Looking for Model Section [DeviceList.NTamd64]...
LOG ok: 1, Installing devices with Id "*WINDRVR6" using INF "C:\Windows\System32\DriverStore\FileRepository\windrvr6.inf
_amd64_neutral_c8d97cf517cd4518\windrvr6.inf".
LOG ok: 1, ENTER UpdateDriverForPlugAndPlayDevices...
LOG ok: 0, RETURN UpdateDriverForPlugAndPlayDevices.
LOG ok: 1, Installation was successful.
LOG ok: 0, Install completed
LOG ok: 1, RETURN: DriverPackageInstallW  (0x0)
LOG ok: 1, RETURN: DriverPackageInstallA  (0x0)
difx_install_preinstall_inf: err 0, last event 0, last error 0. SUCCESS
install: completed successfully

But still (even after re-boot of PC) pressing "Apply" in the "Device Programming" window of AtmelStudio produces:

"Unable to connect to tool AVRISP mkII"
details:
Timestamp:      2014-01-07 12:38:16.047
Severity:            ERROR
ComponentId:      20100
StatusCode:      1
ModuleName:      TCF (TCF command: Tool:connect failed.)

In the windows Device Manager the Jungo WinDriver also reports "This device is working properly".

Meanwhile F5 still works fine: 
"Uploading to I/O board using 'avrispmkii'
Done uploading"

« Last Edit: Jan 7th, 2014 at 2:50pm by Luc »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to install AVRISP mkII programming usb drivers for Arduino?
Reply #15 - Jan 7th, 2014 at 2:28pm
Print Post  
Hi,

Open device manager and right click the avrisp mkII, select delete drivers then update drives to use Jungo.

By the way the fusebits are set in the arduinoide/hardware/arduino/programmers.txt

If you change any arduino files then re-start the ide or click tools>visual Micro.reload toolchains

Tim
  
Back to top
IP Logged
 
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
Re: How to install AVRISP mkII programming usb drivers for Arduino?
Reply #16 - Jan 8th, 2014 at 8:34am
Print Post  
The only AVRISmkII I can find there is below "libusb-win32 devices".   I'm reluctant to uninstall that since it will break my Visual Micro uploading, and Arduino IDE uploading (both via AVRISmkII) again, right?  Sad

Could you please confirm that I need to access the fuse bits when programming a new empty chip? 

If yes: can you recommend any way to accomplish this that is compatible with a working (via AVRISmkII) Visual Micro installation?  

UPDATE:  I just discovered a very simple solution!  Just programming a bootloader using the Arduino IDE (this never worked in the past but now it does, since the AVRISmkII is working) does the trick.  It has the welcome side effect of setting the correct fuse bits!    And indeed the processor speed is OK now!   Smiley 

This only leaves me wondering why the fuse bits are not set during normal programming....
« Last Edit: Jan 8th, 2014 at 9:06am by Luc »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to install AVRISP mkII programming usb drivers for Arduino?
Reply #17 - Jan 8th, 2014 at 4:12pm
Print Post  
You are right. You would need to re-implement the usb driver when switching between apps. I am sorry that Arduino and Atmel have traveled different paths in this area. We can only do what they allow us to do.

I now understand a bit more about what you are doing. I am not an expert with programmers of micro-chips. 

The Burn Bootloader is fixed in the next version of Visual Micro for Arduino 1.5 so hopefully avoids the need to switch apps. "Tools>Visual Micro>Burn Bootloader"

The fuse bits are read from programmers.txt found below the Ardyuino Ide but burning the boot loader seems like the best solution.

Thanks very much for the update
  
Back to top
IP Logged
 
Luc
Junior Member
**
Offline


Posts: 17
Joined: Dec 10th, 2013
Re: How to install AVRISP mkII programming usb drivers for Arduino?
Reply #18 - Jan 9th, 2014 at 12:45pm
Print Post  
Tim@Visual Micro wrote on Jan 8th, 2014 at 4:12pm:
You are right. You would need to re-implement the usb driver when switching between apps. I am sorry that Arduino and Atmel have traveled different paths in this area. We can only do what they allow us to do.


I understand.  
I hope future versions of Visual Micro will be able to use the same driver as the rest of AtmelStudio.
Or even better: it would be great if the software could switch drivers by itself, without user intervention.

BTW: fuse bits are defined in boards.txt, not programmers.txt
« Last Edit: Jan 9th, 2014 at 12:50pm by Luc »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to install AVRISP mkII programming usb drivers for Arduino?
Reply #19 - Jan 9th, 2014 at 12:53pm
Print Post  
Hi, more info ...

Visual Micro uses AvrDude.exe which is supplied with the Arduino Ide. 

If you know of another uploader that can use the Atmel Studio drivers then please post a link and we will look at providing support.

+++

The uploader is defined in the configuration files of the Arduino Ide, if you know of a different program to avrdude.exe you can switch the config yourself and use it. 

Visual Micro doesn't know which usb drivers the uploader uses so it is quite flexible.
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint