Tool/software: TI C/C++ Compiler
My application requires a boot loader.
I have two separate code areas that I want to calculate a CRC checksum on (CRC32_PRIME), FLASH_BOOT0 & FLASH0 and record the CRC checksum in two separate areas defined as CRC_TABLE_BOOT , CRC_TABLE_CODE.
How do i do this ?
I will then require the TMS570LS.. to perform a CRC on the two code Flash areas and compare the static checksums to the calculated checksums.
Have referenced other similar postings but cant quite grasp the command structures.
If you can provide a Function to calculate the (CRC32_PRIME) to compare against the Static Flash CRC would also be of great assistance.
MEMORY
{
CRC_TABLE_BOOT (RX) : origin=0x00003000 length=0x00000100 fill=0xFFFFFFFF // sect0, 256 bytes
CRC_TABLE_CODE (RX) : origin=0x00003100 length=0x00000100 fill=0xFFFFFFFF // sect0, 256 bytes
FLASH_BOOT0 (RX) : origin=0x00004000 length=0x00008000 fill=0xFFFFFFFF // sect1,2 - 16k,16k length = 0x8000, 32,767 bytes
FLASH0 (RX) : origin=0x00040000 length=0x00060000 fill=0xFFFFFFFF // sect 8,9,10 - Main Code Space 128K x 3 (393,215 bytes)
}
SECTIONS
{
/* calculate CRC for FLASH_BOOT0 and place the CRC table in CRC_TABLE_BOOT */
.data_2b_checked_boot:{ FLASH_BOOT0 } crc_table(flash_boot_crc_table_boot) > CRC_TABLE_BOOT // error this doesn't work
/* calculate CRC for FLASH0 and place the CRC table in CRC_TABLE_CODE */
.data_2b_checked_code:
.text : {} > FLASH0
.const : {} > FLASH0
.cinit : {} > FLASH0
.pinit : {} > FLASH0
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
}