zephyr/boards/arc/iotdk/support/openocd.cfg
Watson Zeng 77e1d4d710 board: arc: accommodate upstream OpenOCD for ARC
In newer OpenOCD version from Zephyr's SDK v0.12, there are some
changes in OpenOCD scripts: JTAG probe interface (AKA "adapter")
setup, see http://openocd.zylin.com/#/c/5784/

And so we need to change OpenOCD scripts accordingly to match
newer OpenOCD version from Zephyr's SDK v0.12.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2020-12-16 14:27:23 +01:00

48 lines
1.1 KiB
INI

# Copyright (C) 2018 Synopsys, Inc.
# SPDX-License-Identifier: Apache-2.0
#
#
# Synopsys DesignWare ARC IoT Development Kit
#
# Configure JTAG cable
# IoT DK has built-in FT2232 chip, which is similar to Digilent HS-1.
adapter driver ftdi
# Only specify FTDI serial number if it is specified via
# "set _ZEPHYR_BOARD_SERIAL 12345" before reading this script
if { [info exists _ZEPHYR_BOARD_SERIAL] } {
ftdi_serial $_ZEPHYR_BOARD_SERIAL
}
ftdi_vid_pid 0x0403 0x6010
ftdi_layout_init 0x0088 0x008b
ftdi_channel 1
# EM9D requires 8 MHz.
adapter speed 8000
# ARCs support only JTAG.
transport select jtag
source [find cpu/arc/em.tcl]
set _CHIPNAME arc-em
set _TARGETNAME $_CHIPNAME.cpu
# IOTDK IDENTITY is 0x200444b1
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -expected-id 0x200444b1
set _coreid 0
set _dbgbase [expr 0x00000000 | ($_coreid << 13)]
target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME \
-coreid 0 -dbgbase $_dbgbase -endian little
# There is no SRST, so do a software reset
$_TARGETNAME configure -event reset-assert "arc_em_reset $_TARGETNAME"
arc_em_init_regs