It seems to be a bit academic. avrdude DOES seem to write pages with trailing FF's; It's only the pages completely filled with FF that are skipped. Here's a test sketch:
#include <pgmspace.h>
typedef struct {
unsigned char data[SPM_PAGESIZE];
}
flashpage_t __attribute__ ((aligned(128)));
extern const PROGMEM flashpage_t allff, leadff, trailff;
void setup() {
// put your setup code here, to run once:
digitalWrite(1, pgm_read_byte(&allff.data[100]));
digitalWrite(1, pgm_read_byte(&leadff.data[100]));
digitalWrite(1, pgm_read_byte(&trailff.data[100]));
}
void loop() {
// put your main code here, to run repeatedly:
}
#include <arduino.h>
#include <pgmspace.h>
typedef struct {unsigned char data[SPM_PAGESIZE];} flashpage_t __attribute__ ((aligned(128)));
extern const PROGMEM flashpage_t allff, leadff, trailff;
#define FF8 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
#define FF16 FF8, FF8
#define FF64 FF16, FF16, FF16, FF16
const PROGMEM flashpage_t allff = {{ FF64, FF64 }};
const PROGMEM flashpage_t leadff = {{ FF64, FF16, FF16,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}};
const PROGMEM flashpage_t trailff = {{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
FF16, FF16, FF64 }};
(include both files as tabs in your sketch.)
And here's the avrdude verbose output (from 1.0.2. Has it changed?)
######avrdude: Send: U [55] . [c0] . [00] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude: Send: d [64] . [00] . [80] F [46] . [00] . [01] . [02] . [03] . [04] . [05] . [06] . [07] . [08] . [09] . [0a] . [0b] . [0c] . [0d] . [0e] . [0f] . [10] . [11] . [12] . [13] . [14] . [15] . [16] . [17] . [18] . [19] . [1a] . [1b] . [1c] . [1d] . [1e] . [1f] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] [20]
avrdude: Recv: . [14]