Library Editor Tips
A selection of hints, tips and best practice to help you get the most out of the Library Editor application and your user-defined library.
Library Organisation
- Start from a clean directory - When making a new library project, it's a good idea to start in an empty directory and then copy any files you want in your library into that directory. This has two advantages. Firstly you're not cluttering the Library Editor interface with files not wanted in your library. Secondly, because every file in the library directory is a new copy, you can move them around, rename them or delete them inside the Library Editor UI without causing potentially unwanted modifications to the original files. Note that a new library cannot be created in a directory that contains an XJDeveloper project file (.xjd file). This restriction avoids accidental modification of files used in an XJDeveloper project, which could result in breaking the XJDeveloper project.
- Import files from your XJDeveloper projects - Importing files from an XJDeveloper project is a good way to quickly and easily populate your library with the device files you want. It allows you to source files and add them to your library directly without having to first locate them on disk and manually copy them across.
- Keep your files organised - Keep your library files organised by creating appropriately named categories and sorting your files into them. This will make your life much easier finding the device file you need when you come to use your library in XJDeveloper.
- Don't move library files around externally - Once a file has been
Added to your library, it is best to avoid moving it on disk outside of the Library Editor interface as it will cause the Library Editor to lose track of the file and flag it as
Missing. You can still move the file through the Library Editor UI and this ensures that the file remains tracked and retains its change log history.
- Mind your change logs - Change logs for each file in the library project are stored in a separate history file (with file extension *.history). These appear in a history directory inside each library category, so be aware that deleting these files or directories will cause the loss of change log data.
Choosing Files to Include
- Don't add XJTAG library files - User-defined libraries are designed to work in tandem with the XJTAG library, so you can add files from both your library and the XJTAG library to the same project without issue. In fact this is the typical case. However, adding two files with the same name from different libraries is not supported and will cause one of the files to be overwritten. For this reason we strongly recommend not adding XJTAG library files to your own libraries to prevent file name conflicts. If you do add XJTAG library files to your own library, consider renaming them. Using the XJTAG library wherever possible has the additional advantage of keeping up with all the latest updates in future XJTAG library builds.
- Do add files that reference XJTAG library files - If you add a custom device file to your library that references XJTAG additional code files, there is no need to also add the additional code files to your library. These additional code files will automatically be pulled from the XJTAG library when compiling your library and when using your device file in XJDeveloper.
- Do add self-contained files - Try to add device files in your library that are fairly self-contained (or with their additional code files are self-contained). This way they are readily re-usable in other XJDeveloper projects without modification. Device files that make heavy reference to circuit-specific XJEase code in other files will prove difficult to transfer to other projects and will also cause the Library Editor syntax checking to flag up multiple errors (these errors can be ignored if necessary).
Updating Your Library
- Overwrite old builds - When you build your library, you will be prompted for a save location for the new build. Once your library is already in use in XJDeveloper, it is wise to overwrite the old build each time. This way the XJDeveloper library options don't require updating every time to point to your new path. Next time you open a XJDeveloper project containing files from your recently updated library you will be prompted to update any files that have changed.
- Write clear change logs - Making clear and detailed comments when documenting changes to your library files will ensure that when you come to updating your XJDeveloper projects, you will have a clear idea of how the updates will affect your project.
XJTAG v4.1.100