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 not upload sketches from Visual Studio into UNO (Read 6454 times)
JohnQ
Newbies
*
Offline


Posts: 4
Joined: Feb 3rd, 2015
Can not upload sketches from Visual Studio into UNO
Feb 4th, 2015 at 1:58pm
Print Post  
Hi,

I am brand new to using the ARDUINO UNO. I started writing little sketches using the software that came with the kit. It was somewhat painful. Than I found the solution that you are providing, I felt life will get easier. So I installed Visual Micro on to Microsoft Visual Studio 2008, but unfortunately the Gods were not smiling at me.
The Installation seemed to go all right, it compiled fine. But when I was going to upload the Blink LED example I received error massages. I searched for the cause but with no luck.  If possible, could someone help and point me in the right direction?  I thank you for any help that you could provide in solving my problem.

My system specifications are:
     
Windows XP with SP3
Arduino Uno Rev 3
Microsoft Visual Studio 2008
Visual Micro – as of February 1,2015

Output Error Massages:

Compiling '_01-2_Blink' for 'Arduino Uno'
Binary sketch size: 1,178 bytes (used 4% of a 32,256 byte maximum) (0.27 secs)
Uploading to I/O board using 'COM5'
Upload failed. Did you select the correct upload method for this board?
System.MissingMethodException: Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)'.
   at processing.app.debug.Uploader.executeUploadCommand(ICollection commandDownloader, String workingPath)
   at processing.app.debug.AvrdudeUploader.avrdude(List`1 params_Renamed)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(String buildPath, String className, Boolean verbose)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(String buildPath, String className, Boolean verbose, Boolean ProgrammerUploadUsing, String mcuProgrammerOverrideName)
   at processing.app.SketchEditor.Upload(Boolean verbose)

I also started getting messages from Visual Studio periodicly

Package Load Failure

Package 'Windows Forms Design Hosting Package' has faild to load properly (GUID = {68939055-38E0-4D17-92CB-8909710D8178}). Please contact package vendor for assistance. Application restart is recommended, due to possible environment corruption. Would you like to disable loading this package in the future? You may use 'devenv /resetskippkgs' to re-enable package loading. (Y /N )

Thanks in advance for any help you can provide.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not upload sketches from Visual Studio into UNO
Reply #1 - Feb 4th, 2015 at 2:04pm
Print Post  
Hi John,

Thanks for the post.

The package load failure is a VS2008 issues and is unconnected to Visual Micro. Also, I am not sure it is affecting Visual Micro because Visual Micro seems to be working (upload issue aside)

As for the upload issue it is the atmel toolchain avrdude.exe that is used for upload and it appears to be objecting. It might be related to the name you have used for your sketch. As a test, please try a different sketch with a name that does not begin with an underscore and does not include a dash.

Failing that please switch on "tools>visual micro>verbose messages", then try again and post the output

Thanks
  
Back to top
IP Logged
 
JohnQ
Newbies
*
Offline


Posts: 4
Joined: Feb 3rd, 2015
Re: Can not upload sketches from Visual Studio into UNO
Reply #2 - Feb 4th, 2015 at 2:51pm
Print Post  
Tim@Visual Micro wrote on Feb 4th, 2015 at 2:04pm:
Hi John,

Thanks for the post.

The package load failure is a VS2008 issues and is unconnected to Visual Micro. Also, I am not sure it is affecting Visual Micro because Visual Micro seems to be working (upload issue aside)

As for the upload issue it is the atmel toolchain avrdude.exe that is used for upload and it appears to be objecting. It might be related to the name you have used for your sketch. As a test, please try a different sketch with a name that does not begin with an underscore and does not include a dash.

Failing that please switch on "tools>visual micro>verbose messages", then try again and post the output

Thanks


Hi Tim,

I have tried as you asked but no luck. I have turned on the "Verbose Messages" and this is what I get. 

Compiling 'BlinkWithoutDelay' for 'Arduino Uno'
Build folder: /VMicro/Arduino/Builds/BlinkWithoutDelay/uno
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines: 
Architecture Tools: D:\Program Files\Arduino\hardware\tools\avr\bin\
GCC: 4.3.2
Sketchbook: file:///C:/Documents%20and%20Settings/Nathan/My%20Documents/Arduino
Core Include Paths
Include Path 'D:\Program Files\Arduino\hardware\arduino\cores\arduino'
Include Path 'D:\Program Files\Arduino\hardware\arduino\variants\standard'
D:\Program Files\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -I"D:\Program Files\Arduino\hardware\arduino\cores\arduino" -I"D:\Program Files\Arduino\hardware\arduino\variants\standard" -o "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.cpp.o"  "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.cpp" 
BlinkWithoutDelay.ino:In function 'void loop()'
BlinkWithoutDelay.ino:54: warning: comparison between signed and unsigned integer expressions
D:\Program Files\Arduino\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -L"C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno" -o "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.elf" "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.cpp.o" "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\core.a" -lm
D:\Program Files\Arduino\hardware\tools\avr\bin\avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.elf" "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.eep"
D:\Program Files\Arduino\hardware\tools\avr\bin\avr-objcopy -O ihex -R .eeprom "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.elf" "C:\Documents and Settings\Nathan\Local Settings\Application Data\VMicro\Arduino\Builds\BlinkWithoutDelay\uno\BlinkWithoutDelay.hex"
Binary sketch size: 4,642 bytes (used 14% of a 32,256 byte maximum) (0.20 secs)
Uploading to I/O board using 'COM5'
Uploader started for board Arduino Uno
Upload method will be: bootloader
Uploading via Bootloader 
Flushing the serial port
Upload failed. Did you select the correct upload method for this board?
System.MissingMethodException: Method not found: 'Boolean System.Threading.WaitHandle.WaitOne(Int32)'.
   at processing.app.debug.Uploader.executeUploadCommand(ICollection commandDownloader, String workingPath)
   at processing.app.debug.AvrdudeUploader.avrdude(List`1 params_Renamed)
   at processing.app.debug.AvrdudeUploader.uploadViaBootloader(String buildPath, String className, Boolean verbose)
   at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(String buildPath, String className, Boolean verbose, Boolean ProgrammerUploadUsing, String mcuProgrammerOverrideName)
   at processing.app.SketchEditor.Upload(Boolean verbose)

