I had a look to the Keil\ARM\Flash\AT91SAM7_64 and it looks this code was design to never run.
1. The example finishes with error 2. ProgramPage should be at least in RAM 3. *Flash++ = *((unsigned long *)buf); -> buf should be aligned before get Data abort exception.
Did someone has some working example with Keil AT91SAM7xx and data flash?
I'm not sure I understand you, but if you are trying to do IAP you can look at http://www.st.com, STR9 samples.