111 of 158
105 6.5 Setting Device Options By default, the compiler generates code for the ZX-24 device. The target device may be changed either by adding a command line option to your project file or by adding a compiler directive to the first module to be compiled (usually the one containing the Main() routine). Alternatively, you may specify the target device by using the “Device Options…” entry on the Options menu. The resulting dialog contains a combobox with entries for the supported devices. This dialog can also be used to update the firmware in your device or, for some ZX models, to set configuration parameters like the Program Memory EEPROM characteristics or external RAM configuration. 6.6 Updating Device Firmware The VM-mode ZX devices have firmware is designed to be field-upgradeable. This allows the control program to be updated with newer versions as enhancements are made and problems are fixed. An update can be installed in a VM-mode ZX using the “Device Options...” entry on the Options menu. This will bring up a dialog that will allow you to navigate to and select the specially formatted firmware update file (typically with .zvm extension). Prior to using the file’s contents to update the ZX firmware, the file is checked to ensure that it contains a valid update image. Note, particularly, that separate update files are provided for each ZX model. You must be certain that you use the correct update file for the ZX device being updated. The filenames of the update files indicate the target ZX device and the firmware version number. Additionally, the first few lines of the update file contain the same information. The update files are standard text files and may be viewed by any text file viewer. To perform a normal firmware update the ZX must be powered up and must be connected to your PC by a serial cable. On the 24-pin ZX devices, during the update process the red LED will be illuminated continuously and the green LED will blink at a rate of about twice per second. Note that since the LEDs are also connected to pins 25 and 26, if you have circuitry connected to those pins that would be adversely affected by the LEDs being activated you will want to turn off the check box labeled “Provide visual feedback during update”. On the other ZX devices no I/O pins are used to indicate that an update is in progress. 6.7 Setting the Debug Output Limit By default, the debug window will only retain the last 100 lines of output. You can change this by selecting the “Open User Options File” entry from the Options menu. This will display the current contents, if any, of the User Options File. If one does not exist you may insert a line like the one below. debug.line.limit=250 This will change the limit to 250 lines. The IDE will need to be exited and restarted after manually modifying the User Options File in this manner in order for the change to take effect. 6.8 Other Configurable Items There are many aspects of the editor that may be configured. However, discussion of the means of making such changes and the impact of the changes is beyond the scope of this document. Those interested in investigating this topic further are directed to the “ZBasic Help” entry on the Help menu.