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 Upload to Mega fails, looking for USB port not COM port (Read 3566 times)
Jamie Furtner
Newbies
*
Offline


Posts: 2
Joined: Dec 2nd, 2012
Upload to Mega fails, looking for USB port not COM port
Mar 11th, 2015 at 6:18am
Print Post  
Hello,

I'm using Visual Micro with a Mega that has a USB<->Serial AVRISP mkII programmer, but I can't program it when I use Visual Micro. I think I've traced the problem to the avrdude command. The avrdude command line that Visual Micro uses is:
Code
Select All
D:\arduino-1.0.5\hardware\tools\avr\bin\avrdude -C"D:\arduino-1.0.5\hardware/tools/avr/etc/avrdude.conf" -v -v -v -v -patmega2560 -cstk500v2 -Pusb 0\Marlin.hex":i 



compared to the avrdude command the Arduino IDE uses:
Code
Select All
D:\arduino-1.0.5-enhanced\hardware/tools/avr/bin/avrdude -CD:\arduino-1.0.5-enhanced\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P\\.\COM5 -b115200 -D -V in.cpp.hex:i 



The key difference looks like the port configuration:
Code
Select All
Visual Micro:
  -Pusb
Arduino IDE:
  -P\\.\COM5 -b115200 -D -V
 



I've tried it with the 1.0.5 stock, 1.0.5 enhanced, and 1.6 IDEs but it has not made a difference.

Is there any way to add a AVRISP mkII programmer that uses the configured COM port instead? I've looked at the documentation and programmers.txt files located under the %PROGRAMFILES%\Visual Micro folder and I don't see anything obvious. Am I missing something?

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload to Mega fails, looking for USB port not COM port
Reply #1 - Mar 11th, 2015 at 1:35pm
Print Post  
Hi,

There is some confusion here that I can't quite put my finger on especially because with Arduino 1.6 nothing is hard coded all config is read from the boards.txt, programmers.txt and platform.txt from the respective Arduino hardware/platform folder.

Furthermore we have made lots of avrisp uploads so it's even more confusing.

1)
So please first confirm what options you have selected in Visual Micro, have you selected the AVRISP programmer and if so what is the exact name you have selected. 

2)
Have you switch on "tools>visual micro>upload using programmer"?

3)
In Arduino are you clicking File>Upload using programmer"?

Thanks

« Last Edit: Mar 11th, 2015 at 1:36pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Jamie Furtner
Newbies
*
Offline


Posts: 2
Joined: Dec 2nd, 2012
Re: Upload to Mega fails, looking for USB port not COM port
Reply #2 - Mar 12th, 2015 at 3:22am
Print Post  
Ah, I see where I went wrong. I wasn't using Upload using Programmer in the Arduino IDE - I was using the regular Upload function, which uploads via the COM port as expected. Thanks for pointing that out. I turned off "Upload using programmer" in Visual Micro and it uploaded correctly from within Visual Studio.

The same programmer was selected (AVRISP mkII) but I had Upload using programmer turned on. I think I misread that in the documentation.

Thanks for a great product!
Jamie
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Upload to Mega fails, looking for USB port not COM port
Reply #3 - Mar 12th, 2015 at 8:29pm
Print Post  
Hi Jamie,

Great that makes sense. 

Yes the programmer is a piece of hardware that you can buy that often plugs into the 6 pin ICSP port on the board. Usb upload is not counted as a programmer and the selected programmer option is ignored.

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint