From 296883cf1aa69ca80bb47068d1215b94dd379f73 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Mon, 18 Mar 2024 20:55:19 +0100 Subject: [PATCH] Initialize progress reporting in avr_{read,write}_mem Progress reporting needs to be initialized by passing it a "header" string, in order to re-adjust internal static variables. avr_{read,write}_mem did not do this, so they only reported progress upon the very first invocation. --- src/avr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/avr.c b/src/avr.c index 25b6d459..1b4a7c2e 100644 --- a/src/avr.c +++ b/src/avr.c @@ -367,6 +367,7 @@ int avr_read_mem(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *mem, con * start with all 0xff */ memset(mem->buf, 0xff, mem->size); + report_progress(0, 1, "Reading"); /* supports "paged load" thru post-increment */ if ((p->prog_modes & PM_TPI) && mem->page_size > 1 && @@ -968,6 +969,7 @@ int avr_write_mem(const PROGRAMMER *pgm, const AVRPART *p, const AVRMEM *m, int return wsize; } + report_progress(0, 1, "Writing"); if ((p->prog_modes & PM_TPI) && m->page_size > 1 && pgm->cmd_tpi) { unsigned int chunk; /* number of words for each write command */ unsigned int j, writeable_chunk;