avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] Fix for bug #13693 (can't write to ATMEGA64/128 eeprom wit


From: Bernard Fouché
Subject: [avrdude-dev] Fix for bug #13693 (can't write to ATMEGA64/128 eeprom with avrdude 5.0-BETA and avrispv2/stk500v2)
Date: Fri, 08 Jul 2005 18:57:40 +0200
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Hello.

I've applied the following patches and it seems ok for atmega64. Now I think that avrdude.conf.in should be also patched for all atmega regarding the tokens "read" and "write" (they have to be "read_lo" and "write_lo") or stk500v2.c should be patched to look for other parameters than AVR_OP_WRITE_LO and AVR_OP_READ_LO, I dunno what's the better solution, I leave that to the gurus!

  Bernard
*** /tmp/stk500v2.c     2005-07-08 18:48:56.000000000 +0200
--- stk500v2.c  2005-05-11 19:09:22.000000000 +0200
***************
*** 543,551 ****
        return -1;
      }
      avr_set_bits(m->op[AVR_OP_WRITE_LO], cmds);
!     //    commandbuf[6] = cmds[0];
!     commandbuf[5] = cmds[0];
!     commandbuf[6] = 0;
    }
  
    // the read command is common to both methods
--- 543,549 ----
        return -1;
      }
      avr_set_bits(m->op[AVR_OP_WRITE_LO], cmds);
!     commandbuf[6] = cmds[0];
    }
  
    // the read command is common to both methods
***************
*** 626,632 ****
  
    // the read command is common to both methods
    if (m->op[AVR_OP_READ_LO] == NULL) {
!     fprintf(stderr, "%s: stk500v2_paged_load: read instruction not defined 
for part \"%s\"\n",
              progname, p->desc);
      return -1;
    }
--- 624,630 ----
  
    // the read command is common to both methods
    if (m->op[AVR_OP_READ_LO] == NULL) {
!     fprintf(stderr, "%s: stk500v2_paged_write: read instruction not defined 
for part \"%s\"\n",
              progname, p->desc);
      return -1;
    }
***************
*** 651,657 ****
  
      result = stk500v2_command(pgm,buf,4,sizeof(buf));
      if (buf[1] != STATUS_CMD_OK) {
!       fprintf(stderr,"%s: stk500v2_paged_load: read command failed with %d\n",
                progname,buf[1]);
        return -1;
      }
--- 649,655 ----
  
      result = stk500v2_command(pgm,buf,4,sizeof(buf));
      if (buf[1] != STATUS_CMD_OK) {
!       fprintf(stderr,"%s: stk500v2_paged_write: read command failed with 
%d\n",
                progname,buf[1]);
        return -1;
      }
*** /tmp/avrdude.conf.in        2005-07-08 18:50:40.000000000 +0200
--- avrdude.conf.in     2005-05-14 16:27:24.000000000 +0200
***************
*** 1770,1781 ****
          max_write_delay = 9000;
          readback_p1     = 0xff;
          readback_p2     = 0xff;
!       read_lo         = "  1   0   1   0      0   0   0   0",
                            "  x   x   x   x    a11 a10  a9  a8",
                            " a7  a6  a5  a4     a3  a2  a1  a0",
                            "  o   o   o   o      o   o   o   o";
  
!       write_lo        = "  1   1   0   0      0   0   0   0",
                            "  x   x   x   x    a11 a10  a9  a8",
                            " a7  a6  a5  a4     a3  a2  a1  a0", 
                            "  i   i   i   i      i   i   i   i";
--- 1770,1781 ----
          max_write_delay = 9000;
          readback_p1     = 0xff;
          readback_p2     = 0xff;
!       read            = "  1   0   1   0      0   0   0   0",
                            "  x   x   x   x    a11 a10  a9  a8",
                            " a7  a6  a5  a4     a3  a2  a1  a0",
                            "  o   o   o   o      o   o   o   o";
  
!       write           = "  1   1   0   0      0   0   0   0",
                            "  x   x   x   x    a11 a10  a9  a8",
                            " a7  a6  a5  a4     a3  a2  a1  a0", 
                            "  i   i   i   i      i   i   i   i";

reply via email to

[Prev in Thread] Current Thread [Next in Thread]