Hello,
We are facing an issue where a CRC computation based on SPNA235 is implemented but while the implementation works using CCS, it fails when built using a custom cmake build system.
In the cmake version there are entries for the CRC in the map file, such as: crc_table_for_flash @ 00029020 records: 5, size/record: 24, table size: 128
.intvecs: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00000000, size=00000020, CRC=f190f57dca7724e1
.text: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00000020, size=00011b78, CRC=2e346f3ba662d44e
.const: algorithm=TMS570_CRC64_ISO(ID=10), load addr=0001eaf0, size=000020b8, CRC=beaac4588a28b9bd
FEE_CONST_SECTION: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00020ba8, size=000001a0, CRC=c0c0896ff0afc6ab
.cinit: algorithm=TMS570_CRC64_ISO(ID=10), load addr=00020d48, size=00000830, CRC=9c147b2df23421e6
And the values are correctly read by the code, however the computed CRC value does not match the expected when built using cmake.
We have checked the compiler options, and they are matching between the two build systems, --verbose_diagnostics -mv7R4 --code_state=32 --float_support=VFPv3D16 -me -g -O=4 --c99 --diag_warning=225 --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi -z -mSCO.map --heap_size=0x800 --stack_size=0x800 --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info=SCO_linkInfo.xml --rom_model)
One difference appears to be that the cmake system invokes the linker as part of the compilation using the -z option, however it is done as stated in the compiler manual as "armcl filenames [options] --run_linker [--rom_model | --ram_model] filenames
[options] [--output_file= name.out] --library= library [lnk.cmd]" So we are somewhat stuck troubleshooting this.