Calculating CRC32 as commonly calculated online
Technical Note 191210
3/12/2020 2:16 PM
This Technical Note shows how to calculate CRC32 with IAR Embedded Workbench for Arm using the most common CRC32 algorithm as used by online CRC calculators.
For example, with the following online CRC32 calculators the input data 0x01 0x02 0x03 0x04 gives the result 0xB63CFBCD:
Note that the CRC32 example project in Technical Note 45456 gives a different result compared to the online CRC calculators.
To get the same result as the online CRC calculators with
ielftool.exe, these are the relevant settings in the options page Project>Options>Linker>Checksum :
- Use as input must not be selected
- Complement must be set to 1’s complement (XOR with -1)
- Bit order must be set to LSB first (use mirroring)
See example project crc32std_ewarm_7804.zip (created with IAR Embedded Workbench for Arm version 7.80.4).
Online CRC calculators
See the following screenshots from the three online CRC-calculators:
It is possible to calculate CRC32 with IAR Embedded Workbench for Arm using the most common CRC32 algorithm as used by online CRC calculators.
All product names are trademarks or registered trademarks of their respective owners.