make BOARD=iotdk TOOLCHAIN=gnu run
Download & Run obj_iotdk_10/gnu_arcem9d/blinky_gnu_arcem9d.elf
arc-elf32-gdb -ex "target remote | openocd --pipe -s .../bin//share/openocd/scripts -f ../../../board/iotdk/configs/openocd/snps_iotdk.cfg" -ex "load" -ex "c" obj_iotdk_10/gnu_arcem9d/blinky_gnu_arcem9d.elf
...
Reading symbols from obj_iotdk_10/gnu_arcem9d/blinky_gnu_arcem9d.elf...
Remote debugging using | openocd --pipe -s .../bin//share/openocd/scripts -f ../../../board/iotdk/configs/openocd/snps_iotdk.cfg
Open On-Chip Debugger 0.9.0-dev-g8ee31a5 (2021-10-11-00:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Remote communication error. Target disconnected.: Connection reset by peer.
You can't do that when your target is `exec'
The program is not being run.
(gdb)
That happens because scripts root directory gets calculated improperly: as if it's calculated from bin folder (where openocd binary is located). The following change fixes it:
https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp/commit/5581e62579df6795de4d8d77ca95de0b635868a4 breaks execution with OpenOCD:
That happens because scripts root directory gets calculated improperly: as if it's calculated from
bin
folder (whereopenocd
binary is located). The following change fixes it: