Rich Bair

Checksum Help

Discussion created by Rich Bair on Sep 5, 2006
Latest reply on Sep 7, 2006 by CompilerGuru
Currently, I'm using the automatic method to have the linker calculate checksums.  I'm concerned for two reasons:
1)  Notice that I'm using banked and I have a ROM_FLASH sector.  This is an area inteneded for saving variables that may indeed change.  As it is READ_ONLY is the linker using this area?  Can I mark it to not be used.  Also, the linker ignores any area in a segment that uses the default fill value defined for that segment, right?
2) I have this:  while (__CHECKSUM_IS_OK == FALSE) {} the beginning of my program to ensure all is well or reset and try again.  My "end game" is to display a 4 hexadecimal character checksum through the UI.  How do I access the structure to report this informatio to the user who might call in to service and need to report the version of firmware they are running, etc.
/* This is a linker parameter file for the MC9S12E128 */NAMESENDSECTIONS      /* List of all sections specified on the "Build options" tab */      RAM        = READ_WRITE 0x002000 TO 0x003FFF FILL 0xAA 0x55;   /* unbanked FLASH ROM */      ROM_FLASH  = READ_ONLY  0x3E8000 TO 0x3E83FF FILL 0x00;      ROM_4400   = READ_ONLY  0x004400 TO 0x007FFF FILL 0x3F;      ROM_C000   = READ_ONLY  0x00C000 TO 0x00FEFF FILL 0x3F;   /* banked FLASH ROM */      PAGE_38    = READ_ONLY  0x388000 TO 0x38BFFF FILL 0x3F;      PAGE_39    = READ_ONLY  0x398000 TO 0x39BFFF FILL 0x3F;      PAGE_3A    = READ_ONLY  0x3A8000 TO 0x3ABFFF FILL 0x3F;      PAGE_3B    = READ_ONLY  0x3B8000 TO 0x3BBFFF FILL 0x3F;      PAGE_3C    = READ_ONLY  0x3C8000 TO 0x3CBFFF FILL 0x3F;      PAGE_3D    = READ_ONLY  0x3D8000 TO 0x3DBFFF FILL 0x3F;ENDPLACEMENT      SSTACK, DEFAULT_RAM             INTO RAM;      CHIMERA_FLASH                   INTO ROM_FLASH;      DEFAULT_ROM                     INTO ROM_4400, PAGE_3C, PAGE_3D, PAGE_38, PAGE_39, PAGE_3A, PAGE_3B;      RTOS, _PRESTART, STARTUP,      ROM_VAR, STRINGS,      NON_BANKED, COPY, .checksum     INTO ROM_C000;ENDINIT _EntryPoint   /* The entry point of the application. This function is generated into the CPU module. */STACKSIZE 0x0200