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) Upload problem (F5) (Read 21515 times)
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Upload problem (F5)
Jun 16th, 2013 at 7:34pm
Print Post  
I have problem with uploading using arduino bootloader from studio (e.g. F5 button). It seems the avrdude does not start - no "avrdude" output texts on the bottom. 
Just "Uploading to I/O board using 'COM......", thats all.
When I select "Upload using programer", eg. Usbasp, it works correctly.

The problem is NOT in the board, wrong COM port, bootloader, etc. The same configuration works in Arduino IDE.

The Visual Micro installed on AtmelStudio 6.1.2562 running Win7 x64.

I trided to remove related keys from registry, reinstall studio, Visual Micro addon - the problem persists.

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #1 - Jun 16th, 2013 at 7:38pm
Print Post  
Hi, the reg keys or vm install will not affect this.

Which version of Arduino do you have installed?

Which board have you selected?

Can you upload a small program that sends a serial message then if you open the serial monitor on the com port does it show the serial?

Thanks



  
Back to top
WWW  
IP Logged
 
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #2 - Jun 16th, 2013 at 8:39pm
Print Post  
I tried Arduino 1.0.5 and 1.0.4.
Board Arduino Nano with 328.
I wrote small app sending text. I selected the correct port in Serial Monitor and baudrate - the output seems OK.
If I try to upload code from AtmelStudio during the Serial Monitor is open (the comm. port is connected), an unexcepted error occurred during uploading "Object reference not set to an instance of an object".

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #3 - Jun 16th, 2013 at 8:51pm
Print Post  
Hi,

That's a strange one. 

Is the (Micro Debug) project property set to None?

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


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #4 - Jun 16th, 2013 at 9:36pm
Print Post  
Yes, it is strange.

The Micro debug is set to None.

I found the same problem in this thread:
http://www.visualmicro.com/forums/YaBB.pl?num=1359316821

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #5 - Jun 16th, 2013 at 9:57pm
Print Post  
Well there is a lot of irrelevant and confusing stuff in that post. The post is as follows, is this what you refer to?

Quote:
When I connect the USB to my laptop, it shows up as COM16.  I select COM16 at the top of the visual studio window, and hit debug to upload.  Program compiles fine, but then the word COM16 magically changes to COM10, and the verbose output in the Micro Build window says "Uploading to I/O board using 'COM10'".  So something switches it to COM10, and the upload doesn't work since it's talking to the wrong COM port.


Are you using a Leonardo, because it is correct that the port changes, this is how the Leonardo works?

I run win7 64 so the only difference can be cable or usb driver. Can you tell me the date and time, manufacturer of your usb driver and which board you are using, Thanks
« Last Edit: Jun 16th, 2013 at 10:21pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #6 - Jun 17th, 2013 at 7:39am
Print Post  
No, I do not have any problems with COM port enumeration, wrong drivers or cables. The device works with many tools.

The main issue is with uploading using standard bootloader, see the output:
Code
Select All
Binary sketch size: 466 bytes (2% of a 30720 byte maximum) (0,21 secs)
Uploading to I/O board using 'COM1' 


Thats all. If I change to "using programmer", it works, see:
Code
Select All
Binary sketch size: 466 bytes (2% of a 30720 byte maximum) (0,28 secs)
Uploading to I/O board using 'usbasp'
"c:\arduino\hardware\tools\avr\bin/avrdude" -C"c:\arduino\hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -patmega328p -cusbasp -Pusb a.hex":i
Done uploading 


  
Back to top
 
IP Logged
 
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #7 - Jun 17th, 2013 at 12:07pm
Print Post  
So, I've just tried to install it into VMware machine.
- clean XP SP3
- .net 3.5 and 4.0
- Atmel Studio
- Visual Micro
- FTDI driver
and .... IT WORKS! 

So, I'm going to investigate my Win7 ... 
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #8 - Jun 17th, 2013 at 1:19pm
Print Post  
Thanks, it will be interesting to get to the bottom of it. The win7 problem isn't normal that's for sure.

  
Back to top
WWW  
IP Logged
 
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #9 - Jun 17th, 2013 at 1:31pm
Print Post  
So ... I deleted, reinstall as soon as possible - no luck - the problem persists.

