e2Studio with CCRX compiler - Calculation of two independent CRC

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 5.2.0.020.

Any insights or advice would be greatly appreciated.

Thanks!

PD: I did the same question on: CRC option of RX linker - Forum - RX MCU - Renesas Engineering Community

Parents
  • You need to upgrade to calculate 2 or more CRC's. Only the CCRX compiler v3.05.00 or higher supports 2 or more CRC calculations. And you also need the latest version of e2studio 2024-1that supports the setup of multiple CRC's.

    Also keep in mind that it's possible that the CRC calculation during debug is not correct because some portions of the code are altered by the debugger. Only way to correctly test it, is by creating a release and hope for the best.

  • Hey there!

    Thanks for the responses, they've been really helpful.

    We recently upgraded to CCRX v3.06.00, and everything seems to be working smoothly. Unfortunately, upgrading the IDE isn't an option for us at the moment. However, we managed to resolve our issue by adding the "-crc" commands to the "Converter User-defined options (after)" section, allowing us to request the CRCs from the compiler.

    Now, I have a new question: I'm wondering if it's possible to dynamically calculate the address of a section using something like this:

    -crc=fffe0008=(uint32_t) __sectop ("PResetPRG")-((uint32_t) __sectop ("CRC_ADDR") - 1)/32-ETHERNET(ffffffff):LITTLE-4-0

    I've come across the "sectop" function in the CCRX user guide, which seems to be used for calculating the start address of a section.

    Additionally, I'm curious if there's a way to instruct the compiler to calculate two CRC types for the same range of memory.

    Can you provide some guidance on this?

    Thank you very muchGrinning!

Reply
  • Hey there!

    Thanks for the responses, they've been really helpful.

    We recently upgraded to CCRX v3.06.00, and everything seems to be working smoothly. Unfortunately, upgrading the IDE isn't an option for us at the moment. However, we managed to resolve our issue by adding the "-crc" commands to the "Converter User-defined options (after)" section, allowing us to request the CRCs from the compiler.

    Now, I have a new question: I'm wondering if it's possible to dynamically calculate the address of a section using something like this:

    -crc=fffe0008=(uint32_t) __sectop ("PResetPRG")-((uint32_t) __sectop ("CRC_ADDR") - 1)/32-ETHERNET(ffffffff):LITTLE-4-0

    I've come across the "sectop" function in the CCRX user guide, which seems to be used for calculating the start address of a section.

    Additionally, I'm curious if there's a way to instruct the compiler to calculate two CRC types for the same range of memory.

    Can you provide some guidance on this?

    Thank you very muchGrinning!

Children