Go Down

Topic: "Arduino M0" upload from windows command prompt on windows 10 (Read 464 times) previous topic - next topic

visualmicro

Hi,

I wonder if anyone can please assist with an M0 upload issue.

Upload from the Arduino IDE works fine. However putting the board in bootloader mode and uploading the same command from the windows command prompt fails every time.

Steps to reproduce....

In the arduino ide enable file>preferences>upload verbose and then upload.

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

Highlight the avrdude command with the mouse and then use the keyboard to copy the highlighted command.

Open/run windows CMD (command prompt)

Past the command line with right click.

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

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


It's a confusing one. Avrdude.exe runs and establishes the device id but then hits a lot of timeouts.
Arduino for Microsoft Visual Studio Pro and Atmel Studio 6.1 http://www.visualmicro.com
Arduino Debugger http://www.visualmicro.com/post/2012/05/05/Debug-Arduino-Overview.aspx

pert

I don't own an M0 but from a test upload with no board connected it looks like it uses the same system as the Leonardo. What happens is at the start of the upload the Arduino IDE opens the board's serial port at 1200 baud. That is a signal to some USB code that's added in by the Arduino core library to reset the board to activate the bootloader. With my Leonardo I can successfully upload from the command line by following the steps you list but I wonder if there could be some difference in the way the M0 bootloader handles the software reset that happens at the start of the upload via the IDE and the hard reset you are doing for the command line upload.

visualmicro

Thanks I agree, I know about the 1200 baud reset to bootloader port.

Pressing the reset button does the same thing, the board comes up correctly on the bootloader port.

The problems are when avrdude runs so you might well be right but that is undocumented??

I also tried the 1200 baud reset via software and that shows the same issue as the command line.

Either way it should be possible to upload via hard reset/bootloader.

ps: and yes the Leonardo works as expected in all cases.
Arduino for Microsoft Visual Studio Pro and Atmel Studio 6.1 http://www.visualmicro.com
Arduino Debugger http://www.visualmicro.com/post/2012/05/05/Debug-Arduino-Overview.aspx

Phil-D

Hi

I'm having the exact issue in Visual Studio using Visual Micro, followed this issue from Visaul Micro forum.

I found with trial and error uploads worked from the Arduino IDE but not from Visual Studio/Visual Micro, a Google brought me here.

Regards

Phil

Go Up