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) Arduino M0 - Avrdude: Programmer is not responding (Read 13460 times)
Jonny B
Newbies
*
Offline


Posts: 9
Joined: Jun 28th, 2017
Arduino M0 - Avrdude: Programmer is not responding
Jun 28th, 2017 at 11:16am
Print Post  
When uploading code to an Arduino M0 from within Visual Studio, upload is always very slow (about a minute) and the log shows plenty of these lines:
avrdude: stk500isp_read_byte(): Sending read memory command: avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout

If I switch to uploading from inside the Arduino IDE, the upload is very fast (a few seconds) and succeeds without any problems every time.

I have attached the log from Visual Micro.

Regards;
/jb
« Last Edit: Jun 28th, 2017 at 11:20am by Jonny B »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Jonny B
Newbies
*
Offline


Posts: 9
Joined: Jun 28th, 2017
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #1 - Jun 28th, 2017 at 11:19am
Print Post  
And here is the log from Arduino. 

Regards;
/jb

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #2 - Jun 28th, 2017 at 12:32pm
Print Post  
Hi,

Looks like its not discovering the m0 tools and dropping back to attempting a standard old style arduino upload.

Can you please switch on vmicro>compiler>verbose and "vmicro>compiler>show build properties" then build and post a new .txt so I can see what you have installed.

Also please say which ide version (visual studio or atmel studio and which version)

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #3 - Jun 28th, 2017 at 12:45pm
Print Post  
Looking again at this Visual Micro seems to be sending the correct command.

I will look into the delay between polling for the upload port and sending the command. I can't see what else could cause the issue.

  
Back to top
WWW  
IP Logged
 
Jonny B
Newbies
*
Offline


Posts: 9
Joined: Jun 28th, 2017
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #4 - Jun 28th, 2017 at 1:08pm
Print Post  
Yeah, I had already verified that the command line was identical. 

I am using Visual Studio 2017 and the registered version of Visual Micro 1.1702.15/1705,7.

I was suspecting maybe something in the console redirect to the VS window?

Regards;
/jb
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #5 - Jun 28th, 2017 at 1:14pm
Print Post  
Thanks

Questions that might help me reproduce faster...

1) is the serial monitor open when you attempt upload? if so it the auto-reconnect checked?

2) what is the date/time of the usb driver for the initial COM port in device manager.



  
Back to top
WWW  
IP Logged
 
Jonny B
Newbies
*
Offline


Posts: 9
Joined: Jun 28th, 2017
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #6 - Jun 28th, 2017 at 1:31pm
Print Post  
1) I tried both, it makes no difference.
2) The version of the driver for "Arduino M0 (native Mode)" is 1.1.1.0, 2015-03-19.

Regards;
/jb
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #7 - Jun 28th, 2017 at 1:33pm
Print Post  
Thanks, must be the delay or port checking before it runs avrdude. Probably just a slow driver that needs a bit more time. I will see what delay arduino.cc are using these days.

After we run the avrdude command there isn't anything that happens from visual micro perspective.

does this run okay from within a bat file?

Code
Select All
.3.0-arduino9\bin\avrdude -V e\6.3.0-arduino9/etc/avrdude.conf" -v -v -patmega2560 -cstk500v2 -PCOM15 -b57600 lease/JouleTest.ino.hex:i" 

« Last Edit: Jun 28th, 2017 at 1:35pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Jonny B
Newbies
*
Offline


Posts: 9
Joined: Jun 28th, 2017
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #8 - Jun 28th, 2017 at 1:47pm
Print Post  
Running the command from a CMD prompt actually shows the same problem. Seems this is not a Visual Micro issue.

Still works fine under Arduino though. Confusing.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #9 - Jun 28th, 2017 at 1:51pm
Print Post  
Great thanks. That helps. It is either a problem with the working directory or with the stray -V in the command

1)
Please try this, I have removed a stray -V

Code
Select All
.3.0-arduino9\bin\avrdude  e\6.3.0-arduino9/etc/avrdude.conf" -v -v -patmega2560 -cstk500v2 -PCOM15 -b57600 lease/JouleTest.ino.hex:i" 



