Upstream a whole host of RISC-V changes.
[openocd.git] / src / target / arm_dap.c
index 747733dc948bb75cd34403aa0a9da326413d085f..94edfc09d14116859955ffc3a263b5aad612b71d 100644 (file)
@@ -57,6 +57,7 @@ static void dap_instance_init(struct adiv5_dap *dap)
                dap->ap[i].tar_autoincr_block = (1<<10);
                /* default CSW value */
                dap->ap[i].csw_default = CSW_AHB_DEFAULT;
+               dap->ap[i].cfg_reg = MEM_AP_REG_CFG_INVALID; /* mem_ap configuration reg (large physical addr, etc.) */
        }
        INIT_LIST_HEAD(&dap->cmd_journal);
        INIT_LIST_HEAD(&dap->cmd_pool);
@@ -184,7 +185,7 @@ static int dap_configure(struct jim_getopt_info *goi, struct arm_dap_object *dap
                        if (e != JIM_OK)
                                return e;
                        tap = jtag_tap_by_jim_obj(goi->interp, o_t);
-                       if (tap == NULL) {
+                       if (!tap) {
                                Jim_SetResultString(goi->interp, "-chain-position is invalid", -1);
                                return JIM_ERR;
                        }
@@ -199,7 +200,7 @@ static int dap_configure(struct jim_getopt_info *goi, struct arm_dap_object *dap
                }
        }
 
-       if (tap == NULL) {
+       if (!tap) {
                Jim_SetResultString(goi->interp, "-chain-position required when creating DAP", -1);
                return JIM_ERR;
        }
@@ -220,7 +221,7 @@ static int dap_create(struct jim_getopt_info *goi)
        int e;
 
        cmd_ctx = current_command_context(goi->interp);
-       assert(cmd_ctx != NULL);
+       assert(cmd_ctx);
 
        if (goi->argc < 3) {
                Jim_WrongNumArgs(goi->interp, 1, goi->argv, "?name? ..options...");
@@ -229,7 +230,7 @@ static int dap_create(struct jim_getopt_info *goi)
        /* COMMAND */
        jim_getopt_obj(goi, &new_cmd);
        /* does this command exist? */
-       cmd = Jim_GetCommand(goi->interp, new_cmd, JIM_ERRMSG);
+       cmd = Jim_GetCommand(goi->interp, new_cmd, JIM_NONE);
        if (cmd) {
                cp = Jim_GetString(new_cmd, NULL);
                Jim_SetResultFormatted(goi->interp, "Command: %s Exists", cp);
@@ -238,7 +239,7 @@ static int dap_create(struct jim_getopt_info *goi)
 
        /* Create it */
        dap = calloc(1, sizeof(struct arm_dap_object));
-       if (dap == NULL)
+       if (!dap)
                return JIM_ERR;
 
        e = dap_configure(goi, dap);
@@ -266,7 +267,7 @@ static int dap_create(struct jim_getopt_info *goi)
                dap_commands[0].chain = NULL;
 
        e = register_commands_with_data(cmd_ctx, NULL, dap_commands, dap);
-       if (ERROR_OK != e)
+       if (e != ERROR_OK)
                return JIM_ERR;
 
        list_add_tail(&dap->lh, &all_dap);
@@ -314,7 +315,7 @@ COMMAND_HANDLER(handle_dap_info_command)
        struct adiv5_dap *dap = arm->dap;
        uint32_t apsel;
 
-       if (dap == NULL) {
+       if (!dap) {
                LOG_ERROR("DAP instance not available. Probably a HLA target...");
                return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
        }

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)