From 73b4612ec71b455ac71f1686f07160e155a840ad Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sat, 20 Nov 2021 22:29:33 +0100 Subject: [PATCH] adiv5_swdp: Initialize a volatile variable GCC did not warn about possibly missing initialization and so for gdb target was not recognized. --- src/target/adiv5_swdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/adiv5_swdp.c b/src/target/adiv5_swdp.c index 04723ae..d29d02a 100644 --- a/src/target/adiv5_swdp.c +++ b/src/target/adiv5_swdp.c @@ -91,7 +91,7 @@ int adiv5_swdp_scan(uint32_t targetid) * 20 bits start of reset another reset sequence*/ initial_dp->seq_out(0x1a0, 12); uint32_t idcode = 0; - volatile uint32_t target_id; + volatile uint32_t target_id = 0; bool scan_multidrop = true; if (!targetid || !initial_dp->dp_low_write) { /* No targetID given on the command line or probe can not