|
From: openocd-gerrit <ope...@us...> - 2025-07-25 16:42:51
|
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 1f56ea647d63b7495d513227622413f1826d75f9 (commit)
via 6e87864dfc35a1513ffa02972812954e97efdf86 (commit)
from d06ecba2e62f3e1de914dd9ef019b85ea422d483 (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 1f56ea647d63b7495d513227622413f1826d75f9
Author: Liam Fletcher <lia...@mi...>
Date: Mon May 26 10:42:56 2025 +0100
tcl: add microchip's pic64gx curiosity config
Microchip's PIC64GX Curiosity Board has a RISC-V core complex with 4
application processors and one monitor processor. The Curiosity kit also
has an on-board debug interface based around an FTDI 4232H device.
This patch adds basic target, interface and board support for PIC64GX
Curiosity Kit.
Change-Id: I2234d8725744fbae00b3909773b370e5c18debd8
Signed-off-by: Liam Fletcher <lia...@mi...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8878
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
diff --git a/tcl/board/microchip/pic64gx-curiosity-kit.cfg b/tcl/board/microchip/pic64gx-curiosity-kit.cfg
new file mode 100644
index 000000000..e7e67ea4b
--- /dev/null
+++ b/tcl/board/microchip/pic64gx-curiosity-kit.cfg
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Microchip RISC-V board
+#
+# https://www.microchip.com/en-us/products/microprocessors/64-bit-mpus/pic64gx
+#
+adapter speed 6000
+
+source [find interface/microchip/embedded_flashpro5.cfg]
+source [find target/microchip/pic64gx.cfg]
diff --git a/tcl/target/microchip/pic64gx.cfg b/tcl/target/microchip/pic64gx.cfg
new file mode 100644
index 000000000..25cef6b23
--- /dev/null
+++ b/tcl/target/microchip/pic64gx.cfg
@@ -0,0 +1,69 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Target: Pic64gx processor by Microchip Technologies
+#
+# https://www.microchip.com/en-us/products/microprocessors/64-bit-mpus/pic64gx
+#
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $CHIPNAME
+} else {
+ set _CHIPNAME pic64gx
+}
+
+# Process COREID variable
+if {![exists COREID]} {
+ set COREID -1
+}
+
+transport select jtag
+
+# PIC64GX hart id to name lookup table
+array set hart_names {
+ 0 e51
+ 1 u54_1
+ 2 u54_2
+ 3 u54_3
+ 4 u54_4
+}
+
+# PIC64GX table
+set pic64gx_tap_info {
+ PIC64GX1000 0x0f8531cf
+}
+
+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 $pic64gx_tap_info]
+eval jtag newtap $_CHIPNAME cpu -irlen $irlen $expected_ids -ignore-version
+
+if {$COREID == -1} {
+ # Single debug connection to all harts
+ 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
commit 6e87864dfc35a1513ffa02972812954e97efdf86
Author: Liam Fletcher <lia...@mi...>
Date: Mon May 26 10:54:40 2025 +0100
tcl: add embedded flashpro5 config
To support Microchips Embedded Flashpro5
Change-Id: I7861e0772fd4cbf0539725d238c59ae15bbcca41
Signed-off-by: Liam Fletcher <lia...@mi...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8879
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
Reviewed-by: Tomas Vanek <va...@fb...>
diff --git a/contrib/60-openocd.rules b/contrib/60-openocd.rules
index 29f8d7a6d..6632841a4 100644
--- a/contrib/60-openocd.rules
+++ b/contrib/60-openocd.rules
@@ -190,6 +190,10 @@ ATTRS{idVendor}=="138e", ATTRS{idProduct}=="9000", MODE="660", GROUP="plugdev",
# Debug Board for Neo1973
ATTRS{idVendor}=="1457", ATTRS{idProduct}=="5118", MODE="660", GROUP="plugdev", TAG+="uaccess"
+# Microchip RISC-V Debug
+ATTRS{idVendor}=="1514", ATTRS{idProduct}=="2008", MODE="660", GROUP="plugdev", TAG+="uaccess"
+ATTRS{idVendor}=="1514", ATTRS{idProduct}=="200a", MODE="660", GROUP="plugdev", TAG+="uaccess"
+
# OSBDM
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0042", MODE="660", GROUP="plugdev", TAG+="uaccess"
ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0058", MODE="660", GROUP="plugdev", TAG+="uaccess"
diff --git a/tcl/interface/microchip/embedded_flashpro5.cfg b/tcl/interface/microchip/embedded_flashpro5.cfg
new file mode 100644
index 000000000..117a54458
--- /dev/null
+++ b/tcl/interface/microchip/embedded_flashpro5.cfg
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+#
+# Embedded FlashPro5
+#
+# https://www.microchip.com/en-us/development-tool/flashpro5
+#
+
+adapter driver ftdi
+
+# vidpid 1514:2008 = embedded flashpro5
+# vidpid 1514:200a = pic64gx
+ftdi vid_pid 0x1514 0x2008 0x1514 0x200a
+
+# That FTDI has 4 channels (channel 0 and 1 are MPSSE-capable, 2 and 3 are bitbang
+ftdi channel 0
+
+# Initial Layout - data[0..15] direction[0..15]
+ftdi layout_init 0x0018 0xfdfb
+# Signal Data Direction Notes
+# AD0 TCK 0 1 (out) Port A TCK
+# AD1 TDI 0 1 (out) Port A TDI
+# AD2 TDO 0 0 (in) PORT A TDO
+# AD3 TMS 1 1 (out) Port A TMS
+# AD4 GPIOL0 1 1 (out) Port A TRST
+# AD5 GPIOL1 0 1 (out) (unused)
+# AD6 GPIOL2 0 1 (out) (unused)
+# AD7 GPIOL3 0 1 (out) (unused)
+
+# BD0 TCK 0 1 (out) FTDI_UART_B_TXD
+# BD1 TDI 0 0 (in) FTDI_UART_B_RXD
+# BD2 TDO 0 1 (out) (unused)
+# BD3 TMS 0 1 (out) (unused)
+# BD4 GPIOL0 0 1 (out) (unused)
+# BD5 GPIOL1 0 1 (out) (unused)
+# BD6 GPIOL2 0 1 (out) (unused)
+# BD7 GPIOL2 0 1 (out) (unused)
+
+# Signals definition
+ftdi layout_signal nTRST -data 0x0010 -oe 0x0010
-----------------------------------------------------------------------
Summary of changes:
contrib/60-openocd.rules | 4 +++
tcl/board/microchip/pic64gx-curiosity-kit.cfg | 10 +++++++
tcl/interface/microchip/embedded_flashpro5.cfg | 40 ++++++++++++++++++++++++++
tcl/target/microchip/{mpfs.cfg => pic64gx.cfg} | 26 +++++++----------
4 files changed, 64 insertions(+), 16 deletions(-)
create mode 100644 tcl/board/microchip/pic64gx-curiosity-kit.cfg
create mode 100644 tcl/interface/microchip/embedded_flashpro5.cfg
copy tcl/target/microchip/{mpfs.cfg => pic64gx.cfg} (73%)
hooks/post-receive
--
Main OpenOCD repository
|