EWARM 5.xx doen not, to my knowledge, support calculating a CRC the way the STM32 peripheral does. I've heard that this is coming but then so is Christmas.
IAR does supply the source code for ielftool so you could make the modifications yourself. I chose to write my own program that works on .bin files instead. I've developed a header structure that includes CRC's (header + code) but its a commercial product so I can't share it. That said its not hard to come up with such a header. However if you want the header at the start of your image it'll conflict with the ARM exception vectors. Those (except for reset, initial SP) can be moved however.
Please don't write like that: it suggests that ''Checksum'' and ''CRC'' are equivalent or interchangeable terms - they are not!
Checksums and CRCs are entirely different things.
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Nice application note except that it won't help. ielftool calculates checksums on a byte-by-byte basis. The STM32 CRC peripheral does so on a 32-bit word basis. You'll never get IAR's checksum to match ST's even if you set all the other parameters (polynomial, bit-order, initial value etc) correctly.
Perhaps you'd like to share the exact setup in the ''Checksum'' tab of IAR. I take it the resulting value matched that generated by the STM32 CRC generator over the same memory range.
With version 6.10 it works with the tool settings for checksum calculation.
Check Fill unused memory, use 0xFF
Generate checksum 4 bytes, Alignment 4, CRC32 Complement: As is Bit order: MSB first Check the ''Reverse byte order within word'' flag. Initial value: 0xFFFFFFFF, uncheck ''Use as input'' And of course, do not forget to set the start and end addresses. Have fun, Dreeke