mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 18:44:17 +00:00
Harden urclock against bootloader bricking
- Detect write restrictions with new pgm->readonly(..., addr) - Check in byte-wise cached write whether mem/addr allows write - Emulated chip erase tells user CE is delayed until first -U - After bootloader CE urclock_chip_erase will init reset vector - Low level paged write @ 0 unconditionally protects reset vector - Low level paged read @ 0 checks and repairs reset vector
This commit is contained in:
@@ -808,6 +808,8 @@ typedef struct programmer_t {
|
||||
int (*chip_erase_cached)(const struct programmer_t *pgm, const AVRPART *p);
|
||||
int (*page_erase_cached)(const struct programmer_t *pgm, const AVRPART *p, const AVRMEM *m,
|
||||
unsigned int baseaddr);
|
||||
int (*readonly) (const struct programmer_t *pgm, const AVRPART *p, const AVRMEM *m,
|
||||
unsigned int addr);
|
||||
int (*flush_cache) (const struct programmer_t *pgm, const AVRPART *p);
|
||||
int (*reset_cache) (const struct programmer_t *pgm, const AVRPART *p);
|
||||
AVR_Cache *cp_flash, *cp_eeprom;
|
||||
|
||||
Reference in New Issue
Block a user