PRINT ( "Error writing to CurrentSerialNumber.txt\n" ) SERIAL_NUMBER := FORMAT ( serial, "%i" ) Read the previous serial number from the file. Wait for the file lock to become available. PRINT ( "Error opening CurrentSerialNumber.txt\n" )
#Charvel serial numbers beginning how to
An example of how to increment a serial number held in a file.įOPEN ( "CurrentSerialNumber.txt", "r+" )( file ) ProgSerNo // Program the new serial number into EEPROM. NEW_SERIAL_NUMBER // Set up the global variable SERIAL_NUMBER. It is generally a good idea to put serial number functions at the end of your TEST LIST, so that you can be sure the board has passed the tests before assigning it a serial number. The function NEW_SERIAL_NUMBER is just an XJEase test function from the XJEase project file – it must also be listed in the TEST LIST section of the project preamble. Using this name lets XJRunner know when a new serial number has been generated, so that it can log the value of the variable SERIAL_NUMBER. If XJEase will be generating the serial numbers, it must do so in a function with the name NEW_SERIAL_NUMBER. We will now look at this option in more detail.
#Charvel serial numbers beginning serial numbers
Just as XJRunner can generate serial numbers and pass them to XJEase for programming into the board, XJEase can generate serial numbers and pass them back to XJRunner for logging. Using a barcode reader, the tester can input these into XJRunner. If more complex board identifiers are needed, such as MAC addresses, there are two other options:įor example, the boards may have a barcode with their serial number. XJRunner can generate simple incrementing serial numbers with a prefix and/or suffix, such as the range SN0001B – SN9999B. In XJRunner, the Serial Number tab of the Project Manager provides three ways of generating serial numbers. There are two aspects of handling serial numbers: Serial numbers (or other unique board identifiers) are passed between the XJEase code and XJRunner using the built-in global string variable SERIAL_NUMBER. This application note describes how these should be handled by the XJEase code. XJRunner can generate / read and log unique board identifiers during testing, such as serial numbers and MAC addresses. XJDirect - Programming on-chip flash in your processor.