Olimex AVRISP mk2 problem with atprogram.exe (duplicate device)

Started by cpt, April 02, 2019, 04:57:46 PM

Previous topic - Next topic



I have a problem with Olimex AVR-ISP-MK2 and Atmel Studio 7.0. Programming device is shown as two devices with atprogram.exe. In Atmel Studio with Device Programming, only one device is shown.

Steps to reproduce:
- No previous libusb-devices installed (fresh windows 10 installation)
- Installed Atmel Studio 7.0.
- After that, uninstalled drivers for Olimex AVRISP and installed drivers found on Olimex website (DRIVER-MK2-AS-6-7-W10).
- Listed connected devices with command "atprogram.exe list":

C:\Program Files (x86)\Atmel\Studio\7.0\atbackend>atprogram.exe list
simulator       No serialnumber found
avrispmk2       000200212345
avrispmk2       000200212345

When trying to use atprogram.exe, it gives error:
[ERROR] Found more than one matching tool. Please specify serial number.

Driver shown in device manager for Olimex AVRISP mkII:

libusb-win32 devices

Driver Provider:                libusb-win32
Driver Date:                    27/01/2016
Driver Version:       
Digital Signer:                 Atmel Norway

Has somebody encountered/figured out the reason for this problem?


So what happens if you specify that double serial number after atprogram.exe like with -s 000200212345?

There is similar mention in reply #8 here: https://www.avrfreaks.net/comment/1432706#comment-1432706 - so it is probably something around the drivers.
Technical support and documentation manager at Olimex


After specifying the serial number, I get an error:
[ERROR] Found tools avrispmk2:000200212345, avrispmk2:000200212345 matching the tool and serial combination

There is no solution that works for me mentioned in the post you linked, but I also think it is related to the drivers. Perhaps atprogram gets confused because Olimex has different drivers that were installed during the installation of the Atmel Studio.


This doesn't seem the proper driver btw. This is how a proper driver looks like (under Atmel tab), also tested with both Atmel Studio 7 under Windows 10 and atprogram.exe: https://i.imgur.com/kYAnG9w.jpg

For the duplicate entry - maybe try opening Windows Device Manager and in enable View -> Show Hidden Devices, then try to uninstall one of the entries associated with AVR-ISP-MK2. If you are wondering which are those entries, disconnect it from the computer and refresh the list, then connect it and again refresh, do that until you figure out which entries disappear and appear.

I think that despite your manual installation of driver, Windows preferred to associate the tool with the wrong driver. And you you would need to manually change it. To manually switch between all available drivers:

1. Connect AVR-ISP-MK2 to the computer.
2. Right-click over the AVR-ISP-MK2 entry (in your case probably "libusb-win32" driver) in "Windows Device Manager".
3. Select "Update Driver Software...".
4. Select "Browse my computer for driver software".
5. Select the bottom option "Let me pick from a list of drivers on my computer".
6. Pick one of the driver entries in the list under "Model", if there are more then one start with the first (top-most) and finish the installation (steps 9 and 10), then test with your software and if it still doesn't work start all over from point 1. but this time select the second entry in the "Model" list, until you exhaust all entries under "Model" one by one!
7. Select next, and if a warning pops up select "Install Anyway" and after installation close the window.
8. Inspect the new entry in "Windows Device Manager" after the driver installation and ensure that there are no errors or warnings.
9. Test empirically, if it doesn't work start from point 1. and select the next entry from the list in point 6.

Technical support and documentation manager at Olimex


I downloaded the driver-files from: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/resources/DRIVER-MK2-AS-6-7-W10.zip

There is image in that zip-file that has Driver Date 1/27/2016 and version Is this not the correct one?

When using the steps you listed, I only find AVRISP mkII in step 6, and install drivers for that from the folder DRIVER-M2-AS-6-7-W10 (AVRISP_mkII.inf)

After installation the difference is that the device is shown under libusb-win32 devices -tab, not under Atmel USB Devices...


I think the drivers that get loaded here were installed during Atmel Studio installation. Here I can find different drivers in C:\Program Files (x86)\Atmel\Atmel Drivers and the specific driver from my screenshot in C:\Program Files (x86)\Atmel\Atmel Drivers\winusb\atmel_winusb - you can try to manually point to that location.
Technical support and documentation manager at Olimex


Update on this issue. I did not manage to get it right. Because I did not have more time for this, I ordered Atmel ICE and got it working immediately.