AnsweredAssumed Answered

checcksum calculation using IAR v6 and stm32

Question asked by lowpowermcu on Aug 6, 2011
Latest reply on Aug 11, 2011 by lowpowermcu
Dear STM32 users,

I want to add a checksum to my application in such way I can every let's say 100 seconds check the flash integrity using CRC.
I have found that IAR simplifies this task and can add at the final adress (or other specified locations) the CRC of the application.
I refer to the techical note 11927 Checksum calculation with IELFTOOL after linking with ILINK
and the provided examples:

I am following the steps in this tech note and I stuck here:
Add usage of the symbol __checksum in your application

In fact I don't understand what does mean "add usage of the symbol......"

When I declare it as following:
unsigned short __checksum;
I got thsi error message:
Error[Li006]: duplicate definitions for "__checksum"; in "C:\.....\checksum\Obj\main.o", and "Place holder __checksum"

When I declare it as following as done in the example provided by IAR:
extern unsigned short __checksum;
I got this error message:
ielftool error: The string '__checksum' was not found in the string table

Is there someone who can help me on this? and thank you in advance.

PS: I am using the IAR v6

MCU Lüfter