From 05a952b0277b545a3ce616eaf16927c754ce65d3 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Tue, 3 Sep 2013 11:32:47 +0000 Subject: [PATCH] bug #38580 Current svn head, xmega and fuses, all fuses tied to fuse0 * jtag3.c (jtag3_read_byte, jtag3_write_byte): Correctly apply the relevant part of mem->offset as the address to operate on. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1201 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ NEWS | 1 + jtag3.c | 2 ++ 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 100446aa..85cf93f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-09-03 Joerg Wunsch + + bug #38580 Current svn head, xmega and fuses, all fuses tied to fuse0 + * jtag3.c (jtag3_read_byte, jtag3_write_byte): Correctly apply the + relevant part of mem->offset as the address to operate on. + 2013-09-03 Joerg Wunsch * fileio.c: Fix "unused variable" warnings. diff --git a/NEWS b/NEWS index 1a641f0f..e88baf4e 100644 --- a/NEWS +++ b/NEWS @@ -87,6 +87,7 @@ Current: - bug #39794: warnings when building avrdude 6.0rc1 under CentOS 6.4 - bug #35800: Compilation error on certain systems if parport is disabled - bug #38307: Can't write usersig of an xmega256a3 + - bug #38580 Current svn head, xmega and fuses, all fuses tied to fuse0 * Keep track of input file contents diff --git a/jtag3.c b/jtag3.c index 725073d0..8724fbc9 100644 --- a/jtag3.c +++ b/jtag3.c @@ -1478,6 +1478,7 @@ static int jtag3_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, unsupp = 1; } else if (strncmp(mem->desc, "fuse", strlen("fuse")) == 0) { cmd[3] = MTYPE_FUSE_BITS; + addr = mem->offset & 7; } else if (strcmp(mem->desc, "usersig") == 0) { cmd[3] = MTYPE_USERSIG; } else if (strcmp(mem->desc, "prodsig") == 0) { @@ -1613,6 +1614,7 @@ static int jtag3_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem, unsupp = 1; } else if (strncmp(mem->desc, "fuse", strlen("fuse")) == 0) { cmd[3] = MTYPE_FUSE_BITS; + addr = mem->offset & 7; } else if (strcmp(mem->desc, "usersig") == 0) { cmd[3] = MTYPE_USERSIG; } else if (strcmp(mem->desc, "prodsig") == 0) {