Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Tue Apr 26, 2005 4:21 am |
|
|
Taken from ReadMe.txt in the CCS directory:
Quote: |
A new preprocessor directive has been added to make serial numbers easier
to implement. This new feature only works with the CCS ICD units. It is
implemented by inserting comments in the hex file that the ICD.EXE program
understands.
#serialize(id=xxx, file="filename.txt", listfile="filename.txt",
prompt="text", log="filename.txt", next="xxx")
id=xxx Specify a C CONST identifier, may be int8,int16,int32 or char array
Use only one of the next three options:
file="x" The file x is used to read the serial number from, and this
file is updated by the ICD programmer. It is asumed this is
a one line file with the serial number. The programmer will
increment the serial number.
listfile="x" The file x is used to read the serial number from, and this
file is updated by the ICD programmer. It is asumed this is
a file one serial number per line. The programmer will read the
first line then delete that line from the file.
next="x" The serial number X is used for the first load, then the hex file
is updated to increment x by one.
prompt="text" This option is optional. If specified the user will be prompted
for a serial number on each load. If used with one of the above
three options then the default value the user may use is picked
according to the above rules.
log="xxx" A file may optionaly be specified to keep a log of the date, time,
hex file name and serial number each time the part is programmed.
If no id=xxx is specified then this may be used as a simple log
of all loads of the hex file.
|
|
|