On Sat, Oct 01, 2005 at 06:39:07PM +0000, anonymous wrote:

> Subject: [avrdude-dev] [bug #14681] Avrdude fails communication when using -v 
> -v -v -v (4x)
> 
> Details:
> 
> While I was programming and debugging my application I noticed that:
> 
> avrdude -cstk500v2 -Pcom1 -pm16 -v -v -v
> works fine.
> 
> But when using (4x -v)
> avrdude -cstk500v2 -Pcom1 -pm16 -v -v -v -v
> It 'hangs' generating only:
> avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
> avrdude: Recv:
> avrdude: stk500_2_ReceiveMessage(): timeout

Can someone who can build on Windows please try the attached patch?
Hopefully it should fix the above problem.

-Brian
-- 
Brian Dean
ATmega128 based MAVRIC controllers
http://www.bdmicro.com/
Index: ser_win32.c
===================================================================
RCS file: /cvsroot/avrdude/avrdude/ser_win32.c,v
retrieving revision 1.7
diff -u -r1.7 ser_win32.c
--- ser_win32.c 19 Jun 2005 21:38:03 -0000      1.7
+++ ser_win32.c 28 Oct 2005 00:52:26 -0000
@@ -179,6 +179,7 @@
        size_t len = buflen;
        unsigned char c='\0';
        DWORD written;
+        char * b = buf;
 
        HANDLE hComPort=(HANDLE)fd;
 
@@ -195,8 +196,8 @@
        {
                fprintf(stderr, "%s: Send: ", progname);
 
-               while (buflen) {
-                       c = *buf;
+               while (len) {
+                       c = *b;
                        if (isprint(c)) {
                                fprintf(stderr, "%c ", c);
                        }
@@ -204,8 +205,8 @@
                                fprintf(stderr, ". ");
                        }
                        fprintf(stderr, "[%02x] ", c);
-                       buf++;
-                       buflen--;
+                       b++;
+                       len--;
                }
       fprintf(stderr, "\n");
        }
_______________________________________________
avrdude-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avrdude-dev

Reply via email to