uploading new firmware and checksum


I use the sample ftp application, included as a thread, in my application to allow the uploading of new firmware images.

Tech support has since told me that this is a bad idea as it is not a robust solution with a checksum.

I am cusrious to see what other people are doing.


Dear bengaldave,

I would suggest doing something the effect of:

Acquire (via malloc()) a large enough buffer into which to copy the uploaded image. Typically, when compressed, a NET+OS image is around 1MB in size, although this is certainly variable.

Once the file has been copied into this buffer, use the image’s header to validate the image. Take a look at the blmain.c source and see what the boot laoder does to validate the application image.

Perfoming validation on a boot loader image is much more difficult as the image does not have any header so to speak, just a lot of assembly code. In this case I would suggest examining the boot loader’s rom.bin file, with a hex editor. The first several bytes will always be the same for a particular platform, i.e. the rom.bin for a Connect ME, Wi-ME, EM and Wi-EM will all look very similar. The boot image for a AMR9 platform will not look the same as for a ARM7, likewise the NET_50 may not look like the NS7520…hopefully you see where I am going with this.

Good Luck,