Skip to content

Commit a9fa339

Browse files
marexborneoa
authored andcommitted
tcl/target: Add Renesas R-Car Gen4 R8A779G0 V4H and R8A779H0 V4M targets
Add support for Renesas R-Car Gen4 R8A779G0 V4H and R8A779H0 V4M SoCs. Those contain 4x CA76 and 3x CR52 cores. Change-Id: I4a701f0fec4dd574fc099a221d464ccc55db6252 Signed-off-by: Marek Vasut <[email protected]> Reviewed-on: https://review.openocd.org/c/openocd/+/8807 Tested-by: jenkins Reviewed-by: Antonio Borneo <[email protected]>
1 parent a86fdfc commit a9fa339

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

tcl/target/renesas_rcar_gen3.cfg

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ switch $_soc {
9090
set _num_cr52 1
9191
set _boot_core CA76
9292
}
93+
V4H {
94+
set _CHIPNAME r8a779g0
95+
set _num_ca76 4
96+
set _num_cr52 3
97+
set _boot_core CR52
98+
}
99+
V4M {
100+
set _CHIPNAME r8a779h0
101+
set _num_ca76 4
102+
set _num_cr52 3
103+
set _boot_core CR52
104+
}
93105
default {
94106
error "'$_soc' is invalid!"
95107
}
@@ -126,8 +138,8 @@ set CA57_DBGBASE {0x80410000 0x80510000 0x80610000 0x80710000}
126138
set CA57_CTIBASE {0x80420000 0x80520000 0x80620000 0x80720000}
127139
set CA53_DBGBASE {0x80C10000 0x80D10000 0x80E10000 0x80F10000}
128140
set CA53_CTIBASE {0x80C20000 0x80D20000 0x80E20000 0x80F20000}
129-
set CR52_DBGBASE 0x80c10000
130-
set CR52_CTIBASE 0x80c20000
141+
set CR52_DBGBASE {0x80C10000 0x80D10000 0x80E10000}
142+
set CR52_CTIBASE {0x80C20000 0x80D20000 0x80E20000}
131143
set CR7_DBGBASE 0x80910000
132144
set CR7_CTIBASE 0x80918000
133145

@@ -159,24 +171,27 @@ proc setup_a5x {core_name dbgbase ctibase num boot} {
159171
proc setup_crx {core_name dbgbase ctibase num boot} {
160172
global _CHIPNAME
161173
global _DAPNAME
174+
global smp_targets
162175
global _targets
163176
for { set _core 0 } { $_core < $num } { incr _core } {
164-
set _TARGETNAME $_CHIPNAME.$core_name
177+
set _TARGETNAME $_CHIPNAME.$core_name.$_core
165178
set _CTINAME $_TARGETNAME.cti
166-
cti create $_CTINAME -dap $_DAPNAME -ap-num 1 -baseaddr $ctibase
179+
cti create $_CTINAME -dap $_DAPNAME -ap-num 1 -baseaddr [lindex $ctibase $_core]
167180
if { $core_name == "r52" } {
168181
set _command "target create $_TARGETNAME armv8r -dap $_DAPNAME \
169-
-ap-num 1 -dbgbase $dbgbase -cti $_CTINAME"
182+
-ap-num 1 -dbgbase [lindex $dbgbase $_core] -cti $_CTINAME"
170183
} else {
171184
set _command "target create $_TARGETNAME cortex_r4 -dap $_DAPNAME \
172-
-ap-num 1 -dbgbase $dbgbase"
185+
-ap-num 1 -dbgbase [lindex $dbgbase $_core]"
173186
}
174-
if { $boot == 1 } {
187+
if { $_core == 0 && $boot == 1 } {
175188
set _targets "$_TARGETNAME"
176189
} else {
177190
set _command "$_command -defer-examine"
178191
}
192+
set smp_targets "$smp_targets $_TARGETNAME"
179193
eval $_command
194+
$_TARGETNAME configure -event examine-end { halt }
180195
}
181196
}
182197

0 commit comments

Comments
 (0)