Piggy-back 'Do not remove trailing 0xff' onto option -D

This commit is contained in:
Stefan Rueger
2022-04-15 20:46:40 +01:00
parent 60960ba590
commit ed38456f83
3 changed files with 15 additions and 1 deletions

View File

@@ -282,6 +282,16 @@ int avr_read_byte_default(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
int avr_mem_hiaddr(AVRMEM * mem)
{
int i, n;
static int disableffopt;
/* calling once with NULL disables any future trailing-0xff optimisation */
if(!mem) {
disableffopt = 1;
return 0;
}
if(disableffopt)
return mem->size;
/* return the highest non-0xff address regardless of how much
memory was read */