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 Can't upload to Micro board (Read 9288 times)
VozkychTheDev
Newbies
*
Offline


Posts: 3
Joined: Aug 1st, 2014
Can't upload to Micro board
Aug 1st, 2014 at 10:24pm
Print Post  
Hello,

I have installed Arduino app v1.5.7, Visual Studio 2012 Update 4 and Visual Micro v1.1407.10.

When I try to Upload code to Arduino Micro in Arduino standalone app, everything works like charm.

When I try to upload code to Arduino Micro in Visual Studio, avrdude reports this error:
avrdude: ser_open(): can't set com-state for "\\.\COM7"
avrdude: Send: E [45] 
avrdude: ser_send(): write error: sorry no info avail

Arduino Micro is connected via virtual COM7.

What is wrong with Visual Micro?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12198
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload to Micro board
Reply #1 - Aug 1st, 2014 at 10:56pm
Print Post  
Hi,

A few requests

Please switch on "tools>visual micro>verbose messages" then post the output after upload attempt.

Please clarify what you mean by virtual COM7. What is the date, time and manufacturer of the usb driver?

Please confirm the version of windows you are using

Thanks
  
Back to top
IP Logged
 
VozkychTheDev
Newbies
*
Offline


Posts: 3
Joined: Aug 1st, 2014
Re: Can't upload to Micro board
Reply #2 - Aug 1st, 2014 at 11:26pm
Print Post  
Version of Windows is Win7 SP1 32bit.

By virtual COM7 I mean standard Arduino USB driver installed in system as COM port. My version "1.0.0.0" of this driver came from Arduino app installation, vendor is "Arduino LLC", driver date "4.1.2013".

I did a little research of the problem and found the following:
sometimes upload in Visual Studio does not work, sometimes it works.

When the upload in Visual Studio works, verbose messages from Visual Micro looks like this:
Code
Select All
Uploading to I/O board using 'COM7'
Uploader started for board Arduino Micro
Uploader sometimes uses programmer name: avrispmkii
Upload method will be: bootloader
Uploading via Bootloader
C:\Program Files\Arduino\hardware\tools\avr\bin\avrdude "-CC:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -patmega32u4 -cavr109 -PCOM6 -b57600 -D .hex:i"

avrdude: Version 6.0.1, compiled on Apr  3 2014 at 23:12:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega32U4
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :
 


Note the COM port used on the command line for avrdude. COM6 is used here, which should be the right upload port. Verbose messages from Arduino standalone app looks alike.

When the upload in Visual Studio does not works, upload port for arduino board isn't detected correctly and messages from Visual Micro looks like this:
Code
Select All
Uploading to I/O board using 'COM7'
Uploader started for board Arduino Micro
Uploader sometimes uses programmer name: avrispmkii
Upload method will be: bootloader
Uploading via Bootloader
C:\Program Files\Arduino\hardware\tools\avr\bin\avrdude "-CC:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -patmega32u4 -cavr109 -PCOM7 -b57600 -D .hex:i"

avrdude: Version 6.0.1, compiled on Apr  3 2014 at 23:12:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : COM7
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
 



It seems as it sometimes did not wait for correct detection of upload port.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12198
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload to Micro board
Reply #3 - Aug 1st, 2014 at 11:40pm
Print Post  
Thanks for the useful information.

It would help if you had device manager open by the side of Visual Studio when the upload fails. Can you see if COM6 appears but after a long delay or does COM6 not appear at all?

Thanks
  
Back to top
IP Logged
 
VozkychTheDev
Newbies
*
Offline


Posts: 3
Joined: Aug 1st, 2014
Re: Can't upload to Micro board
Reply #4 - Aug 2nd, 2014 at 12:08am
Print Post  
Right now I can't simulate broken upload.  Huh

I did upload a ten times and each was successful. And COM6 always appears in device manager (COM7 contrary disappeared).

But what I remember is the difference in delay when verbose messages are printed to the output window.

When upload is broken, display between these two lines is no delay:
Code
Select All
Uploading via Bootloader
C:\Program Files\Arduino\hardware\tools\avr\bin\avrdude "-CC:\Program Files\Arduino/hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -patmega32u4 -cavr109 -PCOM6 -b57600 -D .hex:i"
 



When upload works correctly, there is about 2 seconds delay after message "Uploading via Bootloader" display.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12198
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't upload to Micro board
Reply #5 - Aug 2nd, 2014 at 12:40am
Print Post  
Thanks, I think that might be useful info. I'll add it to the list for the next release. Might have a few questions when I come to look at it.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint