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.

Linker Scripe Usage(write CRC, Firmware size)

Other Parts Discussed in Thread: TMS570LC4357

I use TMS570LC4357 Chip. The code use as followes,

1. 0x00000000 ~ 0x000FFFFF (Bank 0) : boot loader

2. 0x00100000 ~ 0x001FFFFF (Bank 0) : Version Up code

3. 0x00200000 ~ 0x002FFFFF (Bank 1) : Active code (Normal act)

In initial firmware(download with debugger), I want to check Initial firmware consistency.

So, is it possible to write CRC and Size write in Specific Address in build time(maybe using linker scripe)?

The actual code start at 0x00200100. I want to write the CRC and Firmware size in 0x00200000.

Regards,

Minwoo

  • Hi Minwoo,

    Yu can use Linker CMD to calculate the CRC for the sections: .intvecs, .text, .const, etc. Each section has one CRC value. 

    You can calculate the CRC for the whole image after the application image is loaded to 0x200100, then program the CRC to 0x00200000. The device has a HW CRC module.

  • Hello QJ Wang,

    Thanks for your answer.

    You means that If i want to get whole image CRC, I must run the application image of 0x200100(Start addr).?

    Regards,

    Minwoo

  • Hi Minwoo,

    No, you don't need to run the image at 0x200100.

    1. You can use the web-tool to calculate the CRC of your application image before loading to the target flash. This CRC value will be used as pre-determined golden value.

    or

    1. Load the application image to target flash first, and calculate the CRC of the image in your bootloader (using SW or CRC HW module) and store the calculated CRC to flash or EEPROM as the predetermined CRC value

    2. Next time, when the device is reset, the bootloader calculate the CRC of the image using CRC HW module and compare the value with the predetermined the CRC value which is stored in flash or EEPROM.

  • Thanks for your answer. It is very helpful to me.

    Regards, Minwoo