This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Verifying an image in flash

I am looking for some sample code if anyone has some.  My plan is to use hex2bin to generate an application binary to burn to flash with a checksum.  My boot loader will iterate over the image in flash and if valid load it.  I would like to know if anyone has tried this approach and if there were any issues?  I am using the F28335 chip.  The questions that come to my mind are:

1.  How do I know when I come to the end of the file?

2.  How do I know where the checksum is?

 

I believe that my first test would be to use a flash burning utility and try the binary file generated by hex2bin and verify that it runs.  After that I need to implement the image validity check.  The image will be loaded to 0x300000 so I should start there and iterate to end of file. 

 

Thanks for your help.

  • Christopher,

    Something that might help:  The latest C28x compiler (6.0.1) has the ability to embed the CRC for load sections you specify into your out file.  The CRC polynomials are fixed, though, so your check algo would need to change to use the same polynomial. It may also mean trying a newer compiler than you are currently using.

    This feature is documented in www.ti.com/lit/spru513 (assembly tools reference guide).

    Regards,

    Lori