-
Notifications
You must be signed in to change notification settings - Fork 20
/
or1k-dev.tcl
51 lines (37 loc) · 1.08 KB
/
or1k-dev.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# If you want to use the VJTAG TAP or the XILINX BSCAN,
# you must set your FPGA TAP ID here
set FPGATAPID 0x020f30dd
# Choose your TAP core (VJTAG , MOHOR or XILINX_BSCAN)
if { [info exists TAP_TYPE] == 0} {
set TAP_TYPE VJTAG
}
# Set your chip name
set CHIPNAME or1200
source [find target/or1k.cfg]
# Set the servers polling period to 1ms (needed to JSP Server)
poll_period 1
# 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
}
gdb_port 50001
# 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]