Created
September 27, 2018 19:32
-
-
Save tnishinaga/d2688aebff574be04238ba0e56e7db53 to your computer and use it in GitHub Desktop.
sc2a11 OpenOCD config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set _CHIPNAME sc2a11 | |
set _DAP_TAPID 0x6ba00477 | |
adapter_khz 1000 | |
transport select jtag | |
jtag_ntrst_delay 100 | |
reset_config trst_and_srst | |
telnet_port 4444 | |
jtag newtap auto0 tap -irlen 4 -expected-id $_DAP_TAPID | |
jtag newtap auto1 tap -irlen 4 -expected-id $_DAP_TAPID | |
# init | |
# scan_chain | |
dap create auto0.dap -chain-position auto0.tap | |
dap create auto1.dap -chain-position auto1.tap | |
# dap init | |
# auto0.dap info | |
# auto1.dap info | |
set CTIBASE {0x82020000 0x82120000 0x82420000 0x82520000 0x82820000 0x82920000 0x82c20000 0x82d20000 0x83020000 0x83120000 0x83420000 0x83520000 0x83820000 0x83920000 0x83c20000 0x83d20000 0x84020000 0x84120000 0x84420000 0x84520000 0x84820000 0x84920000 0x84c20000 0x84d20000} | |
set DBGBASE {0x82010000 0x82110000 0x82410000 0x82510000 0x82810000 0x82910000 0x82c10000 0x82d10000 0x83010000 0x83110000 0x83410000 0x83510000 0x83810000 0x83910000 0x83c10000 0x83d10000 0x84010000 0x84110000 0x84410000 0x84510000 0x84810000 0x84910000 0x84c10000 0x84d10000} | |
set _cores 24 | |
set _TARGETNAME $_CHIPNAME.a53 | |
set _CTINAME $_CHIPNAME.cti | |
set _smp_command "" | |
for {set _core 0} {$_core < $_cores} { incr _core} { | |
cti create $_CTINAME.$_core -dap auto1.dap -ap-num 0 -ctibase [lindex $CTIBASE $_core] | |
set _command "target create ${_TARGETNAME}.$_core aarch64 \ | |
-dap auto1.dap -dbgbase [lindex $DBGBASE $_core] \ | |
-coreid $_core -cti $_CTINAME.$_core" | |
if {$_core != 0} { | |
set _command "$_command -defer-examine" | |
set _smp_command "$_smp_command $_TARGETNAME.$_core" | |
} else { | |
set _smp_command "target smp $_TARGETNAME.$_core" | |
} | |
eval $_command | |
} | |
eval $_smp_command | |
targets $_TARGETNAME.0 | |
# create m3_tap | |
# target create $_CHIPNAME.m3 cortex_m -endian $_ENDIAN -dap auto0.dap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment