Add more memory sections to read from

+ improve Avrdude output in verbose mode
This commit is contained in:
MCUdude 2022-01-08 23:57:37 +01:00
parent 8c4c9d0090
commit 8f16c2a1e4
3 changed files with 106 additions and 17 deletions

View File

@ -16209,6 +16209,42 @@ part
readsize = 0x3D; readsize = 0x3D;
; ;
memory "sernum"
size = 10;
offset = 0x1104;
readsize = 1;
;
memory "osccal16"
size = 2;
offset = 0x1118;
readsize = 1;
;
memory "osccal20"
size = 2;
offset = 0x111A;
readsize = 1;
;
memory "tempsense"
size = 2;
offset = 0x1120;
readsize = 1;
;
memory "osc16err"
size = 2;
offset = 0x1122;
readsize = 1;
;
memory "osc20err"
size = 2;
offset = 0x1124;
readsize = 1;
;
memory "fuses" memory "fuses"
size = 9; size = 9;
offset = 0x1280; offset = 0x1280;
@ -16222,48 +16258,96 @@ part
readsize = 1; readsize = 1;
; ;
memory "wdtcfg"
size = 1;
offset = 0x1280;
readsize = 1;
;
memory "fuse1" memory "fuse1"
size = 1; size = 1;
offset = 0x1281; offset = 0x1281;
readsize = 1; readsize = 1;
; ;
memory "bodcfg"
size = 1;
offset = 0x1281;
readsize = 1;
;
memory "fuse2" memory "fuse2"
size = 1; size = 1;
offset = 0x1282; offset = 0x1282;
readsize = 1; readsize = 1;
; ;
memory "osccfg"
size = 1;
offset = 0x1282;
readsize = 1;
;
memory "fuse4" memory "fuse4"
size = 1; size = 1;
offset = 0x1284; offset = 0x1284;
readsize = 1; readsize = 1;
; ;
memory "tcd0cfg"
size = 1;
offset = 0x1284;
readsize = 1;
;
memory "fuse5" memory "fuse5"
size = 1; size = 1;
offset = 0x1285; offset = 0x1285;
readsize = 1; readsize = 1;
; ;
memory "syscfg0"
size = 1;
offset = 0x1285;
readsize = 1;
;
memory "fuse6" memory "fuse6"
size = 1; size = 1;
offset = 0x1286; offset = 0x1286;
readsize = 1; readsize = 1;
; ;
memory "syscfg1"
size = 1;
offset = 0x1286;
readsize = 1;
;
memory "fuse7" memory "fuse7"
size = 1; size = 1;
offset = 0x1287; offset = 0x1287;
readsize = 1; readsize = 1;
; ;
memory "append"
size = 1;
offset = 0x1287;
readsize = 1;
;
memory "fuse8" memory "fuse8"
size = 1; size = 1;
offset = 0x1288; offset = 0x1288;
readsize = 1; readsize = 1;
; ;
memory "bootend"
size = 1;
offset = 0x1288;
readsize = 1;
;
memory "lock" memory "lock"
size = 1; size = 1;
offset = 0x128a; offset = 0x128a;

View File

@ -372,9 +372,10 @@ AVRMEM * avr_locate_mem(AVRPART * p, char * desc)
} }
void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, int type, void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, AVRPART * p,
int verbose) int type, int verbose)
{ {
static unsigned int prev_mem_offset, prev_mem_size;
int i, j; int i, j;
char * optr; char * optr;
@ -393,17 +394,21 @@ void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, int type,
"%s----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------\n", "%s----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------\n",
prefix, prefix, prefix); prefix, prefix, prefix);
} }
fprintf(f, if ((prev_mem_offset != m->offset || prev_mem_size != m->size) || (strcmp(p->family_id, "") == 0)) { // Don't print memory aliases
"%s%-11s %4d %5d %5d %4d %-6s %6d %4d %6d %5d %5d 0x%02x 0x%02x\n", prev_mem_offset = m->offset;
prefix, m->desc, m->mode, m->delay, m->blocksize, m->pollindex, prev_mem_size = m->size;
m->paged ? "yes" : "no", fprintf(f,
m->size, "%s%-11s %4d %5d %5d %4d %-6s %6d %4d %6d %5d %5d 0x%02x 0x%02x\n",
m->page_size, prefix, m->desc, m->mode, m->delay, m->blocksize, m->pollindex,
m->num_pages, m->paged ? "yes" : "no",
m->min_write_delay, m->size,
m->max_write_delay, m->page_size,
m->readback[0], m->num_pages,
m->readback[1]); m->min_write_delay,
m->max_write_delay,
m->readback[0],
m->readback[1]);
}
if (verbose > 4) { if (verbose > 4) {
avrdude_message(MSG_TRACE2, "%s Memory Ops:\n" avrdude_message(MSG_TRACE2, "%s Memory Ops:\n"
"%s Oeration Inst Bit Bit Type Bitno Value\n" "%s Oeration Inst Bit Bit Type Bitno Value\n"
@ -669,11 +674,11 @@ void avr_display(FILE * f, AVRPART * p, const char * prefix, int verbose)
} }
if (verbose <= 2) { if (verbose <= 2) {
avr_mem_display(px, f, NULL, 0, verbose); avr_mem_display(px, f, NULL, p, 0, verbose);
} }
for (ln=lfirst(p->mem); ln; ln=lnext(ln)) { for (ln=lfirst(p->mem); ln; ln=lnext(ln)) {
m = ldata(ln); m = ldata(ln);
avr_mem_display(px, f, m, i, verbose); avr_mem_display(px, f, m, p, i, verbose);
} }
if (buf) if (buf)

View File

@ -320,8 +320,8 @@ int avr_initmem(AVRPART * p);
AVRMEM * avr_dup_mem(AVRMEM * m); AVRMEM * avr_dup_mem(AVRMEM * m);
void avr_free_mem(AVRMEM * m); void avr_free_mem(AVRMEM * m);
AVRMEM * avr_locate_mem(AVRPART * p, char * desc); AVRMEM * avr_locate_mem(AVRPART * p, char * desc);
void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, int type, void avr_mem_display(const char * prefix, FILE * f, AVRMEM * m, AVRPART * p,
int verbose); int type, int verbose);
/* Functions for AVRPART structures */ /* Functions for AVRPART structures */
AVRPART * avr_new_part(void); AVRPART * avr_new_part(void);