1# Copyright (C) 2018 Synopsys, Inc. 2# SPDX-License-Identifier: Apache-2.0 3# 4 5# 6# Synopsys DesignWare ARC IoT Development Kit 7# 8 9# Configure JTAG cable 10# IoT DK has built-in FT2232 chip, which is similar to Digilent HS-1. 11adapter driver ftdi 12 13# Only specify FTDI serial number if it is specified via 14# "set _ZEPHYR_BOARD_SERIAL 12345" before reading this script 15if { [info exists _ZEPHYR_BOARD_SERIAL] } { 16 ftdi_serial $_ZEPHYR_BOARD_SERIAL 17} 18 19ftdi vid_pid 0x0403 0x6010 20ftdi layout_init 0x0088 0x008b 21ftdi channel 1 22 23 24# EM9D requires 8 MHz. 25adapter speed 8000 26 27# ARCs support only JTAG. 28transport select jtag 29 30source [find cpu/arc/em.tcl] 31 32set _CHIPNAME arc-em 33set _TARGETNAME $_CHIPNAME.cpu 34 35# IOTDK IDENTITY is 0x200444b1 36jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -expected-id 0x200444b1 37 38set _coreid 0 39set _dbgbase [expr {0x00000000 | ($_coreid << 13)}] 40 41target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME \ 42 -coreid 0 -dbgbase $_dbgbase -endian little 43 44# There is no SRST, so do a software reset 45$_TARGETNAME configure -event reset-assert "arc_em_reset $_TARGETNAME" 46 47arc_em_init_regs 48