Merge pull request #863 from MCUdude/jtag3-read-memory-alias
Add support for reading from more memory sections
This commit is contained in:
commit
ba314f23e9
19
src/jtag3.c
19
src/jtag3.c
|
@ -1968,6 +1968,18 @@ static int jtag3_read_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
|||
cmd[3] = MTYPE_USERSIG;
|
||||
} else if (strcmp(mem->desc, "prodsig") == 0) {
|
||||
cmd[3] = MTYPE_PRODSIG;
|
||||
} else if (strcmp(mem->desc, "sernum") == 0) {
|
||||
cmd[3] = MTYPE_SIGN_JTAG;
|
||||
} else if (strcmp(mem->desc, "osccal16") == 0) {
|
||||
cmd[3] = MTYPE_SIGN_JTAG;
|
||||
} else if (strcmp(mem->desc, "osccal20") == 0) {
|
||||
cmd[3] = MTYPE_SIGN_JTAG;
|
||||
} else if (strcmp(mem->desc, "tempsense") == 0) {
|
||||
cmd[3] = MTYPE_SIGN_JTAG;
|
||||
} else if (strcmp(mem->desc, "osc16err") == 0) {
|
||||
cmd[3] = MTYPE_SIGN_JTAG;
|
||||
} else if (strcmp(mem->desc, "osc20err") == 0) {
|
||||
cmd[3] = MTYPE_SIGN_JTAG;
|
||||
} else if (strcmp(mem->desc, "calibration") == 0) {
|
||||
cmd[3] = MTYPE_OSCCAL_BYTE;
|
||||
if (pgm->flag & PGM_FL_IS_DW)
|
||||
|
@ -2440,13 +2452,10 @@ static unsigned int jtag3_memaddr(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m, uns
|
|||
* Non-Xmega device.
|
||||
*/
|
||||
if (p->flags & AVRPART_HAS_UPDI) {
|
||||
if (strcmp(m->desc, "fuses") == 0) {
|
||||
addr += m->offset;
|
||||
}
|
||||
else if (matches(m->desc, "fuse")) {
|
||||
if (m->size == 1) {
|
||||
addr = m->offset;
|
||||
}
|
||||
else if (strcmp(m->desc, "flash") != 0) {
|
||||
else if (m->size > 1) {
|
||||
addr += m->offset;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue