* jtag3_private.h: Add two more error detail codes I stumbled
across during development * jtag3.c: (Dito.) * usb_libusb.c: Reduce timeouts from 100 to 10 s, still long enough, but not getting cold feet when something goes wrong. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1116 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
fa86937e91
commit
d8ad0fdb28
|
@ -1,3 +1,11 @@
|
|||
2012-11-30 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* jtag3_private.h: Add two more error detail codes I stumbled
|
||||
across during development
|
||||
* jtag3.c: (Dito.)
|
||||
* usb_libusb.c: Reduce timeouts from 100 to 10 s, still long
|
||||
enough, but not getting cold feet when something goes wrong.
|
||||
|
||||
2012-11-29 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* jtag3.c: Handle events returned by the ICE
|
||||
|
|
9
jtag3.c
9
jtag3.c
|
@ -263,6 +263,14 @@ static void jtag3_prmsg(PROGRAMMER * pgm, unsigned char * data, size_t len)
|
|||
case RSP3_FAIL_PDI:
|
||||
strcpy(reason, "PDI failure");
|
||||
break;
|
||||
|
||||
case RSP3_FAIL_UNSUPP_MEMORY:
|
||||
strcpy(reason, "unsupported memory type");
|
||||
break;
|
||||
|
||||
case RSP3_FAIL_WRONG_LENGTH:
|
||||
strcpy(reason, "wrong length in memory access");
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, ", reason: %s\n", reason);
|
||||
}
|
||||
|
@ -537,6 +545,7 @@ static int jtag3_command(PROGRAMMER *pgm, unsigned char *cmd, unsigned int cmdle
|
|||
fprintf(stderr,
|
||||
"%s: %s command: timeout/error communicating with programmer (status %d)\n",
|
||||
progname, descr, status);
|
||||
return -1;
|
||||
} else if (verbose >= 3) {
|
||||
putc('\n', stderr);
|
||||
jtag3_prmsg(pgm, *resp, status);
|
||||
|
|
|
@ -138,6 +138,8 @@
|
|||
# define RSP3_FAIL_NO_ANSWER 0x20
|
||||
# define RSP3_FAIL_NO_TARGET_POWER 0x22
|
||||
# define RSP3_FAIL_WRONG_MODE 0x32 /* progmode vs. non-prog */
|
||||
# define RSP3_FAIL_UNSUPP_MEMORY 0x34 /* unsupported memory type */
|
||||
# define RSP3_FAIL_WRONG_LENGTH 0x35 /* wrong lenth for mem access */
|
||||
# define RSP3_FAIL_NOT_UNDERSTOOD 0x91
|
||||
|
||||
/* ICE events */
|
||||
|
|
|
@ -279,7 +279,7 @@ static int usbdev_send(union filedescriptor *fd, unsigned char *bp, size_t mlen)
|
|||
*/
|
||||
do {
|
||||
tx_size = (mlen < fd->usb.max_xfer)? mlen: fd->usb.max_xfer;
|
||||
rv = usb_bulk_write(udev, fd->usb.wep, (char *)bp, tx_size, 100000);
|
||||
rv = usb_bulk_write(udev, fd->usb.wep, (char *)bp, tx_size, 10000);
|
||||
if (rv != tx_size)
|
||||
{
|
||||
fprintf(stderr, "%s: usbdev_send(): wrote %d out of %d bytes, err = %s\n",
|
||||
|
@ -325,7 +325,7 @@ usb_fill_buf(usb_dev_handle *udev, int maxsize, int ep)
|
|||
{
|
||||
int rv;
|
||||
|
||||
rv = usb_bulk_read(udev, ep, usbbuf, maxsize, 100000);
|
||||
rv = usb_bulk_read(udev, ep, usbbuf, maxsize, 10000);
|
||||
if (rv < 0)
|
||||
{
|
||||
if (verbose > 1)
|
||||
|
@ -422,7 +422,7 @@ static int usbdev_recv_frame(union filedescriptor *fd, unsigned char *buf, size_
|
|||
do
|
||||
{
|
||||
rv = usb_bulk_read(udev, fd->usb.rep, usbbuf,
|
||||
fd->usb.max_xfer, 100000);
|
||||
fd->usb.max_xfer, 10000);
|
||||
if (rv < 0)
|
||||
{
|
||||
if (verbose > 1)
|
||||
|
|
Loading…
Reference in New Issue