This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to generate the XLINK linker checksum for MSP430F2272?

Hi,

I have tried to generate the Checksum using Linker file and using Software calculation(Fast and Slow 16bit CRC). I used Polynomial as 0X11021 and 0X1021. But the linker CRC and the Software CRC is not matching. I want to know how the linker is calculating the Checksum. is it calculating the checksum for entire memory location(CODE=8002-FFDF, INTVEC=FFE0-FFFF, RESET=FFFE-FFFF), since I am placing the checksum in the beginning -Z(CONST)CHECKSUM=8000-8001.

_______________________________________________________________________________________

Since my ROM memory range is from 8000-FFFF

-Z(CONST)DATA16_C,DATA16_ID,TLS16_ID,DIFUNCT=8002-FFDF
-Z(CONST)CHECKSUM=8000-8001// Placing the Checksum at the beginning

-Z(CODE)INTVEC=FFE0-FFFF
-Z(CODE)RESET=FFFE-FFFF

________________________________________________________________________________________

I have tried like the example code given in www.iar.com/.../ link also

________________________________________________________________________________________

And i have called the function for both slow and fast like mentioned below,

unsigned short sum=0;

sum = fast_crc16(sum,(unsigned char *)0x8002, 0xFFDF-0x8002+1);
sum = fast_crc16(sum,(unsigned char *)0xFFFE, 2);

sum = fast_crc16(sum,(unsigned char *)0x8002, 0xFFFF-0x8002+1);

sum = fast_crc16(sum,(unsigned char *)0x8002, 0xFFDF-0x8002+1);

sum = fast_crc16(sum,(unsigned char *)0x8002, 0xFFDF-0x8002+1);
sum = fast_crc16(sum,(unsigned char *)0xFFE0, 0xFFE0-0xFFFD+1);
sum = fast_crc16(sum,(unsigned char *)0xFFFE, 2);

sum = fast_crc16(sum,(unsigned char *)0x8002, 0xFFDF-0x8002+1);
sum = fast_crc16(sum,(unsigned char *)0xFFE0, 0xFFE0-0xFFFF+1);

__________________________________________________________________________________________

The linker generating CRC and the software generating CRC is not getting match. I need support regarding this issue. 

The same issue was already posted in MSP430 Low Power Microcontrollers Forum, i got suggested to post the same in C/C++ Compiler forum. The details of the issue faced is available in the below mentioned link. https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/500370/1826014#pi316701filter=all&pi316701scroll=false

 

Regards,

Benita.C