I am trying to verify the checksum of the programmed flash memory as part of a BIT test upon startup. I am adding all the memory locations that are defined to be part of the flash memory. The code is very straight forward:
unsigned long CalculateFlashCSUM()
unsigned long CheckSum=0;
uint8 * FlashAddress;
for(unsigned int i=0;i<=CYDEV_FLASH_SIZE;i++)
CheckSum += *(FlashAddress++);
I was hoping that I could associate this with something in the hex program file. This would make it easier to update the software because I could then just inspect the hex file to determine the expected CheckSum value, but the Checksum I am getting from above doesn't seem to match anything in the hex file. Can anyone provide any insight? Currently, CheckSum is calculated to be 0x0023D6E0 using the above algorithm and the bottom of the hex file looks like this:
Solved! Go to Solution.
Thanks for the link to the other thread. I believe that discussion is a bit different, but perhaps this discussion would be best continued there.