From e7e34600a4fe4717d8f6b90d95c1501320e559f7 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sun, 17 Nov 2019 12:56:09 +0100 Subject: [PATCH] lpc11: Only print Idcode if not zero and not yet handled. Otherwise for all Cortex-M not yet handled this LPC messages appears. --- src/target/lpc11xx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/target/lpc11xx.c b/src/target/lpc11xx.c index 483f706..3a07e61 100644 --- a/src/target/lpc11xx.c +++ b/src/target/lpc11xx.c @@ -104,9 +104,10 @@ lpc11xx_probe(target *t) lpc11xx_add_flash(t, 0x00000000, 0x8000, 0x1000); return true; } - + if (idcode) { + DEBUG("LPC11xx: Unknown IDCODE 0x%08" PRIx32 "\n", idcode); + } idcode = target_mem_read32(t, LPC8XX_DEVICE_ID); - DEBUG("LPC11/84: IDCODE 0x%08" PRIx32 "\n", idcode); switch (idcode) { case 0x00008100: /* LPC810M021FN8 */ case 0x00008110: /* LPC811M001JDH16 */ @@ -160,6 +161,9 @@ lpc11xx_probe(target *t) lpc11xx_add_flash(t, 0x00000000, 0x20000, 0x1000); return true; } + if (idcode) { + DEBUG("LPC8xx: Unknown IDCODE 0x%08" PRIx32 "\n", idcode); + } return false; }