I've implemented a BSL based on the SLAA600a code and application note. I'm currently trying to have the linker add the checksum for the code to the output file (currently the .d43 file). I'm using the lnk_msp430G2553_UART_1KB_App.xcl file. I've uncommented the following lines from the checksum calculation example at the bottom of the file:
-J2,crc16,,__APP16_Checksum_Code_s,APP16_Checksum,2,#0xFFFF=(CODE)_App_Start-_App_End
-g__APP16_Checksum_Code_s
What I'm trying to do is calculate the checksum starting at _App_Start and ending at _App_End and place the result in _App_Checksum. That looks like what the command should do. However, When I check the link map what I see is the following:
***************************************** *
* CHECKSUMS *
* *****************************************
Symbol Checksum Memory Start End Initial value
------ -------- ------ ----- --- -------------
__APP16_Checksum_Code_s 0x2b20 CODE C003 - C007 0x84cf (#0xffff)
CODE C00A - F7FF
__checksum 0x31ba CODE C000 - C001 0x0000 (#0x0000)
CODE C003 - C007
CODE C00A - F7FF
It appears that two checksums are being performed, the first on C003 to C007 and stored in C000 and the second on C00A to F7FF. CHECKSUM is located at C008 - C009. I don't understand where the address for CHECKSUM was defined, or how I can rearrange things to get the result I'm looking for. Any suggestions would be appreciated. Thanks.
Lee Thalblum