bug #37441: lockbits in ATxmega + avrdude = problem
* fileio.c: replace strmcp(..., "lock") by strncmp(..., "lock", 4) where applicable git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1338 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
4822833ce4
commit
7248d0ad5e
|
@ -1,3 +1,11 @@
|
||||||
|
2014-10-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
bug #37441: lockbits in ATxmega + avrdude = problem
|
||||||
|
* fileio.c: replace strmcp(..., "lock") by strncmp(..., "lock", 4)
|
||||||
|
where applicable
|
||||||
|
* jtag3.c: (Dito.)
|
||||||
|
* jtagmkII.c: (Dito.)
|
||||||
|
|
||||||
2014-10-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2014-10-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
bug #42267: jtag3isp fails to read lock and fuse bytes directly
|
bug #42267: jtag3isp fails to read lock and fuse bytes directly
|
||||||
|
|
2
fileio.c
2
fileio.c
|
@ -796,7 +796,7 @@ static int elf_mem_limits(AVRMEM *mem, struct avrpart * p,
|
||||||
*lowbound = 0x820000;
|
*lowbound = 0x820000;
|
||||||
*highbound = 0x82ffff;
|
*highbound = 0x82ffff;
|
||||||
*fileoff = mem->desc[4] - '0';
|
*fileoff = mem->desc[4] - '0';
|
||||||
} else if (strcmp(mem->desc, "lock") == 0) {
|
} else if (strncmp(mem->desc, "lock", 4) == 0) {
|
||||||
*lowbound = 0x830000;
|
*lowbound = 0x830000;
|
||||||
*highbound = 0x83ffff;
|
*highbound = 0x83ffff;
|
||||||
*fileoff = 0;
|
*fileoff = 0;
|
||||||
|
|
6
jtag3.c
6
jtag3.c
|
@ -1034,7 +1034,7 @@ static int jtag3_initialize(PROGRAMMER * pgm, AVRPART * p)
|
||||||
u32_to_b4(xd.nvm_boot_offset, m->offset);
|
u32_to_b4(xd.nvm_boot_offset, m->offset);
|
||||||
} else if (strcmp(m->desc, "fuse1") == 0) {
|
} else if (strcmp(m->desc, "fuse1") == 0) {
|
||||||
u32_to_b4(xd.nvm_fuse_offset, m->offset & ~7);
|
u32_to_b4(xd.nvm_fuse_offset, m->offset & ~7);
|
||||||
} else if (strcmp(m->desc, "lock") == 0) {
|
} else if (strncmp(m->desc, "lock", 4) == 0) {
|
||||||
u32_to_b4(xd.nvm_lock_offset, m->offset);
|
u32_to_b4(xd.nvm_lock_offset, m->offset);
|
||||||
} else if (strcmp(m->desc, "usersig") == 0) {
|
} else if (strcmp(m->desc, "usersig") == 0) {
|
||||||
u32_to_b4(xd.nvm_user_sig_offset, m->offset);
|
u32_to_b4(xd.nvm_user_sig_offset, m->offset);
|
||||||
|
@ -1644,7 +1644,7 @@ static int jtag3_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
||||||
addr = 2;
|
addr = 2;
|
||||||
if (pgm->flag & PGM_FL_IS_DW)
|
if (pgm->flag & PGM_FL_IS_DW)
|
||||||
unsupp = 1;
|
unsupp = 1;
|
||||||
} else if (strcmp(mem->desc, "lock") == 0) {
|
} else if (strncmp(mem->desc, "lock", 4) == 0) {
|
||||||
cmd[3] = MTYPE_LOCK_BITS;
|
cmd[3] = MTYPE_LOCK_BITS;
|
||||||
if (pgm->flag & PGM_FL_IS_DW)
|
if (pgm->flag & PGM_FL_IS_DW)
|
||||||
unsupp = 1;
|
unsupp = 1;
|
||||||
|
@ -1797,7 +1797,7 @@ static int jtag3_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
||||||
cmd[3] = MTYPE_USERSIG;
|
cmd[3] = MTYPE_USERSIG;
|
||||||
} else if (strcmp(mem->desc, "prodsig") == 0) {
|
} else if (strcmp(mem->desc, "prodsig") == 0) {
|
||||||
cmd[3] = MTYPE_PRODSIG;
|
cmd[3] = MTYPE_PRODSIG;
|
||||||
} else if (strcmp(mem->desc, "lock") == 0) {
|
} else if (strncmp(mem->desc, "lock", 4) == 0) {
|
||||||
cmd[3] = MTYPE_LOCK_BITS;
|
cmd[3] = MTYPE_LOCK_BITS;
|
||||||
if (pgm->flag & PGM_FL_IS_DW)
|
if (pgm->flag & PGM_FL_IS_DW)
|
||||||
unsupp = 1;
|
unsupp = 1;
|
||||||
|
|
|
@ -1053,7 +1053,7 @@ static void jtagmkII_set_xmega_params(PROGRAMMER * pgm, AVRPART * p)
|
||||||
u32_to_b4(sendbuf.dd.nvm_boot_offset, m->offset);
|
u32_to_b4(sendbuf.dd.nvm_boot_offset, m->offset);
|
||||||
} else if (strcmp(m->desc, "fuse1") == 0) {
|
} else if (strcmp(m->desc, "fuse1") == 0) {
|
||||||
u32_to_b4(sendbuf.dd.nvm_fuse_offset, m->offset & ~7);
|
u32_to_b4(sendbuf.dd.nvm_fuse_offset, m->offset & ~7);
|
||||||
} else if (strcmp(m->desc, "lock") == 0) {
|
} else if (strncmp(m->desc, "lock", 4) == 0) {
|
||||||
u32_to_b4(sendbuf.dd.nvm_lock_offset, m->offset);
|
u32_to_b4(sendbuf.dd.nvm_lock_offset, m->offset);
|
||||||
} else if (strcmp(m->desc, "usersig") == 0) {
|
} else if (strcmp(m->desc, "usersig") == 0) {
|
||||||
u32_to_b4(sendbuf.dd.nvm_user_sig_offset, m->offset);
|
u32_to_b4(sendbuf.dd.nvm_user_sig_offset, m->offset);
|
||||||
|
@ -2250,7 +2250,7 @@ static int jtagmkII_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
||||||
addr = 2;
|
addr = 2;
|
||||||
if (pgm->flag & PGM_FL_IS_DW)
|
if (pgm->flag & PGM_FL_IS_DW)
|
||||||
unsupp = 1;
|
unsupp = 1;
|
||||||
} else if (strcmp(mem->desc, "lock") == 0) {
|
} else if (strncmp(mem->desc, "lock", 4) == 0) {
|
||||||
cmd[1] = MTYPE_LOCK_BITS;
|
cmd[1] = MTYPE_LOCK_BITS;
|
||||||
if (pgm->flag & PGM_FL_IS_DW)
|
if (pgm->flag & PGM_FL_IS_DW)
|
||||||
unsupp = 1;
|
unsupp = 1;
|
||||||
|
@ -2429,7 +2429,7 @@ static int jtagmkII_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
||||||
cmd[1] = MTYPE_USERSIG;
|
cmd[1] = MTYPE_USERSIG;
|
||||||
} else if (strcmp(mem->desc, "prodsig") == 0) {
|
} else if (strcmp(mem->desc, "prodsig") == 0) {
|
||||||
cmd[1] = MTYPE_PRODSIG;
|
cmd[1] = MTYPE_PRODSIG;
|
||||||
} else if (strcmp(mem->desc, "lock") == 0) {
|
} else if (strncmp(mem->desc, "lock", 4) == 0) {
|
||||||
cmd[1] = MTYPE_LOCK_BITS;
|
cmd[1] = MTYPE_LOCK_BITS;
|
||||||
if (pgm->flag & PGM_FL_IS_DW)
|
if (pgm->flag & PGM_FL_IS_DW)
|
||||||
unsupp = 1;
|
unsupp = 1;
|
||||||
|
|
Loading…
Reference in New Issue