Provide self-documenting API for disabling trailing-0xff removal
This commit is contained in:
parent
2397984d2b
commit
52b20f4a28
|
@ -131,6 +131,5 @@ void arduino_initpgm(PROGRAMMER * pgm)
|
||||||
pgm->open = arduino_open;
|
pgm->open = arduino_open;
|
||||||
pgm->close = arduino_close;
|
pgm->close = arduino_close;
|
||||||
|
|
||||||
/* disable trailing-0xff removal when reading input files and avr flash */
|
disable_trailing_ff_removal(); /* so that arduino bootloader can ignore chip erase */
|
||||||
avr_mem_hiaddr(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -787,6 +787,7 @@ int avr_get_cycle_count(PROGRAMMER * pgm, AVRPART * p, int * cycles);
|
||||||
|
|
||||||
int avr_put_cycle_count(PROGRAMMER * pgm, AVRPART * p, int cycles);
|
int avr_put_cycle_count(PROGRAMMER * pgm, AVRPART * p, int cycles);
|
||||||
|
|
||||||
|
#define disable_trailing_ff_removal() avr_mem_hiaddr(NULL)
|
||||||
int avr_mem_hiaddr(AVRMEM * mem);
|
int avr_mem_hiaddr(AVRMEM * mem);
|
||||||
|
|
||||||
int avr_chip_erase(PROGRAMMER * pgm, AVRPART * p);
|
int avr_chip_erase(PROGRAMMER * pgm, AVRPART * p);
|
||||||
|
|
|
@ -528,7 +528,7 @@ int main(int argc, char * argv [])
|
||||||
|
|
||||||
case 'D': /* disable auto erase */
|
case 'D': /* disable auto erase */
|
||||||
uflags &= ~UF_AUTO_ERASE;
|
uflags &= ~UF_AUTO_ERASE;
|
||||||
avr_mem_hiaddr(NULL); /* disable trailing 0xff optimisation */
|
disable_trailing_ff_removal();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e': /* perform a chip erase */
|
case 'e': /* perform a chip erase */
|
||||||
|
|
Loading…
Reference in New Issue