I use the following in my code… I checksum the individual sections… Be aware that the “X” architecture can create a few issues so care has to be taken what the address space is… there is also another section that the compiler creates for the stubs needed to access code across the 64k boundary…
In the project under checksum you need to enable checksumming of these sections. (CODE,ISR,CONST)
/* Symbols generated by the linker for the CHECKSUM section */
extern checksum_info __begin_CHECKSUM;
/* Symbols generated by the linker to delimit the CODE and CONST sections */
extern unsigned char __begin_CODE, __end_CODE; /* crossworks documentation had variable incorrectly as __start_CODE */
extern unsigned char __begin_ISR, __end_ISR; /* crossworks documentation had variable incorrectly as __start_ISR */
extern unsigned char __begin_CONST, __end_CONST; /* crossworks documentation had variable incorrectly as __start_CONST */
/* Symbols generated by the linker for the CODE and CONST checksums */
extern unsigned int __checksum_CODE, __checksum_CONST, __checksum_ISR;
unsigned int Calc_checksum_CODE;
unsigned int Calc_checksum_ISR;
unsigned int Calc_checksum_CONST;
Calc_checksum_CODE = __checksum_crc16(__begin_CODE, __end_CODE);
Calc_checksum_ISR = __checksum_crc16(__begin_ISR, __end_ISR);
Calc_checksum_CONST = __checksum_crc16(__begin_CONST, __end_CONST);