This is an automated email from Gerrit.

Tarek BOCHKATI ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/6068

-- gerrit

commit 91e2185f98572cf0d5e2e3f813d94a63606b99ec
Author: Tarek BOCHKATI <[email protected]>
Date:   Sat Feb 20 23:21:53 2021 +0100

    tcl/target: add BCM2836 configuration file
    
    The Broadcom chip used in the Raspberry Pi 2 Model B
    
    Partial information are available in raspberry pi website:
    https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836
    
    Change-Id: I50b040db213c5b72f63d5f5534c552426c7376f9
    Signed-off-by: Tarek BOCHKATI <[email protected]>

diff --git a/tcl/target/bcm2836.cfg b/tcl/target/bcm2836.cfg
new file mode 100644
index 0000000..858ae2a
--- /dev/null
+++ b/tcl/target/bcm2836.cfg
@@ -0,0 +1,57 @@
+# The Broadcom chip used in the Raspberry Pi 2 Model B
+
+# Partial information are available in raspberry pi website:
+# https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836
+
+if { [info exists CHIPNAME] } {
+       set  _CHIPNAME $CHIPNAME
+} else {
+       set  _CHIPNAME bcm2836
+}
+
+if { [info exists CHIPCORES] } {
+       set _cores $CHIPCORES
+} else {
+       set _cores 4
+}
+
+if { [info exists USE_SMP] } {
+       set _USE_SMP $USE_SMP
+} else {
+       set _USE_SMP 0
+}
+
+if { [info exists DAP_TAPID] } {
+       set _DAP_TAPID $DAP_TAPID
+} else {
+       set _DAP_TAPID 0x4ba00477
+}
+
+jtag newtap $_CHIPNAME cpu -expected-id $_DAP_TAPID -irlen 4
+adapter speed 4000
+
+dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
+
+# MEM-AP for direct access
+target create $_CHIPNAME.ap mem_ap -dap $_CHIPNAME.dap -ap-num 0
+
+# these addresse are obtained from the ROM table via 'dap info 0' command
+set _DBGBASE {0x80010000 0x80012000 0x80014000 0x80016000}
+
+set _smp_command "target smp"
+
+for { set _core 0 } { $_core < $_cores } { incr _core } {
+       set _TARGETNAME $_CHIPNAME.cpu$_core
+
+       target create $_TARGETNAME cortex_a -dap $_CHIPNAME.dap -coreid $_core 
-dbgbase [lindex $_DBGBASE $_core]
+       $_TARGETNAME configure -event reset-assert-post { cortex_a dbginit }
+
+       set _smp_command "$_smp_command $_CHIPNAME.cpu$_core"
+}
+
+if {$_USE_SMP} {
+       eval $_smp_command
+}
+
+# default target is cpu0
+targets $_CHIPNAME.cpu0

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to