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.

AISgen With Enable CRC Question

Hi,

I am using C6745 and AISgen D800K003.  Currently, I am able to boot my application from SPI0 flash.  Now I am ready to add the CRC checking in the bootloader to check the AIS image integrity stored in flash before jump into the main app.  I read 'Using the OMAP-L1x7 Bootloader SPRAB04D' application report.  I am interest in the build-in 'Enable CRC' feature but my sample application bootloader does not have this CRC checks it against the expected value from AIS.  I attached my bootloader write_flash.c for reference.  In the StartMainApp(), AIS_OP_crc cases are noop.  Please point me to a bootloader sample code that take advantage of the AIS CRC enable.

Thanks a lot,

Dennis

  • Dennis,

    How are you generating your AIS files?  The AISgen utility (found in the ZIP file associated with the bootloader app note) can easily create AIS files with CRC enabled.  It's as simple as toggling a checkbox.  If you're using some other method to create your AIS files and want an example that uses CRC, I would recommend generating one using the AISgen tool.

    Hope this helps.

  • Hi Joe,

    I have no problem to generate AIS with 'Enable CRC'.  If I do, my team will be in big trouble.  My question  was on the bootloader sample code side.  The application bootloader read the AIS generated binary file and check for the CRC data.  The provided/attached application bootloader sample code (that I get from TI previously) does not handle the AIS binary files with CRC enable.  I need the TI sample code that can.

    Thanks,

    Dennis

  • We may have misunderstood your issue. Usually, the AISgen data is loaded by the ROM bootloader, which has the capability to do the CRC checks.

    Are you implementing a secondary bootloader and you want that secondary bootloader to also read an AISgen-generated data file and handle the CRC checks within the secondary bootloader?

  • RandyP said:

    Are you implementing a secondary bootloader and you want that secondary bootloader to also read an AISgen-generated data file and handle the CRC checks within the secondary bootloader?

    Yes.  The DSP ROM bootloader will execute the secondary bootloader that stored from SPI flash address 0.  My question is about the sample secondary bootloader that I got from TI.  The secondary bootloader will allow firmware upgrade.  Also, I would like to check the CRC when the secondary bootloader copy the application AIS file stored on SPI flash 0X20000.  The secondary bootloader sample I got has the switch cases for the CRC checkng but there is no data handling on those cases.  My guess is TI has the sample code in later version that has the CRC checking.

    Thanks,

    Dennis

  • Dennis,

    It looks like your secondary bootloader is based on the sample source file that comes with the UART boot host utility, AIS_Util.cs.  Is that correct?  If so, then you should note that the sample code was originally intended to implement an external boot master, not a secondary bootloader.  In other words, it represents the boot process from the perspective of an external device managing the boot process while the ROM bootloader runs in a slave boot mode, such as UART boot.  There are some pieces missing if you want to use the code as a starting point for a secondary bootloader.  You can find a sample implementation of the CRC algorithm in the text of the bootloader app note PDF (see Appendix C).

  • Joe,

    Joe Coombs said:
    It looks like your secondary bootloader is based on the sample source file that comes with the UART boot host utility, AIS_Util.cs.  Is that correct?

    No.  We got the secondary bootloader from TI in previous project.

    Joe Coombs said:
    You can find a sample implementation of the CRC algorithm in the text of the bootloader app note PDF (see Appendix C).

    It is more complicated than the Appendix C.  AISgen generates CRC values and appends to different records.  My AISgen files with CRC enable has 196 extra bytes (49 32-bit CRCs).  TI has this information but it is not documented anywhere I can find.  This is my question in the first place.

    I will look at AIS_Util.cs to see.

    Thanks,

    Dennis