Unable to upload to Arduino M0/Zero | Port changes during upload

Hi there,

I just got an Arduino M0 and I'm stuck at uploading the blink sketch to the board.

Board:
Genuine Arduino M0
(not Pro, not Zero, just M0 marked on Silkscreen, only one USB port present)
Play-Zone.ch

Arduino IDE: 1.6.9
OS: Windows 10
Board is recognized under device manager (COM & LPT)
"Arduino Zero Native Port (COM4)"

Setup:
Board: "Arduino/Genuino Zero (Native USB Port)"
Port: "COM4"
Programmer: "USBtinyISP" also tried "USBasp" / "Atmel SAM-ICE" and so on. All with same result.

Problem:
When hitting the upload button, it compiles.
Then the Windows disconnect sound comes up, the Arduino IDE throws a "No device found on COM5" error. Status keeps reading "Uploading...". A few seconds later, the Windows device connect sound comes up.
In Tools > Port, no Port is selected afterwards. The board is available on COM4.
To me it looks like the board gets disconnected at reset and isn't reconnected soon enough for the IDE to see the board on the correct port. (Similar to the Leonardo)
Also tried a different (shorter) USB cable and different USB ports, same results.

Console Output:

Sketch uses 8,356 bytes (3%) of program storage space. Maximum is 262,144 bytes.
No device found on COM5

Does anyone have any hints for what this could be?

Hi mnemocron,

The issue is that you're trying to upload code to an Arduino.org M0 board, using an Arduino.cc IDE.

Unfortunately the .org M0 Pro/M0 and .cc Arduino/Genuino Zero use a different bootloaders, so they're not compatible with each other's IDEs.

The solution is to either:

  1. Download the Arduino.org IDE from their website and use that.

or

  1. Connect an Atmel ICE programmer to the M0 board's SWD port and use the Arduino.cc IDE to burn the bootloader. Thereafter you can use the Arduino.cc IDE as normal.

If you wish to operate the M0 with Arduino c.c. software, after you have replaced the bootloader, you can find a step by step installation procedure here:

https://www.picotech.com/support/topic24051.html

If, on the contrary, you wish to operate the M0 with Arduino.org software, you can find a step by step installation procedure here:

http://forum.arduino.cc/index.php?topic=337448.15

Hope this helps,

glovisol