PDA

View Full Version : Question about startup processing



mynet43
11-15-2010, 12:32 AM
I have a customer that is requesting I do a validity check on the files I use to run on the Propeller. Something like an MD5 hash algorithm.

My program is designed to handle code updates by loading a binary program from an SD card and storing it in the 1st 32K of the eeprom. This works fine.

Here's my question. Does someone know if the boot loader does some kind of a checksum validation when it's loading a program from the eeprom? If so, this may satisfy my customer.

Thank you for your help.

Jim

localroger
11-15-2010, 12:41 AM
The bootloader does not perform a checksum when loading from EEPROM. It does perform one when accepting download data (programming RAM or EEPROM from the PropTool).

mynet43
11-15-2010, 12:54 AM
That's too bad. I was hoping it would do a checksum.

Has anyone dealt with this problem before on the Prop?

Right now I'm using the eeprom file, output from the Prop tool. I hope I don't have to generate a separate file with the hash key in it.

Thanks,

Jim

avsa242
11-21-2010, 01:12 PM
mynet43,

Check out the spin source for the software loaded on the ybox2 (a Propeller-based board from ladyada/Adafruit). The board has built-in ethernet; when you upload an image to it, the mini-web server returns the MD5 sum of the image. Maybe it will help.
http://svn.deepdarc.com/code/ybox2/trunk/firmware/

Cheers,
Jesse

mynet43
11-21-2010, 01:18 PM
Jesse,

Thanks for this info.

It sounds interesting. I'll check it out.

Jim