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) Uploading to Arduino Mega2560 (Read 16492 times)
Alban
Junior Member
**
Offline


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Uploading to Arduino Mega2560
Jun 5th, 2013 at 7:56pm
Print Post  
Hi,
Recently I started using my Mega a lot more and I often run into uploading problems.

The compilation is successfull and VS reports that it is uploading and noting happens on my board.
The only way to I found to get VS to respond again is killing VS, disconnecting my arduino. Restarting VS, reopening my solution and reattach my arduino.
Then hopefully it works.
The problem is very hard to reproduce, jst now I uploaded a program. Waited an hour or so and tried again, it failed :s
No changes made to the program.
Arduino.exe uploads it without problems Sad

Any suggestions???
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #1 - Jun 5th, 2013 at 8:30pm
Print Post  
I have heard of this happening a couple of times before but also in the Arduino ide. 

Maybe Arduino have found how to fix it I will look over the next few days

In the meantime please give the following info.

Which Arduino version are you using?

What is the name, date and time of the usb driver for the Arduino board (window device manager)

Which 2560 do you have R3?

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


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Re: Uploading to Arduino Mega2560
Reply #2 - Jun 7th, 2013 at 5:05am
Print Post  
I use Arduino 1.0.1

the Arduino Mega 2560 driver version 5.1.2600.0

I'm pretty sure I have the plain old 2560 no R3..
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #3 - Jun 7th, 2013 at 11:29am
Print Post  
Oh, so this sounds like a windows usb issue. I believe that the latest 2560 boards include a patch/solution for this problem. 

I know it works via Arduino IDE but ...

Visual Micro uses avrdude.exe to upload so does not access the port directly, it is the 2650 or avrdude that is leaving the port in a poor state. 

It is possible that Visual Micro could alter timings slightly to prevent the problem but I have never been able to replicate and it is a documented problem that also happens to the Arduino ide sometimes (or used to prior to the latest 2560 bootloader)

What is the name and date of the usb driver?

Once solution I heard about is to disable and re-enable the usb driver, another is to switch on "RTS on Close" which is a property of the usb driver.

If this continued to be a problem then you  can switch on "File>External Editor" in arduino ide. This allows the sketch to be open in both Arduino and VS/Atmel, use Arduino for upload.

Sorry can't be more specific
  
Back to top
IP Logged
 
Alban
Junior Member
**
Offline


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Re: Uploading to Arduino Mega2560
Reply #4 - Jun 10th, 2013 at 9:48am
Print Post  
In the hardware management window of windows my USB mainhub (translated from Dutch to English) drivers are dated 21-6-2006 and version 6.1.7601.17586
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #5 - Aug 14th, 2013 at 9:14pm
Print Post  
Having re-compared the arduino ide code with visual micro...

In the Arduino Ide there was a 100ms delay in the routine that forced the Arduino to reset prior to upload. This delay was shorted in the Visual Micro code but has been corrected to match the Arduino Ide code for the next release.

Please follow the project on our codeplex download site so that you get an email when the next release happens. 

I think this will fix the problem for you but there are also some additional config properties in the next release which I won't publish unless they are needed for testing. The idea being we just do what the Arduino Ide does and keep things clean and simple.

Thanks again for the report
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #6 - Aug 18th, 2013 at 10:28pm
Print Post  
Please try 1308.18 when you have spare time. Thanks
  
Back to top
IP Logged
 
Alban
Junior Member
**
Offline


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Re: Uploading to Arduino Mega2560
Reply #7 - Aug 20th, 2013 at 7:59pm
Print Post  
I installed 1308.18 and for now no problems, but have very little hobby time at the moment. I'll keep you posted.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #8 - Aug 20th, 2013 at 8:06pm
Print Post  
Excellent thanks for the feed back
  
Back to top
IP Logged
 
Alban
Junior Member
**
Offline


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Re: Uploading to Arduino Mega2560
Reply #9 - Aug 20th, 2013 at 8:13pm
Print Post  
If I detach (unplug the USB cable) my MEGA while a serial connection is active and reattach the board I'm in trouble.
Although closing the serial window and detach and re attach solves it. Not sure if this is the same issue I have had earlier.

EDIT: to be more precise, I need to close the serial window before re attaching the board.

For now I have not yet found a need to restart VS to get it to work again. Before I needed to restart VS quite a lot when using my MEGA.
« Last Edit: Aug 20th, 2013 at 8:15pm by Alban »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #10 - Aug 20th, 2013 at 8:16pm
Print Post  
Thanks, it is supposed to re-connect automatically, I will check the re-connect is still working.

ps: Un-tick connect and re-tick should be the same as closing the serial.
« Last Edit: Aug 20th, 2013 at 8:16pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Alban
Junior Member
**
Offline


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Re: Uploading to Arduino Mega2560
Reply #11 - Aug 23rd, 2013 at 12:00pm
Print Post  
Also it seems that if I connect my Arduino prior to starting VS2010 the first upload always fails. The led on my board just blinks every second or so, not the burst of flashes one would expect during upload. Unplugging and replugging solves it.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #12 - Aug 23rd, 2013 at 12:08pm
Print Post  
Thanks
  
Back to top
IP Logged
 
Alban
Junior Member
**
Offline


Posts: 26
Location: Holland
Joined: Nov 11th, 2012
Re: Uploading to Arduino Mega2560
Reply #13 - Aug 23rd, 2013 at 12:56pm
Print Post  
Hmmm, I experienced the same problem I described in reply#11 using Arduino.exe instead of VisualMicro
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Uploading to Arduino Mega2560
Reply #14 - Aug 23rd, 2013 at 1:21pm
Print Post  
Good thanks for the info. I suspect that all this is to do with usb drivers and windows however if we can reduce or remove the problem it is good!

I don't know which version of Arduino you are working with but I have read that latest versions have a new common usb driver for all boards. I wonder if the new driver fixes some of these quirks.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint