-
Notifications
You must be signed in to change notification settings - Fork 31
/
raspberrypi3.cfg
39 lines (32 loc) · 1.29 KB
/
raspberrypi3.cfg
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
# ref: http://www.raspberrypi.org/forums/viewtopic.php?f=72&t=100268
# : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0464f/ch10s06s01.html
adapter speed 1000
adapter srst delay 400
reset_config none
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME bcm2837
}
#
# Main DAP
#
if { [info exists DAP_TAPID] } {
set _DAP_TAPID $DAP_TAPID
} else {
set _DAP_TAPID 0x4ba00477
}
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -enable
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
proc bcm2837_create_core {_CHIPNAME corenum corebase ctibase} {
set _TARGETNAME $_CHIPNAME.cpu.$corenum
cti create $_CHIPNAME.cti.$corenum -dap $_CHIPNAME.dap -ctibase $ctibase
target create $_TARGETNAME aarch64 -dap $_CHIPNAME.dap -coreid $corenum -dbgbase $corebase -rtos hwthread -cti $_CHIPNAME.cti.$corenum
$_TARGETNAME configure -event reset-assert-post "aarch64 dbginit"
$_TARGETNAME configure -event gdb-attach { halt }
}
bcm2837_create_core $_CHIPNAME 0 0x80010000 0x80018000
bcm2837_create_core $_CHIPNAME 1 0x80012000 0x80019000
bcm2837_create_core $_CHIPNAME 2 0x80014000 0x8001A000
bcm2837_create_core $_CHIPNAME 3 0x80016000 0x8001B000
target smp $_CHIPNAME.cpu.0 $_CHIPNAME.cpu.1 $_CHIPNAME.cpu.2 $_CHIPNAME.cpu.3