target/arm_cti: add debug message when an incorrect CTI register name is used

the patch also contains some typo fixes

Change-Id: Ia4267036068455144cdcbfdffed15518d48f445e
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: http://openocd.zylin.com/4816
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Tarek BOCHKATI 2018-12-20 19:33:26 +01:00 committed by Matthias Welwarsky
parent 44009186cf
commit d1c7b0ab8a
1 changed files with 4 additions and 2 deletions

View File

@ -216,6 +216,8 @@ static int cti_find_reg_offset(const char *name)
if (!strcmp(name, cti_names[i].label))
return cti_names[i].offset;
}
LOG_ERROR("unknown CTI register %s", name);
return -1;
}
@ -297,7 +299,7 @@ COMMAND_HANDLER(handle_cti_write)
uint32_t value;
if (CMD_ARGC != 2) {
Jim_SetResultString(interp, "Wrong numer of args", -1);
Jim_SetResultString(interp, "Wrong number of args", -1);
return ERROR_FAIL;
}
@ -320,7 +322,7 @@ COMMAND_HANDLER(handle_cti_read)
uint32_t value;
if (CMD_ARGC != 1) {
Jim_SetResultString(interp, "Wrong numer of args", -1);
Jim_SetResultString(interp, "Wrong number of args", -1);
return ERROR_FAIL;
}