From ee861c4492c476495c570ca2291bb1dda1a7c827 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sat, 7 Sep 2013 20:40:29 +0000 Subject: [PATCH] * jtag3.c (jtag3_write_byte): Do not attempt to start the paged algorithm for EEPROM when being connected through debugWIRE. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1210 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 5 +++++ jtag3.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c71b926..cf6d8158 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-09-07 Joerg Wunsch + + * jtag3.c (jtag3_write_byte): Do not attempt to start the paged + algorithm for EEPROM when being connected through debugWIRE. + 2013-09-06 Joerg Wunsch Extend the single-byte algorithm to all devices, both flash and diff --git a/jtag3.c b/jtag3.c index 738abc2c..aa91741c 100644 --- a/jtag3.c +++ b/jtag3.c @@ -1575,8 +1575,12 @@ static int jtag3_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, if (pgm->flag & PGM_FL_IS_DW) unsupp = 1; } else if (strcmp(mem->desc, "eeprom") == 0) { - cache_ptr = PDATA(pgm)->eeprom_pagecache; - pagesize = PDATA(pgm)->eeprom_pagesize; + if (pgm->flag & PGM_FL_IS_DW) { + cmd[3] = MTYPE_EEPROM; + } else { + cache_ptr = PDATA(pgm)->eeprom_pagecache; + pagesize = PDATA(pgm)->eeprom_pagesize; + } PDATA(pgm)->eeprom_pageaddr = (unsigned long)-1L; } else if (strcmp(mem->desc, "lfuse") == 0) { cmd[3] = MTYPE_FUSE_BITS; @@ -1639,7 +1643,7 @@ static int jtag3_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, } /* non-paged writes go here */ - if (jtag3_program_enable(pgm) < 0) + if (!(pgm->flag & PGM_FL_IS_DW) && jtag3_program_enable(pgm) < 0) return -1; u32_to_b4(cmd + 8, 1);