SPRU513Y August 2001 – June 2022 SM320F28335-EP
CRCs over memory ranges are stored in a table format similar to that shown in Section 9.10.1.3 for the CRCs over sections. However, the table format is different than that of CRC tables.
The following figure shows the storage format for CRCs over memory ranges with example values:
The table header stores the record count and size, as well as the algorithm type and the CRC result. Each table entry encodes the start address and length of a memory range that was used to compute the CRC.
The following header file excerpt shows the C structures the linker creates to manage the CRC information:
typedef struct memrange_crc_record {
uint16_t page_id; /* page number of data */
uint16_t padding; /* pad for next 32-bit value */
uint32_t addr; /* starting address */
uint32_t size; /* size of data in 16-bit addressable units */
} MEMRANGE_CRC_RECORD;
typedef struct memrange_crc_table {
uint16_t rec_size; /* 16-bit addressable units */
uint16_t num_recs; /* how many records are in the table */
uint16_t crc_alg_ID; /* CRC algorithm ID */
uint16_t padding; /* pad for next 32-bit value */
uint32_t crc_value; /* result of crc */
MEMRANGE_CRC_RECORD recs[1];
} MEMRANGE_CRC_TABLE;