stlink: handle error bad-AP 81/4981/3
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 3 Feb 2019 20:07:31 +0000 (21:07 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Thu, 7 Mar 2019 21:00:41 +0000 (21:00 +0000)
The new firmwares for ST-Link support handling multiple AP, but
are (actually) limited to the AP number in range [0..8].
Any tentative to operate on AP number higher than 8 returns an
error "bad AP".
Add the error code and the related message.

Change-Id: I78a98b2612d10e580d03fc43ed9f2b09619d39d8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4981
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
src/jtag/drivers/stlink_usb.c

index a9ee44d9201d322090055404dfcf2f325f57a8bd..134cb2f42180ff01878b3eac7ea698a73698d9da 100644 (file)
@@ -167,6 +167,8 @@ struct stlink_usb_handle_s {
 #define STLINK_SWD_AP_STICKY_ERROR     0x19
 #define STLINK_SWD_AP_STICKYORUN_ERROR 0x1a
 
+#define STLINK_BAD_AP_ERROR            0x1d
+
 #define STLINK_CORE_RUNNING            0x80
 #define STLINK_CORE_HALTED             0x81
 #define STLINK_CORE_STAT_UNKNOWN       -1
@@ -751,6 +753,9 @@ static int stlink_usb_error_check(void *handle)
                case STLINK_SWD_AP_STICKYORUN_ERROR:
                        LOG_DEBUG("STLINK_SWD_AP_STICKYORUN_ERROR");
                        return ERROR_FAIL;
+               case STLINK_BAD_AP_ERROR:
+                       LOG_DEBUG("STLINK_BAD_AP_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)