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.

crc_table linker command example for MSP430?

Other Parts Discussed in Thread: MSP430F2619, TMS320F28335

I can not get the crc_table linker function working for the MSP430 using CCS 6.0

I have read the documentation thoroughly and tried the examples.

When I add crc_table command to the base linker script i get this error even though I am creating an executable file.

"../lnk_msp430f2619.cmd", line 110: warning #10351-D: crc_table(_crc_table) operator ignored:  linker will only generate a CRC table when creating an executable file

I would like to see a full example that compiles and links.

Thanks

  • If you take out the crc_table linker directives, does it build an executable file?

  • Yes, It does build and load onto the msp430. I used the the CCS 6.0 MSP430 project template and added the crc_table operator.

    I would like to see any example that does build.

    Thanks
  • I tried to reproduce ...

    Theodore Witkamp said:
    "../lnk_msp430f2619.cmd", line 110: warning #10351-D: crc_table(_crc_table) operator ignored:  linker will only generate a CRC table when creating an executable file

    and I cannot.  Please send in your project.

    Thanks and regards,

    -George

  • I am using the TMS320F28335 and not the MSP430, so I am not sure if there is a difference.

    I add the crc_table linker directive right after the LOAD_SIZE() directive, i.e.

    codestart : > BEGIN,
    PAGE = 0,
    LOAD_SIZE(_codestart_loadsize),
    crc_table(_crcTableList, algorithm=CRC32_PRIME)

    I did that for each of the sections that required a CRC.

    A command at the end of the command file defines where to put the  CRC table in flash, i.e 

    .TI.crctab: > FLASHH 

    The main.c defines the following extern:

    extern CRC_TABLE crcTableList;

    Does your code and linker command file have something similar?

    Stephen

  • send your complete linker script
  • This part of the error diagnostic is correct ...

    Theodore Witkamp said:
    crc_table(_crc_table) operator ignored

    This part is not ...

    Theodore Witkamp said:
    linker will only generate a CRC table when creating an executable file

    You didn't get a CRC table because your application code makes no references to the symbol created by the crc_table operator.  Here is the relevant line from your linker command file (also known as a linker script) ...

       .crcsec	: {main.obj(.text)} crc_table(_crc_table) > FLASH
    

    The symbol "_crc_table" gets created.  Note that, since you build for the newer EABI, you do not need the leading underscore to be able to use the name "crc_table" in the C code.  Write that symbol name the same way in the linker command file and in the C code.

    When you build a more substantial example, you will of course refer to the symbol created with the crc_table() operator, and thus you won't see this problem.

    As an aside, the 4.4.x tools do not generate that misleading diagnostic.

    As for an example to build from ... Look at the Appendix titled CRC Reference Implementation in the MSP430 assembly tools manual.

    Thanks and regards,

    -George

  • It still does not work. Here is a summary of my changes and the linker error.

    .text : {} crc_table(crctable) > FLASH /* CODE */

    .TI.crctab : > FLASH

    "../lnk_msp430f2619.cmd", line 110: warning #10351-D: crc_table(crctable) operator ignored: linker will only generate a CRC table when creating an executable file
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    crctable ./main.obj

    I have also attached the updated project.

    5706.crc.zip

    thanks

  • The CRC feature in the linker is introduced in compiler version 4.4.x.  So, your example project does not work with the 4.3.x version compilers, but it does work with 4.4.x version compilers.  Because this is misleading, I filed SDSCM00051544 in the SDOWP system to have the 4.3.x version linker issue an error diagnostic whenever it sees the crc_table operator.  Feel free to follow that issue with the SDOWP link below in my signature.

    Thanks and regards,

    -George