Description
If your Username has a space in the username (here displayed as "FOO BAR") the path of the select_swd.cfg cannot be resolved correctly .
"C:\Users\FOO BAR\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2/bin/openocd.exe" -d2 -s "C:\Users\FOO BAR\AppData\Local\Arduino15\packages\arduino\tools\openocd\0.11.0-arduino2/share/openocd/scripts/" -f interface/cmsis-dap.cfg -f C:\Users\FOO BAR\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\4.2.1/debugger/select_swd.cfg -f target/nrf52.cfg -c "telnet_port disabled; init; reset init; halt; adapter speed 10000; program {C:\Users\FOO BAR\AppData\Local\arduino\sketches\AE38B8963D4AEDD725242DEA75DE567E/AccelGyro.ino.elf}; reset run; shutdown"
Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:45)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2Unexpected command line argument: BAR\AppData\Local\Arduino15\packages\arduino\hardware\mbed_nicla\4.2.1/debugger/select_swd.cfg
Failed uploading: uploading error: exit status 1
SOLUTION:
In boards.txt change the line 447
nicla_sense.programmer.transport_script={runtime.platform.path}/debugger/select_swd.cfg
to
nicla_sense.programmer.transport_script="{runtime.platform.path}/debugger/select_swd.cfg"