Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Uploading to Arduino Mega2560 (Read 2287 times)
Jim Michener
Newbies
*
Offline



Posts: 3
Uploading to Arduino Mega2560
Dec 4th, 2011 at 4:32pm
 
Am using Visual Studio 2010 with Arduino 1.0 and the latest and greatest Visual Micro.  (VS is far better than the Arduino IDE).    Everything works fine with a an Arduino Uno board.  I can build code and hit the green triangle and it uploads and runs on the board just fine.   However,  when I build a project on for the Mega2560 board,  it builds the HEX file fine and then it starts to upload and it hangs.  Visual Studio no longer responds to anything and Task Manager is then used to kill the process.

The procedure to upload using avrdude is different between the Uno and the Mega boards.   The Uno a simple switch of " -pm2560 -carduino" works fine. 

Now this same problem is with the Eclipse IDE.

The only successful avrdude upload I have had to Arduino Mega2560 board is.. using this as a bat file...  the two commands must be run RIGHT after each other.

C:\Users\James\arduino-1.0\hardware\tools\avr\bin\avrdude.exe -CC:\Users\James\arduino-1.0\hardware\tools\avr\etc\avrdude.conf -v -v -v -pm2560 -carduino -P\\.\COM7 -b115200 -D -Uflash:w:C:\Users\James\AppData\Local\VMicro\Arduino\Builds\Control\mega2560\Co
ntrol.hex:a
C:\Users\James\arduino-1.0\hardware\tools\avr\bin\avrdude.exe -CC:\Users\James\arduino-1.0\hardware\tools\avr\etc\avrdude.conf -v -v -v -pm2560 -cstk500v2 -P\\.\COM7 -b115200 -D -Uflash:w:C:\Users\James\AppData\Local\VMicro\Arduino\Builds\Control\mega2560\Co
ntrol.hex:a




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



Posts: 4296
United Kingdom
Re: Uploading to Arduino Mega2560
Reply #1 - Dec 4th, 2011 at 6:27pm
 
thanks for the info. i have just compiled and uploaded to a 2560 using both v18 (arduino 0023) and v19 (arduino 1.0)

so i'm not sure why you are getting issues outside of arduino. arduino 1.0 does contain a new version of avrdude but vm fully qualifies the avrdude path. so i can't see how we would be running the wrong version

which windows op sys are you on?
Back to top
 

Tim Leek
wikihomeatmel studio
WWW  
IP Logged
 
Jim Michener
Newbies
*
Offline



Posts: 3
Re: Uploading to Arduino Mega2560
Reply #2 - Dec 5th, 2011 at 1:10am
 
Windows 7

I have both Arduino 1.0RC-2 and Arduino 1.0,  but I only told VM v19 the path to 1.0.  Does VM use the path that you give in the UI or does it take it from an environmental variable?

Is there a setting somewhere I can change that would put avrdude into verbose mode?

Thanks
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 4296
United Kingdom
Re: Uploading to Arduino Mega2560
Reply #3 - Dec 5th, 2011 at 7:48am
 
it uses the full path given in the ui. v20 is out now and has some compiler fixes but the upload has not changed.

no verbose doesn't show upload at the moment, will add for v21

i use windows 7
Back to top
 

Tim Leek
wikihomeatmel studio
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 4296
United Kingdom
Re: Uploading to Arduino Mega2560
Reply #4 - Dec 8th, 2011 at 2:43pm
 
Jim, this problem is fixed in v21. It worked for me because I have updated usb/fdti drivers for non-arduino boards.

With the arduino usb drivers, the 2560 doesn't reset properly for the upload. We found that the arduino source code forces a reset prior to upload, so vm now does the same.

This has been tested with a previously failing upload to a 2560. Let us know if you have any other issues.

Thanks
Back to top
 

Tim Leek
wikihomeatmel studio
WWW  
IP Logged
 
Jim Michener
Newbies
*
Offline



Posts: 3
Re: Uploading to Arduino Mega2560
Reply #5 - Dec 9th, 2011 at 4:28pm
 
Fantastic!  It works great! Thanks for fixing this and shedding light on the problem!
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print