|
From: openocd-gerrit <ope...@us...> - 2025-07-25 16:42:19
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via d06ecba2e62f3e1de914dd9ef019b85ea422d483 (commit)
from a192949095b3fc10a3916ee1d52d92d3b019fbea (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d06ecba2e62f3e1de914dd9ef019b85ea422d483
Author: Liam Fletcher <lia...@mi...>
Date: Mon May 26 10:30:07 2025 +0100
target: add microchip polarfire soc config
Microchip's PolarFire SoC has a RISC-V core complex with four
application processors and one monitor processor. This basic
configuration can be used to attach to all proccessor's or a single
processor, specified by the run-time argument $COREID
It can be used with most FTDI based debug interfaces and has been tested
with interface/ftdi/olimex-arm-usb-tiny-h.cfg.
Change-Id: I75dd965f1ce550807706d00fe17de887d36f0b02
Signed-off-by: Liam Fletcher <lia...@mi...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8877
Reviewed-by: Tomas Vanek <va...@fb...>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/tcl/target/microchip/mpfs.cfg b/tcl/target/microchip/mpfs.cfg
new file mode 100644
index 000000000..3a63e3d3b
--- /dev/null
+++ b/tcl/target/microchip/mpfs.cfg
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Target: MPFS PolarFire SoC-series processors by Microchip Technologies
+#
+# https://www.microchip.com/en-us/products/fpgas-and-plds/system-on-chip-fpgas/polarfire-soc-fpgas
+#
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $CHIPNAME
+} else {
+ set _CHIPNAME mpfs
+}
+
+# Process COREID variable
+if { ![exists COREID] } {
+ set COREID -1
+}
+
+transport select jtag
+
+# PolarFire SoC (MPFS) hart id to name lookup table
+array set hart_names {
+ 0 e51
+ 1 u54_1
+ 2 u54_2
+ 3 u54_3
+ 4 u54_4
+}
+
+# MPFS devices table
+set mpfs_cpu_tap_info {
+ MPFS025 0x0f8531cf
+ MPFS095 0x0f8181cf
+ MPFS160 0x0f8191cf
+ MPFS250 0x0f81a1cf
+ MPFS460 0x0f81b1cf
+ RTPFS160 0x0f8991cf
+ RTPFS460 0x0f89b1cf
+}
+
+proc expected_ids {tap_list} {
+ set str ""
+ dict for {key value} $tap_list {
+ append str "-expected-id" " " $value " "
+ }
+
+ return $str
+}
+
+set irlen 8
+set expected_ids [expected_ids $mpfs_cpu_tap_info]
+eval jtag newtap $_CHIPNAME cpu -irlen $irlen $expected_ids -ignore-version
+
+if {$COREID == -1} {
+ # Single debug connection to all HART's
+ set _TARGETNAME_0 $_CHIPNAME.$hart_names(0)
+ set _TARGETNAME_1 $_CHIPNAME.$hart_names(1)
+ set _TARGETNAME_2 $_CHIPNAME.$hart_names(2)
+ set _TARGETNAME_3 $_CHIPNAME.$hart_names(3)
+ set _TARGETNAME_4 $_CHIPNAME.$hart_names(4)
+
+ target create $_TARGETNAME_0 riscv -chain-position $_CHIPNAME.cpu -coreid 0 -rtos hwthread
+ target create $_TARGETNAME_1 riscv -chain-position $_CHIPNAME.cpu -coreid 1 -rtos hwthread
+ target create $_TARGETNAME_2 riscv -chain-position $_CHIPNAME.cpu -coreid 2 -rtos hwthread
+ target create $_TARGETNAME_3 riscv -chain-position $_CHIPNAME.cpu -coreid 3 -rtos hwthread
+ target create $_TARGETNAME_4 riscv -chain-position $_CHIPNAME.cpu -coreid 4 -rtos hwthread
+ target smp $_TARGETNAME_0 $_TARGETNAME_1 $_TARGETNAME_2 $_TARGETNAME_3 $_TARGETNAME_4
+} else {
+ # Debug connection to a specific hart
+ set _TARGETNAME_0 $_CHIPNAME.$hart_names($COREID)
+ target create $_TARGETNAME_0 riscv -chain-position $_CHIPNAME.cpu -coreid $COREID
+}
+
+# Only TRSTn supported
+reset_config trst_only
-----------------------------------------------------------------------
Summary of changes:
tcl/target/microchip/mpfs.cfg | 75 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 tcl/target/microchip/mpfs.cfg
hooks/post-receive
--
Main OpenOCD repository
|