2)
Then change to the arduino.exe folder and try it again. By running from the arduino ide folder the working directory will be different.



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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #10 - Jun 28th, 2017 at 1:52pm
Print Post  
++ also confirm what app is selected in the vm tool bar. Have you selected "arduino 1.6/1.8" or "Visual Micro"?
« Last Edit: Jun 28th, 2017 at 1:52pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Jonny B
Newbies
*
Offline


Posts: 9
Joined: Jun 28th, 2017
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #11 - Jun 28th, 2017 at 8:34pm
Print Post  
Removing the stray -V and running from the Arduino directory made no difference. Switching between Arduino and Visual Micro in the dropdown did not make any difference either.

Regards;
/jb
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #12 - Jun 28th, 2017 at 9:02pm
Print Post  
Thanks for testing.

I forgot that the M0 is the type of board that has to be commanded to boot onto a different port before upload

In your example you will see COM24 becoming COM15

I think the board also boots into programming mode when it first starts (after reset) but only if it is in programming mode will the command you have been trying work.

Notice the command contains -PCOM15

To cause these boards to boot into programming mode we have to open the com port on com24 at 1200 baud. That's how both Visual Micro and Arduino work. In arduino speak it's called "touching the serial port".

I will do some testing because there are some timings between how long we wait between the new port coming up and running the actual avrdude prog command. From memory the timing is 200-400 millis.  It's possible the new avrdude tools are different to past versions. 

I am sure another user has logged a similar issue over the past week or so but for a different (but similar upload) board so something suggests the new avrdude and the 1200 baud system will be the problem.

I will try to look at it over the next few days, until then you can use the file>preference>external editor option in the arduino to build and upload. It allows both ides to be open with the same project at the same time.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #13 - Jun 28th, 2017 at 9:08pm
Print Post  
I just tried a similar board which works okay. Earlier we were going to look your your installed arduino version and also which samd platform version you have installed in board manager?

I tried the latest but would like to try the ones you are using.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #14 - Jul 8th, 2017 at 1:21pm
Print Post  
I have purchased an M0 and have the same issue. I'll look into it.

EDIT: Logged a report with arduino.org

Thanks
« Last Edit: Jul 8th, 2017 at 3:02pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Ross Squires
Newbies
*
Offline


Posts: 1
Joined: Mar 8th, 2018
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #15 - Mar 8th, 2018 at 8:30pm
Print Post  
Was there a solution for this issue? I'm running into an identical problem, Arduino IDE flashes a M0+ device quickly, while Visual Micro can take a minute or longer.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #16 - Apr 15th, 2018 at 11:45am
Print Post  
Sorry for the delay this took some testing.

The issue appears to be with the toolchain. I agree that it works from the java based arduino ide but it doesn't appear to work in normal windows apps.

You can try this for yourself.

In the arduino ide enable file>preferences>upload verbose

Then upload.

After upload you will see the avrdude.exe upload command.

Highlight and use keyboard to copy the entire avrdude.exe command line.

Open windows CMD

Past the command line with right click.

Press the reset button on your esp so it goes into bootloader mode.

Press ENTER in the cmd window to run the avrdude.exe upload command

Has same problem as visual micro?


I have raised the question in the arduino forum here
« Last Edit: Apr 15th, 2018 at 11:53am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #17 - Aug 3rd, 2018 at 11:49am
Print Post  
Off-Topic replies have been moved to this Topic.
  
Back to top
WWW  
IP Logged
 
Phil D
Newbies
*
Offline


Posts: 4
Joined: May 11th, 2015
Re: Arduino M0 - Avrdude: Programmer is not responding
Reply #18 - Aug 9th, 2018 at 3:34pm
Print Post  
Hi

Any update on this yet?  I appreciate it is a tough one as it also doesn't work from the command line.  Having the same issue, getting lots of time outs when uploading using the M0 bootloader on a home built SAMD21 board and also on a M0 zero clone board.  It does upload, just loads of timeouts whilst it does it, but works fine via the Arduino IDE.

Code
Select All
avrdude: safemode: hfuse reads as 58
avrdude: stk500isp_read_byte(.., efuse, 0x0, ...)
avrdude: stk500isp_read_byte(): Sending read memory command: avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500isp_read_byte(.., efuse, 0x0, ...)
avrdude: stk500isp_read_byte(): Sending read memory command: avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500isp_read_byte(.., efuse, 0x0, ...)
avrdude: stk500isp_read_byte(): Sending read memory command: avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
 



Many thanks

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