0

This question already has an answer here:

This is my setup:

  • SAMD21G15B with no external crystal (Addon possible with Epson MC-146 32.768Khz )
  • SWD connector

I'm trying to upload code with the Arduino IDE via the Atmel ICE. But when I choose

  • Arduino Zero Native programming port.
  • Programmer Atmel ICE
  • Upload using programmer

I get this error:

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Zero (Programming Port)"

Sketch uses 10464 bytes (3%) of program storage space. Maximum is 262144 bytes.
Open On-Chip Debugger 0.9.0-g932ec70 (2017-02-15-12:34)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
debug_level: 0
adapter speed: 500 kHz
adapter_nsrst_delay: 100
cortex_m reset_config sysresetreq
Error: at91samd21g18.cpu -- clearing lockup after double fault
Polling target at91samd21g18.cpu failed, trying to reexamine
target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x00000614 msp: 0x20007ffc
** Programming Started **
auto erase enabled
the selected serial port auto erase enabled
 does not exist or your board is not connected
Error: Couldn't find part correspoding to DID 10011424
Error: auto_probe failed
Runtime Error: embedded:startup.tcl:454: ** Programming Failed **
in procedure 'program' 
in procedure 'program_error' called at file "embedded:startup.tcl", line 510
at file "embedded:startup.tcl", line 454

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences

.

What could I be doing wrong?

This is my schematic.

Schematic here!

marked as duplicate by Juraj, sempaiscuba, VE7JRO, sa_leinad, MatsK Feb 28 at 21:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Your board is a SAMD21G15B and the Arduino Zero is a ATSAMD21G18? – Maximilian Gerhardt Feb 27 at 12:45
  • @MaximilianGerhardt the only difference is the flash size. But I was doubting the device signature would be different, how do I go around this? – prat Feb 27 at 12:49
  • In your Arduino's installation there is a hardware folder somewhere, where the script file at91samd21g18.cpu or another board target is declared for openocd. Find that declarataion and change it to matching script. Your CPU is definitely known (github.com/ntfreak/openocd/blob/master/src/flash/nor/…) – Maximilian Gerhardt Feb 27 at 12:53
  • create your hardware definition referring the SAMD package. like this github.com/jandrassy/my_boards the variants folder contains the configuration file for openocd – Juraj Feb 27 at 13:17