mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-17 02:54:17 +00:00
bug #33114: Segfault after setting the DWEN fuse with Dragon
* jtagII.c (jtagmkII_getsync): Instead of exit()ing from deep within the tree when detecting the "need debugWIRE" situation, properly pass this up as a return code. * jtagII_private.h (JTAGII_GETSYNC_FAIL_GRACEFUL): New constant. * stk500v2.c (stk500v2_jtagmkII_open): Don't tell anything anymore when receiving a JTAGII_GETSYNC_FAIL_GRACEFUL from jtagmkII_getsync(); silently give up (all necessary has been said already). git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@983 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -2816,6 +2816,7 @@ static int stk500v2_jtagmkII_open(PROGRAMMER * pgm, char * port)
|
||||
{
|
||||
long baud;
|
||||
void *mycookie;
|
||||
int rv;
|
||||
|
||||
if (verbose >= 2)
|
||||
fprintf(stderr, "%s: stk500v2_jtagmkII_open()\n", progname);
|
||||
@@ -2856,9 +2857,11 @@ static int stk500v2_jtagmkII_open(PROGRAMMER * pgm, char * port)
|
||||
|
||||
mycookie = pgm->cookie;
|
||||
pgm->cookie = PDATA(pgm)->chained_pdata;
|
||||
if (jtagmkII_getsync(pgm, EMULATOR_MODE_SPI) != 0) {
|
||||
fprintf(stderr, "%s: failed to sync with the JTAG ICE mkII in ISP mode\n",
|
||||
progname);
|
||||
if ((rv = jtagmkII_getsync(pgm, EMULATOR_MODE_SPI)) != 0) {
|
||||
if (rv != JTAGII_GETSYNC_FAIL_GRACEFUL)
|
||||
fprintf(stderr,
|
||||
"%s: failed to sync with the JTAG ICE mkII in ISP mode\n",
|
||||
progname);
|
||||
pgm->cookie = mycookie;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user