Zerynth Studio is an integrated development environment (IDE) that runs on Windows, Linux and Mac.
Through Zerynth Studio all the supported boards can be managed and programs can be developed in Python 3 or hybrid C/Python. Projects developed with Zerynth Studio can be saved locally or pushed as private git repository to the Zerynth backend.
Zerynth Studio includes:
- A code editor with syntax highlighting, multi-tab support, code auto-completion and error highlighting features;
- A seamless integration of all the Zerynth Toolchain commands;
- Board discovery and management;
- Multiple serial port monitors;
- Git integration;
- Tens of code examples.
The Zerynth Studio interface is divided into functional areas:
The Toolbar is placed at the top of the Zerynth Studio window just under the system menubar.
It contains two separate sections; on the left side there is the list of opened projects with the current one highlighted. Buttons to compile and uplink the current project lie just to the right of it. At the center of the toolbar there is the device management widget, whereas to the right of the screen, an account button allows accessing the user profile and assets.
Device Management Widget¶
Zerynth Studio automatically recognizes connected devices, being them development boards, usb to serial converters or board programming tools. The connected devices are listed in the device management widget. The currently selected device will be used as a target device by the compiler and the uplinker.
By clicking “Choose target devices...” in the dropdown, it is possible to add a target device not physically connected the the development machine. This way, projects can be verified for such target, but obviously not uplinked.
The device discovery algorithm tries its best to infer the type of the connected device, but there are situations where this is not feasible without user intervention. In such cases, the discovered device is reported as “ambiguous” and the final choiche on the device type is left to the user.
Once a device has been connected, the buttons to the right of the device list allow the following interactions:
- Device Registration & Virtualization: by clicking the “Z” button, a registraion and virtualization dialog is displayed. If the target device has never been connected before, the only possible action is to register the device. The registration procedure is necessary to retrieve enough device information for allowing the Zerynth backend to build a virtual machine for the device. Once registration has been performed, the user is given the option to create a Virtual Machine for the registered deice. Here the user can select one of different virtual machines compatible with the target device. Finally, the created Virtual Machine can be virtualized (i.e. burned on the device). Some devices cannot be recognized automatically; for these devices, the dialog provides some more options to be specified before the actual registration/virtualization can take place. Finally, a device can always be registered again with the dedicated dialog button.
- Serial Console: by clicking the rightmost button,the serial port of the target device can be opened and the output inspected.
- Device information and PinMap: the central buttons can be used to retrieve device information (expecially the serial port and/or the mounted volume) and to show the device pinmap. Please refer to the Programming Guide section for more details on how pin names and functionalities are organized in Zerynth.
When a serial console is opened, the port parameters are automatically configured to the defaults of the selected device. The baud rate for a device is displayed during bytecode upload. To open a serial port configured with a non default baudrate, a serial terminal like Putty should be used. It is important to close the serial terminal before trying to uplink or open a Zerynth serial console, because concurrent serial port usage from different programs is not allowed.
The Zerynth Studio serial console also has scroll lock and clear all console functions accessible from the top right corner of the console
The Getting Started section has a dedicated tutorial on how to manage devices.
Zerynth Studio integrates a code editor based on the powerful Ace .
The topmost part of the editor is reserved for tabs. Each tab displays a single project file and files belonging to different projects can be kept open at the same time.
At the bottom of the editor, a status bar displays information about the currently opened file together with a series of menus to alter the editor font and theme. The rightmost menu contains the useful editor commands.
Keyboard shortcuts are available:
ctrl+f: find in the current file
ctrl+g: find next
ctrl+shift+g: find previous
ctrl+h: find and replace
ctrl+\: comment/uncomment selected lines
tab: indent more
shift+tab: indent less
ctrl+alt+8: auto pep8 (check and modify the script according to Python Enhancement Proposals 8 style convention)
- for more shortcuts refer to the Ace shortcut page
The Left Panel¶
The vertical panel located to the left of the screen displays different information panels that can be selected by clicking one of the vertically stacked icons.
The topmost icon selects the currently open project and the folder tree is shown. A double click on a project file opens it in the code editor.
The user can open more than one project and can switch from a project to another by selecting it from the project top bar.
Project related commands can be accessed both from the system menu and from the dropdowns in the top right corner of the project view.
Drag and Drop feature is available for the project view
All projects known to Zerynth Studio are listed in the projects browser panel. Projects are grouped into “workspaces”, where a workspace is the parent folder that contains them. Different workspaces are automatically added and removed to the projects browser as soon as a new project is created or the last project in a workspace is deleted, respectively. Projects are also “tagged” by an icon with the following meaning:
- closed folder: project save locally
- folder with git fork icon: project is saved remotely on the Zerynth backend
- folder with a book icon: project has been published as a library package
Zerynth Studio integrates an Example browser from which code examples can be cloned into projects. Examples are organized in a tree where different branches are usually labelled with the package namespace that provides them.
In the Getting Started section a dedicated tutorial on how to use examples is available.
Zerynth Studio can be extended with new libraries and all the existing components of the system can be updated when necessary. These features are managed from the Package Manager panel, accessible by clicking the “puzzle” icon on the Left Panel
To search and install a package:
- type keywords in the search form and a list of matching packages will be displayed.
- choose “Install” from the dropdown menu of the selected package
- click “Install” in the summary popup for the package
A the top right corner of the Package Manager panel, an “update” button allows updating all packages in a click. When new versions of Zerynth Studio or of the Zerynth Toolchain are released, a manual restart of the Studio is required. The update process is non-disruptive and the previous working version of Zerynth Studio is preserved so that it can be started in case the new version has failed updating correctly.
In the Getting Started section a dedicated tutorial on how to search, install and import packages is available.
Zerynth Studio is also a tool to stay connected with the Zerynth community. The “News Feed” tab displays the latest news available in the community forum about packages, updates, releases and bug fixes.
Each device output can be monitored through a dedicated serial console and each console lives in its own window. The console list panel is useful rapidly focus or close an opened console.
Zerynth Studio also includes a System Log Panel under the code editor where all system messages are reported. The displayed messages usually comes from the output of ZTC commands executed under the hood by Zerynth Studio. In case of error a full traceback of the exception can be generated: it should be copied and reported on the community forum to have it solved and fixed.
Zerynth Studio has a quick search feature accessed through the shortcut
Ctrl+P. The quick search bar allows to search projects, examples and installed packages rapidly. Each search result is tagged with a type that can be
proj for projects,
ex for examples and and
doc for package documentation.
The quick search bar has some advanced features. It is possible to prefix the search query with the type of the desired result followed by a colon in order to restrict the search to the specified type. For example, typing
proj:blink displays only the projects that match the query term “blink”.
Finally, by typing
:ztc followed by a ZTC command, the specified command is executed and the output is shown in the System Log.