Closed tmarkdriedger closed 5 years ago
Hi @timdriedger , thanks for reporting. It looks like an horrible path related bug; could you update again to 1.8.1 and enable verbose upload to read also the invoked commandline? It should resemble something like
..../packages/arduino/tools/openocd/0.10.0-arduino7/bin/openocd -d2 -s /home/martino/.arduino15/packages/arduino/tools/openocd/0.10.0-arduino7/share/openocd/scripts/ -f ..../packages/arduino/hardware/samd/1.8.1/variants/nano_33_iot/openocd_scripts/arduino_zero.cfg -c "telnet_port disabled; init; halt; at91samd bootloader 0; program ..../packages/arduino/hardware/samd/1.8.1/bootloaders/nano_33_iot/samd21_sam_ba_arduino_nano_33_iot.bin verify reset; shutdown"
Since the backslash seem stripped in your error it could be a unix/windows clash on openocd
Error: couldn't open C:Users imdrAppDataLocalArduino15packages�rduinohardwaresamd�.8.1/bootloaders/zero/samd21_sam_ba.bin
Closing as fixed by eb62911
@facchinm, I'm a bit confused by your commit (message). It talks about double/triple {}, but I only see double ones? It also talks about a difference between unix and windows, but then uses the same lines for both platforms. Or is it that this difference used to exist but not anymore in recent OpenOCD versions?
Also, it's a bit confusing that there is a double {} now. AFAICS, the inner {} is the Arduino IDE replacement syntax, while the outer one is passed as-is to OpenOCD and is TCL string quoting. Maybe it would be good to add a comment that indicates this, to help future readers understand these lines?
Adding a comment would be good :slightly_smiling_face:
The original "code" was https://github.com/arduino/ArduinoCore-samd/commit/5704a06f781558efe9f141c6323fcae9e64036dd#diff-d638a47d1ca0e2a5585fb34c7d7fb0f9L190 , and openocd 0.9 properly escaped anything in {{...stuff...}}
. 0.10.0 just quotes the first level, thus we now need to provide just {... stuff...}
.
The windows vs unix thing meant that the error is not visible if there is no backslash, even if we don't tcl-quote the path.
I'll add a line to explain this in platform.txt :wink:
I see the following error when attempting to burn the Zero bootloader using Atmel-ICE with the 1.8.1 samd core...
Rolling back to 1.6.21, burning the bootloader is successful...
Windows 10 Pro Version 1903 Arduino 1.8.9