jtag: esp_usb_jtag: remove macro __packed
[openocd.git] / src / jtag / drivers / cmsis_dap.c
index 6a9c9df5e13ef0ab774cf34eaa90c75a3aad4cd7..44a7dd8cb6ba835cfac7a14ea6d31eb42757c86a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
+// SPDX-License-Identifier: GPL-2.0-or-later
 
 /***************************************************************************
  *   Copyright (C) 2021 by Adrian Negreanu                                 *
@@ -573,6 +573,8 @@ static int cmsis_dap_metacmd_targetsel(uint32_t instance_id)
        The purpose of this operation is to select the target
        corresponding to the instance_id that is written */
 
+       LOG_DEBUG_IO("DP write reg TARGETSEL %" PRIx32, instance_id);
+
        size_t idx = 0;
        command[idx++] = CMD_DAP_SWD_SEQUENCE;
        command[idx++] = 3;     /* sequence count */
@@ -658,7 +660,7 @@ static int cmsis_dap_cmd_dap_swo_baudrate(
        command[0] = CMD_DAP_SWO_BAUDRATE;
        h_u32_to_le(&command[1], in_baudrate);
 
-       int retval = cmsis_dap_xfer(cmsis_dap_handle, 4);
+       int retval = cmsis_dap_xfer(cmsis_dap_handle, 5);
        uint32_t rvbr = le_to_h_u32(&cmsis_dap_handle->response[1]);
        if (retval != ERROR_OK || rvbr == 0) {
                LOG_ERROR("CMSIS-DAP: command CMD_SWO_Baudrate(%u) -> %u failed.", in_baudrate, rvbr);
@@ -783,7 +785,7 @@ static void cmsis_dap_swd_write_from_queue(struct cmsis_dap *dap)
                uint8_t cmd = transfer->cmd;
                uint32_t data = transfer->data;
 
-               LOG_DEBUG_IO("%s %s reg %x %"PRIx32,
+               LOG_DEBUG_IO("%s %s reg %x %" PRIx32,
                                cmd & SWD_CMD_APNDP ? "AP" : "DP",
                                cmd & SWD_CMD_RNW ? "read" : "write",
                          (cmd & SWD_CMD_A32) >> 1, data);
@@ -889,7 +891,7 @@ static void cmsis_dap_swd_read_process(struct cmsis_dap *dap, int timeout_ms)
                        uint32_t tmp = data;
                        idx += 4;
 
-                       LOG_DEBUG_IO("Read result: %"PRIx32, data);
+                       LOG_DEBUG_IO("Read result: %" PRIx32, data);
 
                        /* Imitate posted AP reads */
                        if ((transfer->cmd & SWD_CMD_APNDP) ||

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)