Shesh. The previous commit was a little premature. Drag the
"GO" code in again, but only activate it when programming an Xmega device through PDI. Wonderfully consistent tools. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1071 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
229b7cd075
commit
d3a655ae58
|
@ -1,9 +1,10 @@
|
||||||
2012-03-20 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2012-03-20 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
* jtagmkII.c (jtagmkII_close): The GO command before signing off
|
* jtagmkII.c (jtagmkII_close): The GO command before signing off
|
||||||
turned out to do more harm than good; on the Xmega, it caused exactly
|
turned out to be not required for normal megaAVR devices, and to
|
||||||
the opposite reaction, the CPU stopped. Even without it, after the
|
cause the exact opposite (i.e. the target stopping) on Xmega
|
||||||
RESET command, the target is running already. So, drop the GO.
|
devices being programmed to JTAG. However, programming Xmega
|
||||||
|
devcies through PDI *does* need the GO command.
|
||||||
|
|
||||||
2012-03-20 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2012-03-20 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
|
33
jtagmkII.c
33
jtagmkII.c
|
@ -1685,6 +1685,39 @@ void jtagmkII_close(PROGRAMMER * pgm)
|
||||||
if (verbose >= 2)
|
if (verbose >= 2)
|
||||||
fprintf(stderr, "%s: jtagmkII_close()\n", progname);
|
fprintf(stderr, "%s: jtagmkII_close()\n", progname);
|
||||||
|
|
||||||
|
if (pgm->flag & PGM_FL_IS_PDI) {
|
||||||
|
/* When in PDI mode, restart target. */
|
||||||
|
buf[0] = CMND_GO;
|
||||||
|
if (verbose >= 2)
|
||||||
|
fprintf(stderr, "%s: jtagmkII_close(): Sending GO command: ",
|
||||||
|
progname);
|
||||||
|
jtagmkII_send(pgm, buf, 1);
|
||||||
|
|
||||||
|
status = jtagmkII_recv(pgm, &resp);
|
||||||
|
if (status <= 0) {
|
||||||
|
if (verbose >= 2)
|
||||||
|
putc('\n', stderr);
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: jtagmkII_close(): "
|
||||||
|
"timeout/error communicating with programmer (status %d)\n",
|
||||||
|
progname, status);
|
||||||
|
} else {
|
||||||
|
if (verbose >= 3) {
|
||||||
|
putc('\n', stderr);
|
||||||
|
jtagmkII_prmsg(pgm, resp, status);
|
||||||
|
} else if (verbose == 2)
|
||||||
|
fprintf(stderr, "0x%02x (%d bytes msg)\n", resp[0], status);
|
||||||
|
c = resp[0];
|
||||||
|
free(resp);
|
||||||
|
if (c != RSP_OK) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: jtagmkII_close(): "
|
||||||
|
"bad response to GO command: %s\n",
|
||||||
|
progname, jtagmkII_get_rc(c));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buf[0] = CMND_SIGN_OFF;
|
buf[0] = CMND_SIGN_OFF;
|
||||||
if (verbose >= 2)
|
if (verbose >= 2)
|
||||||
fprintf(stderr, "%s: jtagmkII_close(): Sending sign-off command: ",
|
fprintf(stderr, "%s: jtagmkII_close(): Sending sign-off command: ",
|
||||||
|
|
Loading…
Reference in New Issue