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
Normal Topic Cannot use AVRISP mkII (Read 2714 times)
Egol
Junior Member
**
Offline


Posts: 16
Joined: May 17th, 2021
Cannot use AVRISP mkII
Sep 7th, 2021 at 12:11pm
Print Post  
Hi, I work till now with a USBasp clone programmer but it is not stable and I want to use the Atmel AVRISP mkII that I have.
I'm working with Windows 10 and Visual Studio and I tried to follow the instructions in "Avr Programmers (and others) Usb Driver for Arduino" from here https://www.visualmicro.com/post/2014/01/17/AvrIsp-MkII-Usb-Driver-for-Arduino.a....
I see the AVRISP under my Device Manager as:
libusb-win32 devise
    USB Serial
But when I try to run the programming command I get:
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)
I can see that the VID\PID pair of the device under the Device Manager is 0x1A86\0x7523 and I tried to change this in the avrdude conf with no luck.
Any idea what is wrong?
Thanks,
Eyal
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot use AVRISP mkII
Reply #1 - Sep 7th, 2021 at 1:42pm
Print Post  
Please post the info requested in the yellow box near the top of this page

Thanks
  
Back to top
WWW  
IP Logged
 
Egol
Junior Member
**
Offline


Posts: 16
Joined: May 17th, 2021
Re: Cannot use AVRISP mkII
Reply #2 - Sep 7th, 2021 at 5:34pm
Print Post  
Attached is the requested log
Thank you
  

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


Posts: 2177
Joined: Feb 13th, 2019
Re: Cannot use AVRISP mkII
Reply #3 - Sep 8th, 2021 at 4:17pm
Print Post  
Thanks for the log.

If you go to 
Device Manager > AVR ISPMKII > Properties:

1) Can you confirm the Driver Name and Date/Time 
2) Do you have the same issue in Arduino IDE?
3) Have you installed Atmel Studio? (DONT Install it if you haven't as it can alter the USB Driver)

  
Back to top
 
IP Logged
 
Egol
Junior Member
**
Offline


Posts: 16
Joined: May 17th, 2021
Re: Cannot use AVRISP mkII
Reply #4 - Sep 8th, 2021 at 5:02pm
Print Post  
Hello and thank you for getting back to me:
1- The driver name is libusb-win32 V1.2.6.0 from 17/01/12 (Attached is the screen shot of it)
2- I do not work with Arduino IDE as I have Visual Micro  Smiley
3- I do not have Atmel Studio installed
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Cannot use AVRISP mkII
Reply #5 - Sep 8th, 2021 at 6:23pm
Print Post  
Hi,

If you have never installed atmel studio then the usb driver that came in the box with the mkII should have worked.

avrdude.exe is the program that atmel created for software such as Arduino IDE and Visual Micro. Unfortuently the usb driver atmel programmed avrdude for is different to the one installed by atmel studio. Therefore when we hit this issue it is usually because atmel has been installed and overwritten the driver that avrdude needs to perform the upload with mkII.

You are using the Arduino IDE in a small way already. The toolchain your Uno is mapped to is installed when you install the Arduino IDE. You can see the AVR toolchain below this folder on your pc "C:\Program Files (x86)\Arduino\hardware\..."

To upload via the mkII Visual Micro does no work at all other than running the following command. You can run the same command from a cmd prompt.

Code
Select All
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude "-CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -V -patmega328p -cstk500v2 -Pusb Hzatmega328\Debug/WaterFlowMeter_LORA.ino.hex:i"
 



Simon suggested you try the same upload in the Arduino IDE. It will prove to you where the issue is and remove some of the "unknown" for you about how uploads are executed. Creating a simple sketch in the arduino ide, setting the correct mkII programmer and then clicking "Tools>Upload using Programmer" should show the same error you are seeing in Visual Micro. When you search for solution to an arduino ide problem in google you will find a wider community than for visual micro thus potential for more solutions. This is the reason Visual Micro remains Arduino IDE compatible.

The solution to this issue has always been around usb driver but it apears you have followed the guides but to no available. The only question mark we have is if avrdue is looking for known vid/pids of the Arduino Uno. The vid/pids of your Uno look like a clone and we have never tested mkII with a clone. That said it would be a surprise to us to hear that avrdude has an issue with clones, they usually work fine.

The results of you test in the Arduino IDE will be interesting to hear.

Thanks
  
Back to top
WWW  
IP Logged
 
Egol
Junior Member
**
Offline


Posts: 16
Joined: May 17th, 2021
Re: Cannot use AVRISP mkII
Reply #6 - Sep 9th, 2021 at 11:59am
Print Post  
After digging I found that the AVRISP I have identified in the Device Manager as "USB-SERIAL CH340 (COMXX)" and if I run avrdude with the following command line I'm able to flash my target:
Quote:
-c stk500v2 -p m328p -P COMXX -e -U flash:w:"C:\Projects\MyProject.ino.hex":i 

But I did not find any way I can make it work like that from Visual Micro.
Can you please help?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2177
Joined: Feb 13th, 2019
Re: Cannot use AVRISP mkII
Reply #7 - Sep 9th, 2021 at 12:36pm
Print Post  
You can override the default program pattern, using a Local Board.txt file.

This can be added from vMicro > Add Code > Add Local Board.txt

Then you will need the pattern to modify (which can be obtained from the build output, with the vMicro > Compiler > Show Build Properties enabled, and performing a build).

Add the modified pattern to the Local board.txt and try the upload again, something like the below:
Code
Select All
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} {program.verify} -pm328p -cstk500v2 "-PCOMXX" -e -U "-Uflash:w:{build.path}/{build.project_name}.hex:i" 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint