From 1acbb2fb6473a1ece4a48c3c4e579945802a005d Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Fri, 30 Nov 2012 22:18:34 +0000 Subject: [PATCH] Add a failure code for debugWIRE communication failures I happened to run into. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1118 81a1dc3b-b13d-400b-aceb-764788c761c2 --- jtag3.c | 4 ++++ jtag3_private.h | 1 + 2 files changed, 5 insertions(+) diff --git a/jtag3.c b/jtag3.c index 8523d0c9..163053d9 100644 --- a/jtag3.c +++ b/jtag3.c @@ -271,6 +271,10 @@ static void jtag3_prmsg(PROGRAMMER * pgm, unsigned char * data, size_t len) case RSP3_FAIL_WRONG_LENGTH: strcpy(reason, "wrong length in memory access"); break; + + case RSP3_FAIL_DEBUGWIRE: + strcpy(reason, "debugWIRE communication failed"); + break; } fprintf(stderr, ", reason: %s\n", reason); } diff --git a/jtag3_private.h b/jtag3_private.h index 6fa4a357..bd094688 100644 --- a/jtag3_private.h +++ b/jtag3_private.h @@ -134,6 +134,7 @@ #define RSP3_STATUS_MASK 0xE0 /* possible failure codes that could be appended to RSP3_FAILED: */ +# define RSP3_FAIL_DEBUGWIRE 0x10 # define RSP3_FAIL_PDI 0x1B # define RSP3_FAIL_NO_ANSWER 0x20 # define RSP3_FAIL_NO_TARGET_POWER 0x22