At 100% the avrdude is not started in this case (I used Process Monitor form SysInternals).

After compile, the VM accesses "Upload.vmps.xml" and no more actions.

If I use USBasp programmer, the VM accesses "Build directory" after "Upload.vmps.xml" and starts "avrdude".
See the picture, the gray block is missing when I use standard upload (bootloader).

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #10 - Jun 17th, 2013 at 2:06pm
Print Post  
EDIT Thanks for this. What path have you entered in tools>options>visual Micro>Arduino location
« Last Edit: Jun 17th, 2013 at 2:08pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #11 - Jun 17th, 2013 at 2:15pm
Print Post  
The location is D:\tools\arduino
I tested it with different locations, e.g C:\arduino, with or w/o backslash at the end, ...
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #12 - Jun 17th, 2013 at 2:23pm
Print Post  
Well you are right, if avrdude.exe is not being executed then this is nothing to do with usb. I have never seen this issue before. 

We see the program is compiled correctly but then the upload does not start.

Do you have any custom hardware under the sketchBook folder? [SketchBook\Hardware]

??


  
Back to top
WWW  
IP Logged
 
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #13 - Jun 17th, 2013 at 2:34pm
Print Post  
No custom hardware under skretchbook folder, no custom libraries, ...

The program is compiled correctly, the .hex is created in AppData\.....\xxx folder.

Code
Select All
D:\tools\arduino\hardware\tools\avr\bin\avr-objcopy -O ihex -R .eeprom "C:\Users\nbpingr-2\AppData\Local\VMicro\Arduino\Builds\jjj\nano328\jjj.elf" "C:\Users\nbpingr-2\AppData\Local\VMicro\Arduino\Builds\jjj\nano328\jjj.hex"
Binary sketch size: 466 bytes (2% of a 30720 byte maximum) (4,38 secs)
Uploading to I/O board using 'COM1'
 




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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #14 - Jun 17th, 2013 at 2:37pm
Print Post  
Thanks, yes can see compile is fine because we get a size back.

Can you please confirm that "Tools>Options>Visual Micro>Tool chain Locations>Avr" is empty. 

If it is then we will have to have more diagnostics in the next version to see why we never get to the upload. 

You definitely do not have "Tools>Arduino>Upload using programmer" ticked?

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


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #15 - Jun 17th, 2013 at 2:57pm
Print Post  


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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #16 - Jun 17th, 2013 at 3:08pm
Print Post  
I am at a loss and will add some more diagnostics for the next release.

As a long shot I installed arduino into exactly the same location tools\arduino but it still works. I can not break it.

There is nothing in the code that causes the upload to be ignored/skipped and avrdude should run immediately after the "Uploading to port" message.

We see a full compile and program size report so we know that the tools folder is being located correctly.

I am sorry you have this problem, thanks for so much patience and great reporting. I will continue to give it some thought.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #17 - Jun 17th, 2013 at 4:00pm
Print Post  
Just had a thought. please try the bootloader upload then email all the files in the "Visual Micro" sub folder to info [at] visualmicro.com

Thanks
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload problem (F5)
Reply #18 - Jun 17th, 2013 at 9:42pm
Print Post  
Thanks for the sketch and build output, it is very useful. Something strange is going on and I think the best solution is to validate your Visual Micro install, delete the auto created atmel and visual micro files and try again.

Please do this ...

1) Install Visual Micro 1305.21 from http://visualmicro.codeplex.com > DOWNLOADS>Visual Micro Arduino - Beta Channel

2) Delete all files and sub folders of the "jjj" sketch except your own sources (jjj.ino)

3) Delete the VMIRCO temp folder

4) Re-open the jjj and try to upload

Then please send me the output again. 

Thanks very much
  
Back to top
WWW  
IP Logged
 
Marek11
Junior Member
**
Offline


Posts: 10
Joined: Jun 15th, 2013
Re: Upload problem (F5)
Reply #19 - Jun 18th, 2013 at 6:32am
Print Post  
Cleaned up, reinstalled, recompiled. Unfortunately, it does not help.
I compared Upload.vmps.xml file before and after. The differencies are only in object_file, source_file attributes and 
the build.architecture attr is probably new one.
Files sent to your email.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint