blob: 3bbe9e8f4054327dfab495d5eae214c82e3ab17c (
plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Copyright (C) Linaro 2015
# Author : peter.griffin@linaro.org
# hi6220 HiKey target
tcl_port 5555
telnet_port 4444
gdb_port 3333
transport select jtag
adapter_khz 5000
jtag_ntrst_delay 300
#reset_config trst_and_srst combined
reset_config trst_and_srst separate trst_push_pull srst_open_drain
set _CHIPNAME hi6220
set _TARGETNAME $_CHIPNAME.cpu
set _TARGETNAME_1 $_CHIPNAME.cpu1
set _TARGETNAME_2 $_CHIPNAME.cpu2
set _TARGETNAME_3 $_CHIPNAME.cpu3
set _TARGETNAME_4 $_CHIPNAME.cpu4
set _TARGETNAME_5 $_CHIPNAME.cpu5
set _TARGETNAME_6 $_CHIPNAME.cpu6
set _TARGETNAME_7 $_CHIPNAME.cpu7
jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0x3 -expected-id 0x5ba00477 -enable
#JTAG tap: auto0.tap tap/device found: 0x5ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x5)
target create $_TARGETNAME aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x80190000 -ctibase 0x80198000 -coreid 0
#target create $_TARGETNAME_1 aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x80192000 -ctibase 0x80199000 -coreid 1
#target create $_TARGETNAME_2 aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x80194000 -ctibase 0x8019A000 -coreid 2
#target create $_TARGETNAME_3 aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x80196000 -ctibase 0x8019B000 -coreid 3
#target create $_TARGETNAME_4 aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x801D0000 -ctibase 0x801D8000 -coreid 4
#target create $_TARGETNAME_5 aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x801D2000 -ctibase 0x801D9000 -coreid 5
#target create $_TARGETNAME_6 aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x801D4000 -ctibase 0x801DA000 -coreid 6
#target create $_TARGETNAME_7 aarch64 -chain-position $_CHIPNAME.dap -dbgbase 0x801D6000 -ctibase 0x801DB000 -coreid 7
proc hi6220_gdb_attach {target} {
echo "Reset ..."
dbginit
reset init
sleep 6000
halt
sleep 6000
halt
sleep 6000
}
proc hi6220_dbginit {target} {
# aarch64 dbginit
# dap info 0
# cortex_a dbginit
# cortex_a reset
# dbginit
reset init
sleep 5000
halt
sleep 6000
}
$_TARGETNAME configure -event reset-assert-post "hi6220_dbginit $_TARGETNAME"
$_TARGETNAME configure -event gdb-attach "hi6220_gdb_attach $_TARGETNAME"
|