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.

RM48L952: Difference in computed CRC value between build systems

Part Number: RM48L952

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.

  • Hi Soren,

    Can you add the linker file to the link option?

    --run_linker your_file.cmd

  • The cmake system is working fine otherwise and is used for prodction code, except for the issue with CRC values compared to the CCS build there has been no indication of any issues with this.

    The linker file is of course added to the build command, the full build instruction in cmake looks something like this "COMMAND ${CMAKE_C_COMPILER} ${CMAKE_ELF_LINKER_FLAGS} $<TARGET_OBJECTS:SCO_APPL> --library=${COMPILER_LINK_FILE} -l${COMPILER_LINK_LIB} -l${LIBRARY_LINK_LIB} -o${APPL_NAME}.elf"

    With --library=${COMPILER_LINK_FILE} representing the link options file.

  • Ok, we have found the issue now, there was a slight discrepancy in code generation between the two builds.