stlink: Decode more errors. 73/3373/3
authorUwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Wed, 2 Mar 2016 11:54:07 +0000 (12:54 +0100)
committerFreddie Chopin <freddie.chopin@gmail.com>
Sun, 8 May 2016 08:09:11 +0000 (09:09 +0100)
For STLINK_SWD_AP_FAULT git://git.ac6.fr/openocd commit 657e3e885b9ee10
returns ERROR_OK with the comment:
Change in error status when reading outside RAM.
This fix allows CDT plugin to visualize memory.

Change-Id: Id8e220961b748ef9467fd84de62b1dc84ace63f8
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Reviewed-on: http://openocd.zylin.com/3373
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
src/jtag/drivers/stlink_usb.c

index a4847abd6378e8b404e1f8b93704f43464b7a555..649368d09faddb9870010fc4e32c5e99b852012f 100644 (file)
@@ -135,9 +135,19 @@ struct stlink_usb_handle_s {
 #define STLINK_DEBUG_ERR_OK            0x80
 #define STLINK_DEBUG_ERR_FAULT         0x81
 #define STLINK_SWD_AP_WAIT             0x10
+#define STLINK_SWD_AP_FAULT            0x11
+#define STLINK_SWD_AP_ERROR            0x12
+#define STLINK_SWD_AP_PARITY_ERROR     0x13
 #define STLINK_JTAG_WRITE_ERROR        0x0c
 #define STLINK_JTAG_WRITE_VERIF_ERROR  0x0d
 #define STLINK_SWD_DP_WAIT             0x14
+#define STLINK_SWD_DP_FAULT            0x15
+#define STLINK_SWD_DP_ERROR            0x16
+#define STLINK_SWD_DP_PARITY_ERROR     0x17
+
+#define STLINK_SWD_AP_WDATA_ERROR      0x18
+#define STLINK_SWD_AP_STICKY_ERROR     0x19
+#define STLINK_SWD_AP_STICKYORUN_ERROR 0x1a
 
 #define STLINK_CORE_RUNNING            0x80
 #define STLINK_CORE_HALTED             0x81
@@ -398,6 +408,38 @@ static int stlink_usb_error_check(void *handle)
                case STLINK_JTAG_WRITE_VERIF_ERROR:
                        LOG_DEBUG("Verify error");
                        return ERROR_FAIL;
+               case STLINK_SWD_AP_FAULT:
+                       /* git://git.ac6.fr/openocd commit 657e3e885b9ee10
+                        * returns ERROR_OK with the comment:
+                        * Change in error status when reading outside RAM.
+                        * This fix allows CDT plugin to visualize memory.
+                        */
+                       LOG_DEBUG("STLINK_SWD_AP_FAULT");
+                       return ERROR_FAIL;
+               case STLINK_SWD_AP_ERROR:
+                       LOG_DEBUG("STLINK_SWD_AP_ERROR");
+                       return ERROR_FAIL;
+               case STLINK_SWD_AP_PARITY_ERROR:
+                       LOG_DEBUG("STLINK_SWD_AP_PARITY_ERROR");
+                       return ERROR_FAIL;
+               case STLINK_SWD_DP_FAULT:
+                       LOG_DEBUG("STLINK_SWD_DP_FAULT");
+                       return ERROR_FAIL;
+               case STLINK_SWD_DP_ERROR:
+                       LOG_DEBUG("STLINK_SWD_DP_ERROR");
+                       return ERROR_FAIL;
+               case STLINK_SWD_DP_PARITY_ERROR:
+                       LOG_DEBUG("STLINK_SWD_DP_PARITY_ERROR");
+                       return ERROR_FAIL;
+               case STLINK_SWD_AP_WDATA_ERROR:
+                       LOG_DEBUG("STLINK_SWD_AP_WDATA_ERROR");
+                       return ERROR_FAIL;
+               case STLINK_SWD_AP_STICKY_ERROR:
+                       LOG_DEBUG("STLINK_SWD_AP_STICKY_ERROR");
+                       return ERROR_FAIL;
+               case STLINK_SWD_AP_STICKYORUN_ERROR:
+                       LOG_DEBUG("STLINK_SWD_AP_STICKYORUN_ERROR");
+                       return ERROR_FAIL;
                default:
                        LOG_DEBUG("unknown/unexpected STLINK status code 0x%x", h->databuf[0]);
                        return ERROR_FAIL;

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)