Hello!
I want math map file with firmware version. I add crc_table keyword to linker cmd file. crc_table in memory contains crc_value field. This field contains 64 bit value. .map file & xml.file contains 32bit value. Where is error?
===============C code=======
extern CRC_TABLE crc_table; uint64_t get_flash_crc(void) { uint64_t i; uint64_t res = 0; for (i = 0; i < crc_table.num_recs; i++) { uint64_t val=crc_table.recs [i].crc_value; // res ^= val; printf("crc_val=0x%016llX\r\n", val); } return res; }
=============C code output======
crc_val=0x19F7FE3ECAD7EC6C
crc_val=0xE1EA649C3D1C4B81
crc_val=0xFAE17A96B265E31C
crc_val=0x00743C1800000000
crc_val=0x81E7E980829E2267
crc_val=0xDD2252DE85854DB9
crc_val=0x97D8C51F44450053
=======map file======
LINKER GENERATED CRC TABLES
crc_table @ 00052658 records: 7, size/record: 24, table size: 176
.intvecs: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00020000, size=00000020, CRC=00000000cad7ec6c
.kernelTEXT: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00020020, size=0000438c, CRC=000000003d1c4b81
.cinit: algorithm=TMS570_CRC64_ISO(ID=10), load addr=000243b0, size=000002e0, CRC=00000000b265e31c
.FLASH_STATE_PTR: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00028000, size=00000004, CRC=0000000000000000
.text: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00028008, size=00029234, CRC=00000000829e2267
.const: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00051240, size=00001404, CRC=0000000085854db9
.FLASH_STATE: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00052648, size=0000000c, CRC=0000000044450053
==========xml file=======
<crc_table_list>
<crc_table>
<name>crc_table</name>
<crc_rec>
<name>.intvecs</name>
<alg_name>TMS570_CRC64_ISO</alg_name>
<alg_id>0xa</alg_id>
<load_address>0x20000</load_address>
<load_size>0x20</load_size>
<crc_value>0xcad7ec6c</crc_value>
</crc_rec>
<crc_rec>
<name>.kernelTEXT</name>
<alg_name>TMS570_CRC64_ISO</alg_name>
<alg_id>0xa</alg_id>
<load_address>0x20020</load_address>
<load_size>0x438c</load_size>
<crc_value>0x3d1c4b81</crc_value>
</crc_rec>
<crc_rec>
<name>.cinit</name>
<alg_name>TMS570_CRC64_ISO</alg_name>
<alg_id>0xa</alg_id>
<load_address>0x243b0</load_address>
<load_size>0x2e0</load_size>
<crc_value>0xb265e31c</crc_value>
</crc_rec>
<crc_rec>
<name>.FLASH_STATE_PTR</name>
<alg_name>TMS570_CRC64_ISO</alg_name>
<alg_id>0xa</alg_id>
<load_address>0x28000</load_address>
<load_size>0x4</load_size>
<crc_value>0x0</crc_value>
</crc_rec>
<crc_rec>
<name>.text</name>
<alg_name>TMS570_CRC64_ISO</alg_name>
<alg_id>0xa</alg_id>
<load_address>0x28008</load_address>
<load_size>0x29234</load_size>
<crc_value>0x829e2267</crc_value>
</crc_rec>
<crc_rec>
<name>.const</name>
<alg_name>TMS570_CRC64_ISO</alg_name>
<alg_id>0xa</alg_id>
<load_address>0x51240</load_address>
<load_size>0x1404</load_size>
<crc_value>0x85854db9</crc_value>
</crc_rec>
<crc_rec>
<name>.FLASH_STATE</name>
<alg_name>TMS570_CRC64_ISO</alg_name>
<alg_id>0xa</alg_id>
<load_address>0x52648</load_address>
<load_size>0xc</load_size>
<crc_value>0x44450053</crc_value>
</crc_rec>
</crc_table>
</crc_table_list>