X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftarget%2Fcortex_m.c;h=fba832c78737200c5e0e0179ee84564d7fe2c6a5;hb=31c67cc83083ccc2db49d136a9b0d7227e336dba;hp=e8839250456e7979890f5aa0f048d26057ac4c2f;hpb=a4ac56152d9fc13c3fa479397407d9b86ffb13d8;p=fw%2Fopenocd diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index e88392504..fba832c78 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -2366,11 +2366,11 @@ static int cortex_m_target_create(struct target *target, Jim_Interp *interp) /*--------------------------------------------------------------------------*/ -static int cortex_m_verify_pointer(struct command_context *cmd_ctx, +static int cortex_m_verify_pointer(struct command_invocation *cmd, struct cortex_m_common *cm) { if (cm->common_magic != CORTEX_M_COMMON_MAGIC) { - command_print(cmd_ctx, "target is not a Cortex-M"); + command_print(cmd, "target is not a Cortex-M"); return ERROR_TARGET_INVALID; } return ERROR_OK; @@ -2404,7 +2404,7 @@ COMMAND_HANDLER(handle_cortex_m_vector_catch_command) { "reset", VC_CORERESET, }, }; - retval = cortex_m_verify_pointer(CMD_CTX, cortex_m); + retval = cortex_m_verify_pointer(CMD, cortex_m); if (retval != ERROR_OK) return retval; @@ -2459,7 +2459,7 @@ write: } for (unsigned i = 0; i < ARRAY_SIZE(vec_ids); i++) { - command_print(CMD_CTX, "%9s: %s", vec_ids[i].name, + command_print(CMD, "%9s: %s", vec_ids[i].name, (demcr & vec_ids[i].mask) ? "catch" : "ignore"); } @@ -2482,12 +2482,12 @@ COMMAND_HANDLER(handle_cortex_m_mask_interrupts_command) const Jim_Nvp *n; - retval = cortex_m_verify_pointer(CMD_CTX, cortex_m); + retval = cortex_m_verify_pointer(CMD, cortex_m); if (retval != ERROR_OK) return retval; if (target->state != TARGET_HALTED) { - command_print(CMD_CTX, "target must be stopped for \"%s\" command", CMD_NAME); + command_print(CMD, "target must be stopped for \"%s\" command", CMD_NAME); return ERROR_OK; } @@ -2500,7 +2500,7 @@ COMMAND_HANDLER(handle_cortex_m_mask_interrupts_command) } n = Jim_Nvp_value2name_simple(nvp_maskisr_modes, cortex_m->isrmasking_mode); - command_print(CMD_CTX, "cortex_m interrupt mask %s", n->name); + command_print(CMD, "cortex_m interrupt mask %s", n->name); return ERROR_OK; } @@ -2512,7 +2512,7 @@ COMMAND_HANDLER(handle_cortex_m_reset_config_command) int retval; char *reset_config; - retval = cortex_m_verify_pointer(CMD_CTX, cortex_m); + retval = cortex_m_verify_pointer(CMD, cortex_m); if (retval != ERROR_OK) return retval; @@ -2545,7 +2545,7 @@ COMMAND_HANDLER(handle_cortex_m_reset_config_command) break; } - command_print(CMD_CTX, "cortex_m reset_config %s", reset_config); + command_print(CMD, "cortex_m reset_config %s", reset_config); return ERROR_OK; }