Unable to burn Bootloader with Atmel-ICE on Mac IDE (resolved)

Well, my bad. Had the Atmel-ICE programmer cable in backwards. I guess the red stripe on the cable does not correspond to the white dot on the Arduino Zero PCB. Go figure.

Wayne

Note: there's a similar thread on this for Windows, but I'm starting this as a new thread because the issue I have in MacOSX and does not seem to match the PC issue.

I'm unable to burn the boot loader to a genuine Arduino Zero board using the Atmel-ICE programer. The programmer seems to connect properly and shows a Green LED to indicate it's detected the Zero on the Cortex cable. I've also connected the Native USB port to give the board power and I'm using the latest hourly builds (both IDE and SAMD core). But, all I get is error shown below.

Wayne

Arduino: 1.6.6 Hourly Build 2015/07/06 03:36 (Mac OS X), Board: "Arduino Zero (Native USB Port)"

java.io.IOException: Cannot run program "{runtime.tools.openocd.path}/bin/openocd": error=2, No such file or directory
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at java.lang.Runtime.exec(Runtime.java:620)
 at java.lang.Runtime.exec(Runtime.java:485)
 at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11)
 at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:115)
 at cc.arduino.packages.uploaders.SerialUploader.burnBootloader(SerialUploader.java:353)
 at processing.app.Editor$58.run(Editor.java:2756)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
 at java.awt.EventQueue.access$500(EventQueue.java:97)
 at java.awt.EventQueue$3.run(EventQueue.java:709)
 at java.awt.EventQueue$3.run(EventQueue.java:703)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.io.IOException: error=2, No such file or directory
 at java.lang.UNIXProcess.forkAndExec(Native Method)
 at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
 at java.lang.ProcessImpl.start(ProcessImpl.java:134)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
 ... 20 more
Error while burning bootloader.

I got a little further after figuring out that the hourly build installs as a different board in the Boards Manager and that I didn't need to uninstall the other SAMD core. However, now I have a new error, as shown below:

Wayne

Arduino: 1.6.6 Hourly Build 2015/07/06 03:36 (Mac OS X), Board: "Arduino Zero (Native USB Port)"

Open On-Chip Debugger 0.9.0-gd4b7679 (2015-06-10-19:16)
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
in procedure 'init' 
in procedure 'ocd_bouncer'

Error while burning bootloader.

And, here's the same message with the verbose uploader option selected:

Wayne

Arduino: 1.6.6 Hourly Build 2015/07/06 03:36 (Mac OS X), Board: "Arduino Zero (Programming Port)"

/Users/wholder/Library/Arduino15/packages/arduino/tools/openocd/0.9.0-arduino/bin/openocd -d2 -s /Users/wholder/Library/Arduino15/packages/arduino/tools/openocd/0.9.0-arduino/share/openocd/scripts/ -f /Users/wholder/Library/Arduino15/packages/arduino-beta/hardware/samd/9.9.9-Hourly/variants/arduino_zero/openocd_scripts/arduino_zero.cfg -c telnet_port disabled; init; halt; at91samd bootloader 0; program {{/Users/wholder/Library/Arduino15/packages/arduino-beta/hardware/samd/9.9.9-Hourly/bootloaders/zero/samd21_sam_ba.bin}} verify reset; shutdown 
Open On-Chip Debugger 0.9.0-gd4b7679 (2015-06-10-19:16)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : only one transport option; autoselect 'swd'
adapter speed: 500 kHz
adapter_nsrst_delay: 100
cortex_m reset_config sysresetreq
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 01.00.0021
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 500 kHz
in procedure 'init' 
in procedure 'ocd_bouncer'

Error while burning bootloader.

Thanks wayne, I'm glad you figured this out!

:sunglasses:

Well, my bad. Had the Atmel-ICE programmer cable in backwards. I guess the red stripe on the cable does not correspond to the white dot on the Arduino Zero PCB. Go figure.

When you say you had it in backwards, are you referring to the way you had the connector oriented when plugging it into the Zero? Or which end of the cable you had plugged into the ICE itself? The way you worded it it sounds half like the former and half the latter.

In any case, it matters which end of the ribbon cable you have plugged into the ICE programmer. The end you should be programming with is the one that also has the 6 pin ISP connector. The end without the ISP connector is the one that goes into the ICE itself.

I designed my Neutrino boards to have the same pinout as the Zero, and the pin 1 dot matches up with the red stripe. But if you plugged that cable into the programmer backwards then it would not.

scswift:
When you say you had it in backwards, are you referring to the way you had the connector oriented when plugging it into the Zero? Or which end of the cable you had plugged into the ICE itself? The way you worded it it sounds half like the former and half the latter.

In any case, it matters which end of the ribbon cable you have plugged into the ICE programmer. The end you should be programming with is the one that also has the 6 pin ISP connector. The end without the ISP connector is the one that goes into the ICE itself.

I designed my Neutrino boards to have the same pinout as the Zero, and the pin 1 dot matches up with the red stripe. But if you plugged that cable into the programmer backwards then it would not.

Thanks. It didn't occur to me that the cable wouldn't be symmetrical.

Wayne