-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# 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 | ||
# | ||
# Use this OpenOCD script to connect to debug Carfield via a Digilent | ||
# HS2 USB-JTAG Dongle connected to your FPGA | ||
# Attention: This config requires | ||
# Safety-Island : Disabled | ||
# OpenTitan : Disabled | ||
|
||
adapter_khz 2000 | ||
interface ftdi | ||
ftdi_vid_pid 0x0403 0x6014 | ||
ftdi_layout_init 0x00e8 0x60eb | ||
ftdi_channel 0 | ||
set irlen 5 | ||
|
||
transport select jtag | ||
telnet_port disabled | ||
tcl_port disabled | ||
reset_config none | ||
|
||
set _CHIPNAME carfield | ||
jtag newtap $_CHIPNAME cheshire -irlen ${irlen} -expected-id 0xed9c5e51 | ||
|
||
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 | ||
|
||
# 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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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 | ||
# | ||
# Use this OpenOCD script to connect to debug Carfield via a Digilent | ||
# HS2 USB-JTAG Dongle connected to your FPGA | ||
# Attention: This config requires | ||
# Safety-Island : Enabled | ||
# OpenTitan : Disabled | ||
|
||
adapter_khz 2000 | ||
interface ftdi | ||
ftdi_vid_pid 0x0403 0x6014 | ||
ftdi_layout_init 0x00e8 0x60eb | ||
ftdi_channel 0 | ||
set irlen 5 | ||
|
||
transport select jtag | ||
telnet_port disabled | ||
tcl_port disabled | ||
reset_config none | ||
|
||
set _CHIPNAME carfield | ||
jtag newtap $_CHIPNAME.safety cpu -irlen ${irlen} -expected-id 0x10000db3 | ||
jtag newtap $_CHIPNAME.cheshire cpu -irlen ${irlen} -expected-id 0xed9c5e51 | ||
|
||
target create $_CHIPNAME.cheshire riscv -chain-position $_CHIPNAME.cheshire -coreid 0 | ||
target create $_CHIPNAME.safety riscv -chain-position $_CHIPNAME.safety -coreid 0x8 | ||
|
||
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 | ||
|
||
# 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" | ||
|