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);
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;
}
}
}
- if (tap == NULL) {
+ if (!tap) {
Jim_SetResultString(goi->interp, "-chain-position required when creating DAP", -1);
return JIM_ERR;
}
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...");
/* 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);
/* Create it */
dap = calloc(1, sizeof(struct arm_dap_object));
- if (dap == NULL)
+ if (!dap)
return JIM_ERR;
e = dap_configure(goi, dap);
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);
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;
}