Hope this helps. 

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not upload sketches from Visual Studio into UNO
Reply #3 - Feb 4th, 2015 at 2:56pm
Print Post  
Thanks.

If you open the serial monitor on COM5 does it say port open? No errors?

Does the arduino ide upload okay?

How many com port show in the list and does it say "COM5 - Arduino Uno"?

« Last Edit: Feb 4th, 2015 at 2:58pm by Tim@Visual Micro »  
Back to top
IP Logged
 
JohnQ
Newbies
*
Offline


Posts: 4
Joined: Feb 3rd, 2015
Re: Can not upload sketches from Visual Studio into UNO
Reply #4 - Feb 5th, 2015 at 10:22am
Print Post  
Yes, when I open COM5 it says 

     Opening port
     Port open

Yes, the arduino ide upload okay.

There are 2 com ports

     COM1 - Communication Port
     COM5 - Arduino Uno





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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not upload sketches from Visual Studio into UNO
Reply #5 - Feb 5th, 2015 at 11:12pm
Print Post  
Hi John,

Sorry for the delay.

I didn't read the error you posted properly.

The error is when calling a .net core method called WaitOne() passing milliseconds as a timeout. It turns out (I didn't know this) that in the original version of .NET3.5 this method signature did not exist. It was introduced a few years ago when .NET 3.5 SP1 was released.

I also had a think about the error you are seeing in Visual Studio 2008 and suspect that might be you are on an earlier version of VS 2008 than SP1. There were many fixes when VS2008 SP1 was released.

I will look into changing Visual Micro so that WaitOne works on your older system but not sure when that will be done, maybe a few days.

I do suggest you try to update your .NET version and also Visual Studio 2008 to SP1 (if not already). I read that windows update does not install .NET 3.5 Sp1 and that might also be true for Visual Studio 2008. However both updates contain many fixes and have been the stable releases for some years now.

Sorry about this news and thanks for the report.
  
Back to top
IP Logged
 
JohnQ
Newbies
*
Offline


Posts: 4
Joined: Feb 3rd, 2015
Re: Can not upload sketches from Visual Studio into UNO
Reply #6 - Feb 6th, 2015 at 2:18pm
Print Post  
Good news Tim,

It's working!!!

As you suggested I updated Visual Studio 2008 to SP1. By doing this, VS updated .NET 3.5 to Sp1. and that solved it.

Thanks very much for solving my problem. I truly appreciate all the help that you provided.

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


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can not upload sketches from Visual Studio into UNO
Reply #7 - Feb 6th, 2015 at 2:34pm
Print Post  
Great, thanks for the update.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint