|
From: openocd-gerrit <ope...@us...> - 2023-09-23 14:35:48
|
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 2d4fd58fca2afe32138ea66afbc458471c67046a (commit)
from b2a22943e1d76b549c5ff5e84b95658abbd89a69 (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 2d4fd58fca2afe32138ea66afbc458471c67046a
Author: Daniel Anselmi <dan...@gm...>
Date: Sat Dec 17 13:11:30 2022 +0100
jtagspi/pld: add support from xilinx driver
Provide jtagspi with information to use jtagspi for
programming spi-flash devices on xilinx devices
using a proxy bitstream.
Change-Id: I68000d71de25118ed8a8603e544cff1dc69bd9ba
Signed-off-by: Daniel Anselmi <dan...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7836
Tested-by: jenkins
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c
index 9b4a0979f..fce764c1a 100644
--- a/src/pld/virtex2.c
+++ b/src/pld/virtex2.c
@@ -326,6 +326,21 @@ static int xilinx_get_ipdbg_hub(int user_num, struct pld_device *pld_device, str
return ERROR_OK;
}
+static int xilinx_get_jtagspi_userircode(struct pld_device *pld_device, unsigned int *ir)
+{
+ if (!pld_device || !pld_device->driver_priv)
+ return ERROR_FAIL;
+ struct virtex2_pld_device *pld_device_info = pld_device->driver_priv;
+
+ if (pld_device_info->command_set.num_user < 1) {
+ LOG_ERROR("code for command 'select user1' is unknown");
+ return ERROR_FAIL;
+ }
+
+ *ir = pld_device_info->command_set.user[0];
+ return ERROR_OK;
+}
+
COMMAND_HANDLER(virtex2_handle_set_instuction_codes_command)
{
if (CMD_ARGC < 6 || CMD_ARGC > (6 + VIRTEX2_MAX_USER_INSTRUCTIONS))
@@ -460,4 +475,5 @@ struct pld_driver virtex2_pld = {
.pld_create_command = &virtex2_pld_create_command,
.load = &virtex2_load,
.get_ipdbg_hub = xilinx_get_ipdbg_hub,
+ .get_jtagspi_userircode = xilinx_get_jtagspi_userircode,
};
diff --git a/tcl/board/digilent_cmod_s7.cfg b/tcl/board/digilent_cmod_s7.cfg
new file mode 100644
index 000000000..c52ee9505
--- /dev/null
+++ b/tcl/board/digilent_cmod_s7.cfg
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# digilent CMOD S7
+# https://digilent.com/reference/programmable-logic/cmod-s7/reference-manual
+
+
+adapter driver ftdi
+ftdi channel 0
+ftdi layout_init 0x0008 0x008b
+ftdi vid_pid 0x0403 0x6010
+reset_config none
+transport select jtag
+
+adapter speed 10000
+
+source [find cpld/xilinx-xc7.cfg]
+
+# "ipdbg -start -tap xc7.tap -hub 0x02 -tool 0 -port 5555"
+#openocd -f board/digilent_cmod_s7.cfg -c "init" -c "pld load xc7.pld shared_folder/cmod_s7_fast.bit"
+
+set JTAGSPI_CHAIN_ID xc7.pld
+source [find cpld/jtagspi.cfg]
+
+#jtagspi_init xc7.pld "shared_folder/bscan_spi_xc7s25.bit" 0xab
+#jtagspi_program shared_folder/cmod_s7_fast.bit 0
-----------------------------------------------------------------------
Summary of changes:
src/pld/virtex2.c | 16 ++++++++++++++++
tcl/board/digilent_cmod_s7.cfg | 25 +++++++++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 tcl/board/digilent_cmod_s7.cfg
hooks/post-receive
--
Main OpenOCD repository
|