Skip to content

Instantly share code, notes, and snippets.

@tonosaman
Forked from benpye/bcm2837.cfg
Created July 6, 2016 07:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonosaman/69c11d4eb077dae1b12be27fa89dba1a to your computer and use it in GitHub Desktop.
Save tonosaman/69c11d4eb077dae1b12be27fa89dba1a to your computer and use it in GitHub Desktop.
# BCM2837 Raspberry Pi 3 Target
tcl_port 5555
telnet_port 4444
gdb_port 3333
transport select jtag
adapter_khz 1000
jtag_ntrst_delay 500
reset_config trst_only
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME rpi3
}
#
# Main DAP
#
if { [info exists DAP_TAPID] } {
set _DAP_TAPID $DAP_TAPID
} else {
set _DAP_TAPID 0x4ba00477
}
jtag newtap $_CHIPNAME dap -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_DAP_TAPID -enable
set _TARGETNAME $_CHIPNAME.cpu
set _TARGETNAME_1 $_CHIPNAME.cpu1
set _TARGETNAME_2 $_CHIPNAME.cpu2
set _TARGETNAME_3 $_CHIPNAME.cpu3
target create $_TARGETNAME aarch64 -chain-position $_CHIPNAME.dap -coreid 0 -dbgbase 0x80010000 -ctibase 0x80018000
target create $_TARGETNAME_1 aarch64 -chain-position $_CHIPNAME.dap -coreid 1 -dbgbase 0x80012000 -ctibase 0x80019000
target create $_TARGETNAME_2 aarch64 -chain-position $_CHIPNAME.dap -coreid 2 -dbgbase 0x80014000 -ctibase 0x8001A000
target create $_TARGETNAME_3 aarch64 -chain-position $_CHIPNAME.dap -coreid 3 -dbgbase 0x80016000 -ctibase 0x8001B000
$_TARGETNAME configure -event reset-assert-post "aarch64 dbginit"
$_TARGETNAME configure -event gdb-attach { halt }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment