Uploading to Zero

I have a Arduino.cc Zero & IDE 1.6.7 on W7. Tools.Programmer="ArduinoISP".

When uploading the blink program this fails with "the selected port ... does not exist". Full output:

Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Zero (Programming Port)"

C:\Users\me\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino/bin/openocd.exe -d2 -s C:\Users\me\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.9.0-arduino/share/openocd/scripts/ -f C:\Users\me\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.4/variants/arduino_zero/openocd_scripts/arduino_zero.cfg -c telnet_port disabled; init; halt; at91samd bootloader 0; program {{C:\Users\me\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.4/bootloaders/zero/samd21_sam_ba.bin}} verify reset; shutdown Open On-Chip Debugger 0.9.0-gd4b7679 (2015-06-10-22:24) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 2 Runtime Error: C:\Users\me\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.4/variants/arduino_zero/openocd_scripts/arduino_zero.cfg:21: Can't find interface/cmsis-dap.cfg in procedure 'script' at file "embedded:startup.tcl", line 60 at file "C:\Users\me\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.4/variants/arduino_zero/openocd_scripts/arduino_zero.cfg", line 21 the selected serial port at file "C:\Users\me\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.4/variants/arduino_zero/openocd_scripts/arduino_zero.cfg", line 21 does not exist or your board is not connected

Reboot did not help. In "Devices and printers" the device shows as "EDBG CMSIS-DAP" without a port number, whereas a Uno & Due both show with port numbers.

If I replace the Zero with an Arduino.cc Uno and reselect Tools.Board & Tools.Port then the program uploads correctly and reflects modifications.

Earlier I loaded the blink program onto the Zero using a Visualmicro GDB project successfully several times but this stopped working upon trying the debug feature. This blink program is still running correctly on the Zero whenever it is connected to a USB port.

A similar error message was previously discussed but seemed applicable to mixing Arduino.cc and Arduino.org boards and IDEs.

Hi !

You have to reburn the bootloader each time you use Atmel Studio for debugging I think.


You need to either upload via USB with USBasp (the board must have a bootloader) or with Atmel ICE via the SWD port.

You cannot upload to a Zero with the SPI port (which would be what you're mistaking for an ISP port, which was what the SPI port used to be labeled because it was used for programming as well).


This Zero board may have been used with Atmel Studio 7 some weeks ago; however it had definitely uploaded several variants of the blink program via Visualmicro/Visualstudio 2015 yesterday, only failing upon debug as described in original post.

When the reset button is held down the LED stays off but once released the previously load blink program resumes.

What is the default setting for Tools.Programmer?

scswift: ArduinoISP?

You need to either upload via USB with USBasp (the board must have a bootloader)

This produced the same errors.

Using this link https://learn.adafruit.com/proper-step-debugging-atsamd21-arduino-zero-m0/restoring-bootloader which has " Launch the IDE, select Arduino Zero (programming port) from the Tools->Board menu, and Atmel EDBG as the Tools->Programmer Then select Burn Bootloader"

This also gives same errors - in this case I compared this output to that in OP with Winmerge to verify this.

What is the LED doing if you double press the reset button ?

Have you ever been able to load a program with the Arduino IDE on this board?

AloyseTech: What is the LED doing if you double press the reset button ?

Have you ever been able to load a program with the Arduino IDE on this board?

Two quick presses has no effect, excepting that the blinking LED stays off whilst reset is pressed.

I do not recall if I tried this Zero with Arduino.cc IDE 1.6.7 ; that would have been last year and Zero may not have been available in Arduino.cc IDE 1.6.7 then.

Also just tried with Atmel Ice connected from SAM to 10-pin JTAG on Zero with the red wire nearest to the reset button and the nipple facing toward the power socket. On Atmel ICE left LED is green, centre is red and right LED is always off.

Once again this also produces same error, verified with Winmerge on outputs.

I get the same error when using the Arduino IDE (1.6.8). Every once in a while I am able to upload a sketch but 95% of the time I see the same error as cited in the first first post of this thread.

Using Atmel Studio 7 I don't have any trouble uploading and debugging with the Zero. Yesterday, I was magically, able to upload a sketch to my Zero using the Arduino IDE. Note that I just make any changes to the settings once I've selected the required board and port. Simply trying over and over worked.

Hiting the reset button seems to do nothing at all. No LEDs change state either while the button is pressed or after releasing. No change when I double click the reset button either.