Introduce ARCv2 tcl config files
With this commit we add tcl files which describes ARCv2 architecture features and configure files for ARCv2 EMSK board. Changes since v1: -Moved from http://openocd.zylin.com/#/c/5332/4 into separate commit. Changes: 22.01.2020: -Removed "actionpoints" handling code in tcl/cpu/arc/v2.tcl because this capability is not supported yet. Changes: 17.03.2020: -Update Licence headers -Cleanup indents -Removed "reset halt" in boards .tcl -Updated adapter frequency commands Changes: 15.03.2020: -Removed "init" in the of boards .tcl Change-Id: I51bf620abe7b8e046e1dccc861a7d963965d3a42 Signed-off-by: Evgeniy Didin <didin@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5350 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
committed by
Oleksij Rempel
parent
a1c51caafb
commit
435e6101c6
40
tcl/cpu/arc/common.tcl
Normal file
40
tcl/cpu/arc/common.tcl
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright (C) 2015, 2020 Synopsys, Inc.
|
||||
# Anton Kolesov <anton.kolesov@synopsys.com>
|
||||
# Didin Evgeniy <didin@synopsys.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Things common to all ARCs
|
||||
|
||||
# It is assumed that target is already halted.
|
||||
proc arc_common_reset { {target ""} } {
|
||||
if { $target != "" } {
|
||||
targets $target
|
||||
}
|
||||
|
||||
halt
|
||||
|
||||
# 1. Interrupts are disabled (STATUS32.IE)
|
||||
# 2. The status register flags are cleared.
|
||||
# All fields, except the H bit, are set to 0 when the processor is Reset.
|
||||
|
||||
arc jtag set-aux-reg 0xA 0x1
|
||||
|
||||
# 3. The loop count, loop start, and loop end registers are cleared.
|
||||
arc jtag set-core-reg 60 0
|
||||
arc jtag set-aux-reg 0x2 0
|
||||
arc jtag set-aux-reg 0x3 0
|
||||
|
||||
# Program execution begins at the address referenced by the four byte reset
|
||||
# vector located at the interrupt vector base address, which is the first
|
||||
# entry (offset 0x00) in the vector table.
|
||||
set int_vector_base [arc jtag get-aux-reg 0x25]
|
||||
set start_pc ""
|
||||
mem2array start_pc 32 $int_vector_base 1
|
||||
arc jtag set-aux-reg 0x6 $start_pc(0)
|
||||
|
||||
# It is OK to do uncached writes - register cache will be invalidated by
|
||||
# the reset_assert() function.
|
||||
}
|
||||
|
||||
# vim:expandtab:
|
||||
Reference in New Issue
Block a user