I have a firmware file on my hard disk for the SAM D21 microcontroller. I've padded the end of the file with zeroes to bring it to 256 kilobytes. I've gotten the MD5 sum of this file.
Next, in my Arduino sketch, I've written a function that calculates the MD5 sum of all the bytes from memory address 0x00000 to 0x40000.
These two MD5 sums don't match.
So next I looked at the first 16 bytes of the firmware file:
0080 0020 398c 0000 218c 0000 218c 0000
But the first 16 bytes at runtime in the microcontroller's Flash are coming back as:
fc7f 0020 0d06 0000 fd05 0000 0106 0000
Are these some sort of configuration bytes or something?
Anyone know what's going on here?