Hello All,
I am using LPC2364 controller and Keil uVision5 IDE.
I need to calculate checksum of Hex file each time when the device is powered on and should be compared with the pre calculated checksum. This is to make sure that the source code is unchanged.
I am newbie ... Please help me...
So create a byte or word pointer, set it to the base address of the flash, and then count off the bytes/words in the flash, summing the content as you go.
A method with .HEX/.BIN files is to process the content before programming on to the chip, and place the inverse value at the end of the image so that it sums to zero, or holds a value you can compare.
A more robust method would use a CRC
Thank you...
Can you please give more details. I am not able to get the below mentioned point
"A method with .HEX/.BIN files is to process the content before programming on to the chip, and place the inverse value at the end of the image so that it sums to zero, or holds a value you can compare."
Or please share some links, where I can find some examples or explanations.
i had to do this before and i found a program in the computer.
i put a copy in \Documents and settings\kasuga\Desktop\stuff\kiel\addchecksum.exe
Hi Kasuga,
As I cant access your computer can u attach the file here.
Thanks in advance.
i try to attach
MZ ÿÿ ¸ @ à º ´ Í!¸LÍ!This program cannot be run in DOS mode.
$ (ÞAÜl¿/l¿/l¿/ÿñ·m¿/w"±x¿/w"…æ¿/eǼi¿/l¿. ¿/w"„^¿/w"µm¿/w"²m¿/Richl¿/ PE L o1±T à ´ ¾ Õ¥ Ð @ ° @ Œ$ < p ø € Ò à @ Ð „ .text ² ´ '.rdata 6\ Ð ^ ¸ @ @.data : 0 @ À.rsrc ø p . @ @.reloc B! € " 0 @ B Ç0ÒA é%y ÌÌÌÌÌU‹ìV‹ñÇ0ÒA èy öEt Vèæy ƒÄ‹Æ^] ÌÌÌÌÌÌÌÌÌU‹ìQV‹ñƒ> u$j Müè\ ƒ> u ¡IB @£IB ‰Müè\ ‹^‹å]ÃÌÌÌÌÌÌÌÌÌU‹ìQV‹ñj MüèÇ[ ‹Fƒøÿs@‰FMüèÛ[ ^‹å]ÃÌÌÌÌÌÌU‹ìQVW‹ùj Müè–[ ‹G…Àt ƒøÿsH‰G‹w÷Þö÷ÖMü#÷è›[ _‹Æ^‹å]ÃÌÌÌÇHÒA ÃÌÌÌÌÌÌÌÌÌU‹ìQW‹9…ÿt;j MüèC[ ‹G…Àt ƒøÿsH‰GV‹w÷ÞöMü÷ÖèI[ #÷t ‹‹j‹ÎÿÒ^_‹å]ÃÌÌÌÌÌU‹ì‹ V‹u;qs%‹A‹°…Àu!€y tè°[ ;ps‹H‹±^] 3Àëá3À^] ÌÌU‹ìQ‹A0V‹0W‹}j MÇEü ‰7è§Z ‹Fƒøÿs@‰FMè»Z ‹Ç_^‹å] Ìj hHB è¾Y Pè+ƒ ƒÄ¸HB ÃÌÌÌÌÌ‹‹‹Q‹D8…Àt ‹‹È‹BÿàÃÌÌÌÌÌÌÌU‹ì‹EVP‹ñè:w Ç0ÒA ‹Æ^] ÌÌÌÌéûv ÌÌÌÌÌÌÌÌÌÌÌU‹ì‹Eƒà‰A‹Iƒì#È„½ €} t j j 舃 ¾ öÁt5èø] ‹øEPMìÇE¼ÒA èGv h\B MìQ‰uø‰}üÇEì„ÒA èIƒ öÁt5è¾] URMì‹øÇE¤ÒA è v h\B EìP‰uø‰}üÇEì„ÒA èƒ è‰] MQMì‹øÇEŒÒA èØu h\B UìR‰uø‰}üÇEì„ÒA èÚ‚ ‹å] ÌÌÌU‹ì‹EVP‹ñè*v Ç<ÒA ‹Æ^] ÌÌÌÌU‹ìVW‹}W‹ñè v ÇxÒA ‹G‰F‹O_‰N‹Æ^] ÌÌÌÌÌÌU‹ìV‹ñèµu öEt VèŒv ƒÄ‹Æ^] ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌU‹ìVW‹}W‹ñè©u ÇxÒA ‹G‰F‹O_‰NÇ„ÒA ‹Æ^] U‹ì‹E…ÀtK‹ HB j P‹EPQè³W ƒøÿu3j hHB èœW Pè ƒÄ3À¤$ ŠˆHB ˆˆHB @„Éuï2À]ð]ÃÌÌÌÌÌÌÌU‹ìì ¡5B 3ʼnEü‹M¡HB iÉè V‹u•ìþÿÿRj ‰…üþÿÿj …øþÿÿPj Ç…øþÿÿ Ç…ìþÿÿ ‰ðþÿÿè$W ‰…ôþÿÿƒøÿtq…Àu^‹Mü3Íè• ‹å]ËHB ôþÿÿQhf@RèèV ƒøÿtA‹ôþÿÿ‹E;È}‹Á…Àt.j P¡HB VPè»V ƒøÿuèÛüÿÿºHB +Ðd$ Šˆ@„ÉuöƒÈÿ‹Mü3Í^è% ‹å]ÃÌÌÌÌV‹ñ‹…Àt Pè€ ƒÄÇ ^ÃÌÌÌÌÌÌU‹ì‹Eƒøuƒyr‹ ŠE‹Uˆ]Â
View all questions in Keil forum