Tcl is the de facto standard for scripting in EDA software. So every hardware designer has to deal with Tcl. Luckily for us there is an Eclipse Tcl plugin available that can help us read and write Tcl code. This plugin offers open declaration, (quick) outline,autocomplete, debugging and other features that will make you more productive.
Install
To install the Tcl plugin in Sigasi:
- Click Help > Install New Software…
- Enter the Eclipse update site that matches the Sigasi Studio release as update site in the Work with: field. For Sigasi Studio 4.10 this is the update site for Eclipse 2020-09 :
https://download.eclipse.org/releases/2020-09/
. - When the index of the update is downloaded (this can take a while) enter tcl in the type filter text box
- Select the Dynamic Languages Toolkit – Tcl Development Tools
- Click through the straightforward, subsequent steps
Configure
After the Tcl plugin is installed you need to configure at least one Tcl interpreter.
Select Window > Preferences > Tcl > Interpreters. You can add an interpreter manually with the Add button or you can try automatic detection with the Search button.
Explore
To verify that the interpreter is working, you can open an interactive Tcl console by clicking the Open console icon in the toolbar and next selecting the interpreter you want to use.
The next thing you should try is opening a Tcl file and play around. You can test autocomplete, outline, open declaration,…
To enable all Tcl support features (e.g. run, debug) you need to create a Tcl project (File > New > Project… > Tcl Project).
To convert an existing project to a Tcl project you need to edit the .project
file.
You need to add
<buildCommand>
<name>org.eclipse.dltk.core.scriptbuilder</name>
<arguments/>
</buildCommand>
to the <buildSpec></buildSpec>
element and
<nature>org.eclipse.dltk.tcl.core.nature</nature>
to the <natures></natures>
element.
More
You can find more information in the bundled help pages: Help > Help Contens > Tcl/Xotcl Development User Guide. The help pages also contain a tutorial that guides you through all Tcl features.
See also
- The benefits of early detection (screencast)
- Sigasi Studio Editing Tricks (legacy)
- Make Eclipse open files from the command line (legacy)
- Eclipse keyboard tricks: Editing code (legacy)
- Installing translations for Eclipse (legacy)