49 lines
1.2 KiB
INI
49 lines
1.2 KiB
INI
# BK72XX OpenOCD config
|
|
# credit: @xabean at https://www.elektroda.com/rtvforum/viewtopic.php?p=20028605#20028605
|
|
|
|
# we only have CEN (aka chip enable, system reset)
|
|
reset_config srst_only
|
|
|
|
# CEN is normally pulled high, but sometimes it can help to force it high, not just low
|
|
reset_config srst_push_pull
|
|
|
|
# on connect, deassert (reset to HIGH) the SRST pin
|
|
reset_config connect_deassert_srst
|
|
|
|
# we have no TRST pin, tell OpenOCD to imagine it's tied to SRST
|
|
reset_config srst_pulls_trst
|
|
|
|
# use JTAG
|
|
transport select jtag
|
|
|
|
# 1000 kHz should work
|
|
adapter speed 1000
|
|
|
|
# wait 200ms after releasing srst before we send JTAG commands over TMS,
|
|
# we will never reset into halt because we have no tRST pin :(
|
|
adapter srst delay 200
|
|
|
|
if { [info exists CHIPNAME] } {
|
|
set _CHIPNAME $CHIPNAME
|
|
} else {
|
|
set _CHIPNAME bk7231t
|
|
}
|
|
|
|
if { [info exists ENDIAN] } {
|
|
set _ENDIAN $ENDIAN
|
|
} else {
|
|
# this defaults to a little endian
|
|
set _ENDIAN little
|
|
}
|
|
|
|
if { [info exists CPUTAPID] } {
|
|
set _CPUTAPID $CPUTAPID
|
|
} else {
|
|
set _CPUTAPID 0x15968001
|
|
}
|
|
|
|
jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
|
|
|
|
set _TARGETNAME $_CHIPNAME.cpu
|
|
target create $_TARGETNAME arm966e -endian $_ENDIAN -chain-position $_TARGETNAME
|