Skip to content

Commit

Permalink
tcl/target: add Realtek RTL872xD config
Browse files Browse the repository at this point in the history
Sufficient to probe both cores via multiple APs.

Signed-off-by: Karl Palsson <karlp@tweak.au>
  • Loading branch information
karlp committed Aug 2, 2023
1 parent 0510335 commit 40ea7c7
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tcl/target/rtl872xd.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Realtek RTL872xD (ARM Cortex-M33 + M23, wifi+bt dualband soc)

source [find target/swj-dp.tcl]

if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME rtl872xd
}

#jtag scan chain
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
if { [using_jtag] } {
# FIXME - never tried jtag, copy pasta alert!
# Corresponds to Cortex®-M33 JTAG debug port ID code
set _CPUTAPID 0x0ba04477
} {
# SWD IDCODE (single drop, arm)
#set _CPUTAPID 0x0be12477
set _CPUTAPID 0x6ba02477
}
}


swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu

if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5
}

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME.km0 cortex_m -endian little -dap $_CHIPNAME.dap -ap-num 1
target create $_TARGETNAME.km4 cortex_m -endian little -dap $_CHIPNAME.dap -ap-num 2


if { ![using_hla] } {
cortex_m reset_config sysresetreq
}

adapter speed 1000

0 comments on commit 40ea7c7

Please sign in to comment.