Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
561d26209This file is pinned to the selected release. Download the original to open it in your design tool.
# Copyright 2024 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
#
# Common OpenOCD script for Cheshire.
transport select jtag
telnet_port disabled
tcl_port disabled
reset_config none
set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen ${irlen} -expected-id 0x1c5e5db3
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME -coreid 0
gdb_report_data_abort enable
gdb_report_register_access_error enable
riscv set_reset_timeout_sec 120
riscv set_command_timeout_sec 120
riscv set_prefer_sba off
# Exit when debugger detaches
$_TARGETNAME configure -event gdb-detach {
echo "GDB detached; ending debugging session."
shutdown
}
# Try enabling address translation (only works for newer versions)
if { [catch { riscv set_enable_virtual on } ] } {
echo "Warning: This version of OpenOCD does not support address translation.\
To debug on virtual addresses, please update to the latest version."
}
init
halt
echo "Ready for Remote Connections."