For most chips I’ve tried, it does program them a lot quicker, particularly if you have a lot of flash to program (although you can sometimes mitigate against this by moving the IVT in some processors where by defualt they are at the end of flash, so the whole flash range gets written).
Seriously ? Isn't it smart enough to skip unused areas?
Nope.
An example I have is a PIC32MX1/2/5 Starter Kit which has a PIC32MX570F512L on board.
With a simple blinky as an example, if you copy the processor's p32MX570F512L.ld file to the project directory and add it to the project in MPLAB X, then modify the line
PROVIDE(_ebase_address = 0x9D07F000);
to
PROVIDE(_ebase_address = 0x9D001000);
it will program much quicker.
Programming times in seconds (already compiled code, any required programmer firmware is already installed, but includes initial debugger connection time):
Programmer / 500k code / 1k code / 1k code+Modified .ld
PKOB 48 / 47 / 8
PK3 47/ 50 / 8
ICD3 20 / 17 / 8
RealICE 21 / 20 / 7
ICD4 20 / 8 / 8 **** Seems to be intelligent about unused flash
PK4 20 / 8 / 8 **** Seems to be intelligent about unused flash
****
PKOB, PK3, ICD3, RealICE, standard .ld linker file, programming areas:
program memory: start address = 0x1d000000, end address = 0x1d07ffff
PKOB, PK3, ICD3, RealICE, modified .ld linker file, programming areas:
program memory: start address = 0x1d000000, end address = 0x1d001fff
ICD 4, PK4, standard .ld linker file, programming areas:
program memory: start address = 0x1d000000, end address = 0x1d0003ff
program memory: start address = 0x1d07f000, end address = 0x1d07f9ff
ICD 4, PK4, modified .ld linker file, programming areas:
program memory: start address = 0x1d000000, end address = 0x1d0003ff
program memory: start address = 0x1d001000, end address = 0x1d0019ff
Now, if I use the original .ld, and deliberately fill flash with 500kB of 0x55, the timings of the ICD3, RealICE, ICD4 and PK4 are almost identical, 20s +/- for all four. PKOB and PK3 both come in at around 48s +/-.
So I guess on the plus side the ICD4 and PK4 are faster at programming in this use case than the ICD3 or RealICE when flash isn't full.