From 27c143a3a3b20dc5987100930cf26f0e2d589061 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Fri, 21 Jan 2022 21:08:21 -0500 Subject: [PATCH] jtag_scan: Properly fixed the wrong IDCode getting to the handlers --- src/target/adiv5_jtagdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/target/adiv5_jtagdp.c b/src/target/adiv5_jtagdp.c index 2c87dc7..e4f3030 100644 --- a/src/target/adiv5_jtagdp.c +++ b/src/target/adiv5_jtagdp.c @@ -46,9 +46,10 @@ void adiv5_jtag_dp_handler(uint8_t jd_index, uint32_t j_idcode) DEBUG_WARN("calloc: failed in %s\n", __func__); return; } + (void)j_idcode; dp->dp_jd_index = jd_index; - dp->idcode = j_idcode; + dp->idcode = jtag_devs[jd_index].jd_idcode; if ((PC_HOSTED == 0 ) || (!platform_jtag_dp_init(dp))) { dp->dp_read = fw_adiv5_jtagdp_read; dp->error = adiv5_jtagdp_error;