Before doing the compare in SAM-BA, did you add a few zeros to the "size" value? If not, it will only read the first small bit of FLASH and since the size isn't big enough it will give you a verification failure.
Regarding EK vs AU... -EK means "evaluation kit" and is the name of the main development board for AT91SAM7X512-AU. It uses the same chip as Netduino which is why we use its script to flash the Netduino. Since they both use the same chip, they both flash using the same configuration.
Yes, I make sure to read enough bytes to make the comparison. I had a closer look at the data, and it's always the same bit that appears to be 1 when sometimes it should be 0, and only in one memory block. Can it be that the flash memory is corrupt? At least the file I read back is always the same, but different from what I try to write
When I reset gold pad - 3.3V, I can always get back to the CDC connection, and scripts and downloads always run fine, I just don't get the right code in the flash. When reconnecting after the flash, the USB gives a low-level error, and I don't see any info, not even the usual vid/pid stuff.