2022-06-12 16:48:05 -05:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2013-11-10 09:03:40 -06:00
|
|
|
# If you want to use the VJTAG TAP or the XILINX BSCAN,
|
|
|
|
# you must set your FPGA TAP ID here
|
|
|
|
|
2013-08-08 16:45:47 -05:00
|
|
|
set FPGATAPID 0x020b30dd
|
2013-11-10 09:03:40 -06:00
|
|
|
|
|
|
|
# Choose your TAP core (VJTAG , MOHOR or XILINX_BSCAN)
|
2014-03-18 14:04:30 -05:00
|
|
|
if { [info exists TAP_TYPE] == 0} {
|
|
|
|
set TAP_TYPE VJTAG
|
|
|
|
}
|
|
|
|
|
2013-08-08 16:45:47 -05:00
|
|
|
# Set your chip name
|
|
|
|
set CHIPNAME or1200
|
|
|
|
|
|
|
|
source [find target/or1k.cfg]
|
|
|
|
|
2014-05-30 09:49:42 -05:00
|
|
|
# Set the servers polling period to 1ms (needed to JSP Server)
|
|
|
|
poll_period 1
|
|
|
|
|
2013-08-08 16:45:47 -05:00
|
|
|
# Set the adapter speed
|
2019-08-23 08:51:00 -05:00
|
|
|
adapter speed 3000
|
2013-08-08 16:45:47 -05:00
|
|
|
|
|
|
|
# Enable the target description feature
|
|
|
|
gdb_target_description enable
|
|
|
|
|
|
|
|
# Add a new register in the cpu register list. This register will be
|
|
|
|
# included in the generated target descriptor file.
|
|
|
|
# format is addreg [name] [address] [feature] [reg_group]
|
|
|
|
addreg rtest 0x1234 org.gnu.gdb.or1k.group0 system
|
|
|
|
|
|
|
|
# Override default init_reset
|
|
|
|
proc init_reset {mode} {
|
|
|
|
soft_reset_halt
|
|
|
|
resume
|
|
|
|
}
|
|
|
|
|
|
|
|
# Target initialization
|
|
|
|
init
|
|
|
|
echo "Halting processor"
|
|
|
|
halt
|
|
|
|
|
|
|
|
foreach name [target names] {
|
|
|
|
set y [$name cget -endian]
|
|
|
|
set z [$name cget -type]
|
|
|
|
puts [format "Chip is %s, Endian: %s, type: %s" \
|
|
|
|
$name $y $z]
|
|
|
|
}
|
|
|
|
|
|
|
|
set c_blue "\033\[01;34m"
|
|
|
|
set c_reset "\033\[0m"
|
|
|
|
|
|
|
|
puts [format "%sTarget ready...%s" $c_blue $c_reset]
|