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.
Hi everyone.
Can some body explain to me how the bootloader works?
i use the tiva launchpad at the moment and i want to know if it is possible for the bootloader to compare between and old file and the file that is installed in the microcontroller before running it.
thanks!!
The Tivaware Bootloader User Guide will explain to you it works...http://www.ti.com/litv/pdf/spmu301
If you are using a flash based boot loader, you will have to modify the softare to perform a compare between a new and old file. The ROM boot loader does not do a compare.
Lela
I do not think the Tivaware Bootloader User Guide is applicable in most cases. The is another Tivaware Bootloader that in embedded in ROM. TI calls almost everything Tivaware.
I do not think the Tivaware Bootloader User Guide is applicable in most cases. There is another Tivaware Bootloader that in embedded in ROM. TI calls almost everything Tivaware.
Thanks for your reply lela,
but is there any exemple i can be inspired of? I would like to upload my code by saving it in an sd card. The bootloader will make a comprison between the new and the old code to make sure they are different before loading the new one.
Does my idea havee a sense?? i already read the Tivaware Bootloader User Guide and i am a little bit confuse
thanks
It makes sense what you are trying to do...
We do not have a ready to go example that will do this. However, you should be able to use source code from a couple examples and then add your own modifications to add the compare portion. The steps I would take to minimize developing code from scratch is:
1.) Download software,SW-EK-LM4F232: EK-LM4F232 Firmware Development Package at http://www.ti.com/tool/sw-tm4c. This development kit will have the best examples for you to start with.
2.) The relevant examples are:
boot_serial (this uses UART, but is easily changed for SSI) Loads at 0x0 in flash memory.
boot_demo1 or 2 (This demonstrates call back to boot loader) Loads at 0x2800
sd_card (this demonstrates reading from SD card and use of FatFs.)
3.) The project will consist of a flash based boot loader located at 0x0, the application code at 0x2800, and then the file on the SD Card. I recommend the following modifications:
boot_serial - change config.h to use SSI instead of UART. Add code to do a check sum or use CRC API to come up with a value to compare against a value stored on the SD card. Add code for SD Card use, cut and paste from sd_card example. Use check sum or CRC value to determine to reload image from SD card or call application.
boot_demo1 or 2, cut and paste in your own application call leaving the call back to boot loader. Change call back to SSI.
In the User Guide for Driverlib, you will find there are 5 API for CRC. CRCDataProcess() will return a CRC result.
User Guide for Driverlib is at: http://www.ti.com/litv/pdf/spmu019p for more information on the CRC API's.
Lela
Lela,
In the driverlib doc for CRCDataProcess, the data length argument says:
ui32DataLength is the number of data items that are processed to produce the CRC
I assume this means that it will process that number of bytes if the config is set to CRC_CFG_SIZE_8BIT and will process that number of words if the config is set to CRC_CFG_SIZE_32BIT, is that correct?
Thanks,
Mike
Hello Mike,
Yes, that is correct. It would be number of bytes when in 8 bit mode and number of words in 32-bit mode
Regards
Amit