This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CRC option of RX linker

Is there any way to calculate  particular CRC-codes for different sections?

I like to use different CRC codes for boot section and for normal program memory.

for example:

CRC1 located at 0xFF7FFFFC for boot ROM (0xFF7FC000-0xFF7FFFFB)

CRC2 located at 0xFFFF0000 for program ROM (0xFFFF0002-0xFFFFFFFF)

Is there any linker option or subcommand to do this?

Thanks in advance for your aswers.

Best regards.

[locked by: Jef (SWF) at 5:56 (GMT 0) on 17 Mar 2024]
  • Hey,

    So I have used the on-board CRC before for a bootloadable project.

    What I did was use the on board CRC unit to calculate CRC-16 and also use the linker option to place the calculated CRC by the linker at a given location in memory. I chose CRC-16 because somehow that was the only one whose value matched to the on-board CRC calculation.

    If you are using e2Studio, then this should be available via the Renesas Tool Settings > Linker > Output > Advanced > Select whether to generate CRC Code : Yes (CRC-16, Automatic endian). This CRC-16 is the polynomial 0x8005. Specify the output address and the target range as " FFFE0000-FFFFBFFB ". This should add the option "-crc=FFFFBFFC=FFFF0002-FFFFFFFF/16" to the Converter options.

    I would recommend CRC only for the program ROM because it's not possible to reprogram the USER BOOT ROM while the MCU is running. Which would mean that you would have to consider the CRC for a separate project/ mot file.

    Let us know if this helps. Please note that the debug file generated will not load the CRC value at the location, but the output file generated will contain the CRC value at the location. You can verify this through the MOT file.

  • Hey everyone,

    I'm bringing this thread back up because I'm currently working on a project involving ClassB-certified software. The certifiers have requested us to provide separate CRC values for both ClassB software and the application. This means we need to precalculate two CRCs during compilation: one for the application and one for the ClassB software. These CRC values will be stored in designated memory sections (let's call them classB_CRC and app_CRC).

    During runtime, these CRC values will be calculated using the CRC-CCITT library and then compared with their respective precalculated values.

    Previously, when we only needed to precalculate one CRC, I followed the option suggested by : Renesas Tool Settings > Linker > Output > Advanced, and selected the CRC-CCITT(LSB) type.

    However, now that I need two independent CRC calculations, I'm unsure if it's possible. Has anyone encountered a similar situation or knows if this can be done?

    Just to provide some context, I'm using the CCRX compiler with an RX200 Family MCU, and my IDE version is e2studio

    Any insights or advice would be greatly appreciated.


  • Hello ,

    Thank you for bringing up your concern. Would you mind creating a new thread post instead ? Kindly also add the link of this thread for your reference. 



    If this response, or one provided by another user, answers your question, please verify the answer. Thank you!
    Renesas Engineering Community Moderators