Hi Leighton As you are now aware the Philips ISP generate the check sum during download. However there may be some more issues here to consider. 1. The checksum is used by the boot to check whether there is user code in the FLASH. If the check is not good the boot code stays in ISP mode thus allowing an update. The value must be correct otherwise the (user) code will never start. 2. The validity of the check sum says nothing about the validity of the program. A bad program can crash as soon as it starts and the boot software is stuck. It will always start the bad code and this will always crash - to get out of this loop the only way is to hold the ISP pin input low on reset. 3. Also the download of a good software is not fool proof. If the download is interrupted before it is complete you effectively get situation 2. 4. An improvement of the Philips ISP loader would be to load the application coded first and the vector tables with check sum (validity) as very last job. This would avoid 2 occuring when interrupting a download in 99,99% of the casees (exception is interrupting as the vactor table exactly then when it is being programmed...) Cheers Mark Butcher www.mjbc.ch PS I have an encoded signature over the user program which is verified before the application allows itself to start (security requirement). Important to note is that this technique requires about 32k of the code space just for this feature - is it worth it in most applications? Code can be used from OpenSSL project... --- In lpc2000@yahoogroups.com, "Leighton Rowe" <leightonsrowe@y...> wrote: > > Is it true that Phillips ISP does the checksum calculation before > programming the vector code into flash? > > I notice the .hex files that I'm making (using IAR's software) > doesn't contain the calculated checksum (0x14)for the vector code. > It's usually filled with 0's (without the fill option). > > Is there's a way for me to generate the vector checksum in the 0x14 > space of the hex file?
Message
Re: Vector Checksum not generated in .hex file
2005-01-07 by Mark Butcher
Attachments
- No local attachments were found for this message.