Skip to content

Commit

Permalink
Improve documentation for terminal erase
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrueger committed Jul 7, 2024
1 parent 0f74b7b commit fa618a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/avrdude.1
Original file line number Diff line number Diff line change
Expand Up @@ -1264,8 +1264,9 @@ command line argument.
.Ar verify
flushes the cache before verifying memories.
.It Ar erase
Perform a chip erase and discard all pending writes to EEPROM and flash.
Note that EEPROM will be preserved if the EESAVE fuse bit is set.
Perform a chip erase and discard all pending writes to flash, EEPROM and bootrow.
Note that EEPROM will be preserved if the EESAVE fuse bit is active, ie, had
a corresponding value at the last reset prior to the operation.
.It Ar erase memory
Erase the entire specified memory.
.It Ar erase memory addr len
Expand Down
5 changes: 3 additions & 2 deletions src/doc/avrdude.texi
Original file line number Diff line number Diff line change
Expand Up @@ -2509,8 +2509,9 @@ comma separated list of memories just as in the @code{-U} command line
argument. @code{verify} flushes the cache before verifying memories.

@item erase
Perform a chip erase and discard all pending writes to EEPROM and flash.
Note that EEPROM will be preserved if the EESAVE fuse bit is set.
Perform a chip erase and discard all pending writes to flash, EEPROM and bootrow.
Note that EEPROM will be preserved if the EESAVE fuse bit is active, ie, had
a corresponding value at the last reset prior to the operation.

@item erase @var{memory}
Erase the entire specified memory.
Expand Down
5 changes: 3 additions & 2 deletions src/term.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,9 @@ static int cmd_erase(const PROGRAMMER *pgm, const AVRPART *p, int argc, const ch
return cmd_write(pgm, p, 6, args);
}

term_out("%s chip erase ...\n", (pgm->prog_modes & PM_SPM)?
"asking bootloader to perform": "performing");
term_out("%s chip erase; discarded pending writes to flash%s\n",
(pgm->prog_modes & PM_SPM)? "asking bootloader to perform": "performing",
avr_locate_bootrow(p)? ", EEPROM and bootrow": avr_locate_eeprom(p)? "and EEPROM": "");

// Erase chip and clear cache
int rc = pgm->chip_erase_cached(pgm, p);
Expand Down

0 comments on commit fa618a8

Please sign in to comment.