|
From: oharboe at B. <oh...@ma...> - 2009-04-30 11:39:28
|
Author: oharboe
Date: 2009-04-30 11:39:24 +0200 (Thu, 30 Apr 2009)
New Revision: 1578
Modified:
trunk/src/flash/lpc2000.c
Log:
Print out warning when LPC calc_checksum will cause verification to fail.
Modified: trunk/src/flash/lpc2000.c
===================================================================
--- trunk/src/flash/lpc2000.c 2009-04-30 09:14:01 UTC (rev 1577)
+++ trunk/src/flash/lpc2000.c 2009-04-30 09:39:24 UTC (rev 1578)
@@ -531,6 +531,15 @@
}
checksum = 0 - checksum;
LOG_DEBUG("checksum: 0x%8.8x", checksum);
+
+ u32 original_value=buf_get_u32(buffer + (5 * 4), 0, 32);
+ if (original_value!=checksum)
+ {
+ LOG_WARNING("Verification will fail since checksum in image(0x%8.8x) written to flash was different from calculated vector checksum(0x%8.8x).",
+ original_value, checksum);
+ LOG_WARNING("To remove this warning modify build tools on developer PC to inject correct LPC vector checksum.");
+ }
+
buf_set_u32(buffer + 0x14, 0, 32, checksum);
}
|