Discussion:
[OpenOCD-devel] [PATCH]: 3664b17 jlink: Add support for sending arbitrary TMS sequences
gerrit
2017-04-27 05:58:26 UTC
Permalink
This is an automated email from Gerrit.

Forest Crossman (***@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4110

-- gerrit

commit 3664b17a8b049c25cf210efbf32f8338ad924438
Author: Forest Crossman <***@gmail.com>
Date: Thu Apr 27 00:50:39 2017 -0500

jlink: Add support for sending arbitrary TMS sequences

Change-Id: Ibd083359124465737838df929b5ab9da53a94a5c
Signed-off-by: Forest Crossman <***@gmail.com>

diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c
index bd3c5e0..d7520ea 100644
--- a/src/jtag/drivers/jlink.c
+++ b/src/jtag/drivers/jlink.c
@@ -262,6 +262,16 @@ static void jlink_execute_sleep(struct jtag_command *cmd)
jtag_sleep(cmd->cmd.sleep->us);
}

+static void jlink_execute_tms(struct jtag_command *cmd)
+{
+ DEBUG_JTAG_IO("TMS: %d bits", cmd->cmd.tms->num_bits);
+
+ /* TODO: Missing tap state tracking */
+ jlink_flush();
+ jlink_clock_data(NULL, 0, cmd->cmd.tms->bits, 0, NULL, 0, cmd->cmd.tms->num_bits);
+ jlink_flush();
+}
+
static int jlink_execute_command(struct jtag_command *cmd)
{
switch (cmd->type) {
@@ -286,6 +296,9 @@ static int jlink_execute_command(struct jtag_command *cmd)
case JTAG_SLEEP:
jlink_execute_sleep(cmd);
break;
+ case JTAG_TMS:
+ jlink_execute_tms(cmd);
+ break;
default:
LOG_ERROR("BUG: Unknown JTAG command type encountered.");
return ERROR_JTAG_QUEUE_FAILED;
@@ -2168,6 +2181,7 @@ static const char * const jlink_transports[] = { "jtag", "swd", NULL };

struct jtag_interface jlink_interface = {
.name = "jlink",
+ .supported = DEBUG_CAP_TMS_SEQ,
.commands = jlink_command_handlers,
.transports = jlink_transports,
.swd = &jlink_swd,

--

Loading...