Assume that I have a binary file that contains:
uint32_t data[] = {
0x00000000, 0x11111111, 0x22222222, 0x33333333, 0x44444444,
0x55555555, 0x66666666, 0x77777777, 0x88888888, 0x99999999};
The IAR linker generates the checksum 55 1D 81 96, which srec_cat can replicate this way:
srec_cat data.srec -crop 0x00 0x28 -Bit_Reverse -CRC32BE 0x28 -Bit_Reverse -XOR 0xff -crop 0x28 0x2c -o - -hex-dump
Given the same data, the CRC32 accelerator (IEEE-802.3 style) in my target hardware generates F8 EE 40 0B, which srec_cat can replicate this way:
srec_cat data.srec -crop 0x00 0x28 -CRC32BE 0x28 -crop 0x28 0x2c -o - -hex-dump
I cannot change what the IAR linker has generated, nor can I change the algorithm that the hardware accelerator uses. Given that, is there a way to transform the IAR-style checksum (55 1D 81 96) post-facto into the IEEE-803.2-style checksum (F8 EE 40 0B)?
I've stared at it, and I don't see anything obvious. (If need be, I can use srec_cat to replace the IAR-style checksum with the IEEE-802.3-style checksum as a post-build step...)
No, there is no way to transform one of those CRCs to get the other. You have to compute the desired CRC on the message.
For reference, the first CRC is CRC-32/ISO-HDLC. The second is CRC-32/MPEG-2.