diff options
author | Marc Schink <dev@zapb.de> | 2024-12-04 08:26:04 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2025-03-15 10:17:15 +0000 |
commit | d892a4d763c283ca775213d4148b76d5b0fde520 (patch) | |
tree | 71a11b043e9e2779e47f4f89361a547456f7f0c6 /src | |
parent | 80b1c9aff8ad450839859e4a29559f6bdc481891 (diff) | |
download | riscv-openocd-d892a4d763c283ca775213d4148b76d5b0fde520.zip riscv-openocd-d892a4d763c283ca775213d4148b76d5b0fde520.tar.gz riscv-openocd-d892a4d763c283ca775213d4148b76d5b0fde520.tar.bz2 |
target/arm_adiv5: print DAP name if not found
If a DAP is not found, include its name in the error message.
Change-Id: Icffc52894a1c5573f938b1f3e3b53441167f085e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8636
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/target/arm_adi_v5.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 0c7633b..df897b8 100644 --- a/src/target/arm_adi_v5.c +++ b/src/target/arm_adi_v5.c @@ -2367,7 +2367,9 @@ static int adiv5_jim_spot_configure(struct jim_getopt_info *goi, return e; dap = dap_instance_by_jim_obj(goi->interp, o_t); if (!dap) { - Jim_SetResultString(goi->interp, "DAP name invalid!", -1); + const char *dap_name = Jim_GetString(o_t, NULL); + Jim_SetResultFormatted(goi->interp, "DAP '%s' not found", + dap_name); return JIM_ERR; } if (*dap_p && *dap_p != dap) { |