Burning bootloader, Atmel-ICE & OpenOCD from command line

Hey all,

I’m trying to burn the Arduino Zero bootloader with the Atmel-ICE and the OpenOCD command.

When I do it from the Arduino IDE everything is OK and I can burn it in one click. Later I tried to execute the same command from the “command line” (windows cmd), but it didn’t work - it is stuck after “Info : at91samd21g18.cpu: hardware has 4 breakpoints, 2 watchpoints”.

Any idea?

Thanks!

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.2/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.2/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

cygwin warning:

MS-DOS style path detected: C:\Users\me\AppData\Local\Arduino15\packag

es\arduino\hardware\samd\1.6.2/variants/arduino_zero/openocd_scripts/arduino_zer

o.cfg

Preferred POSIX equivalent is: /cygdrive/c/Users/me/AppData/Local/Ardu

ino15/packages/arduino/hardware/samd/1.6.2/variants/arduino_zero/openocd_scripts

/arduino_zero.cfg

CYGWIN environment variable option “nodosfilewarning” turns off this warning.

Consult the user’s guide for more details about POSIX paths:

http://cygwin.com/cygwin-ug-net/using.h … -pathnames

Info : only one transport option; autoselect ‘swd’

adapter speed: 500 kHz

adapter_nsrst_delay: 100

cortex_m reset_config sysresetreq

4444

Info : CMSIS-DAP: SWD Supported

Info : CMSIS-DAP: JTAG Supported

Info : CMSIS-DAP: Interface Initialised (SWD)

Info : CMSIS-DAP: FW Version = 01.1C.0067

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

Info : SWD IDCODE 0x0bc11477

Info : at91samd21g18.cpu: hardware has 4 breakpoints, 2 watchpoints

Answer to myself :slight_smile:

The only thing that I forgot is the bold quotation marks (before the “telnet_port” and after the shutdown")

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.2/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.2/bootloaders/zero/samd21_sam_ba.bin}} verify reset; shutdown”