Viper/Zerynth review
By Allankliu from the Electronic Engineering World Forum.
Hardcopy attached.
Electronic Engineering World - Forum
Title: Selection outside of micropython: viper/zerynth python VM [Print this page]
Author: allankliu Time: 2016-9-13 09:05
Title: Selection outside of micropython: viper/zerynth python VM
This post was last edited by allankliu at 2016-9-13 09:05
Although this column is a micropython column, there are some things related to Embedded Python that are also prepared for inclusion in this column.
About VIPER/Zerynth
This article introduces Viper/Zerynth from Italy and the United States. The project was originally named VIPER: Viper Is Python Embedded in Realtime. Later, because the same product name was registered by another company, it was renamed to Zerynth. Personally feel that it is not as loud as it turned out. Originally an Italian company, Zerynth is based in Pisa and has a branch office in New York.
Zerynth is an easy-to-use, professional development kit designed for high-level design and cross-platform design of interactive products, art products, and Internet/networked devices. Zerynth is a development tool for interactive devices and applications based on ARM Cortex 32-bit microcontrollers, new sensors, actuators and expansion boards. Developers can take advantage of these development board hardware platforms for prototyping, productization with their scale effects and proven production lines, and rapid roll-to-market. At the same time, Zerynth helps designers to prototype prototyping software for rapid software through various programming examples and reference designs.
Zerynth uses open source design, and I have doubts about this. Later, I found that the Python code under the Zerynth Studio is kept, so it is really open source. In fact, after Zerynth was installed, there were more Python 3.4 and extension libraries in the PC, as well as the Zerynth IDE and background tools. These can all be found in the installation path, but developers need to carefully read the source code to understand the mystery.
–
https://docs.zerynth.com/
Target population and technical support
Zerynth’s development goals are different from micropython. The former is aimed at makers, artists, and system designers, so it provides a relatively complete tool chain. Micropython is mainly for hardware Hacker and engineers. There are overlaps, but there are differences. Zerynth claims to let developers focus on the application itself without having to entangle the underlying development with no added value, such as I/O customization, device drivers, memory management and other details for the development board. Zerynth’s built-in RTOS (FreeRTOS/ChibiOS) support, if necessary, can make full use of the underlying resources.
Micropython’s technical support is mainly based on the community, such as @dcexpert, which is used first. Zerynth relies mainly on forums and its own technical team. Probably because of knowing why I wrote books, Zerynth’s technical support has been very consistent.
- Zerynth’s original environment was not available in the country, and after some optimizations, the forum can now be used without having to overturn the wall.
- Zerynth’s hardware can be initialized, but user code cannot be uploaded, so Zerynth provides Ubuntu virtual machines for testing.
- With Zerynth’s remote support, the final problem is located in the ST-Link firmware needs to be updated. And finally completed the assessment.
System composition
- The Zerynth VM virtual machine is the core part of Zeynth, supports Python 3 scripting, and can write high-level application code that is reusable without relying on specific hardware.
- Zerynth Studio is a dedicated development environment that develops code in the IDE that allows users to synchronize code between the local and the cloud. At the same time, the IDE can manage different hardware platforms and download different virtual machines for different hardware. However, domestic users may experience networking problems when updating the IDE.
- The Zerynth APP is a simple app that allows users to control devices without having to write any code.
- The Zerynth Shield is a multi-sensor expansion board that can be used on Arduino (Atmel Cortex) and Particle (STM32F103) platforms.
- Zerynth Cloud is an implicit service that uses git to work with Studio for source management.
Zerynth Studio
Zerynth Studio is an IDE based on Python and node.js. It’s not entirely developed by Python QT/Tinker, it’s a WebKit wrapper. It covers all aspects of development, including source management (Git integration), serial terminals, compiled links, and many more. From a certain point of view, it is similar to the Arduino Processing IDE.
–
Zerynth OS and Zerynth SDK | Zerynth IoT Platform
Target hardware
The hardware supported by Zerynth is mainly from STM/Atmel series, including STM32F401RE/STM32F103CB/SAM3X8E. Since Zerynth also has its own Cloud, APP. So the UDOO platform can support both Zerynth Python and the Zerynth Android APP.
Difference from standard Python
The Zerynth VM is a Python implementation designed for embedded devices with valuable storage and computing resources. Zerynth is a subset of Python because some features are too wasteful for embedded programming.
Python 3.4 features not supported by Zerynth:
- There are no getattr and setattr with character arguments;
- No more than 65,535 names (object names);
- The function must not exceed 256 parameters, no **kwargs support;
- Sequence/map is limited to 65535 elements;
- Use built-in and other modules instead of standard Python libraries;
- No closures, generators, decorators;
- There is no eval() and compile().
Zerynth additional features:
- Built-in real-time thread;
- Built-in native C function call;
- An exception is not a class, but a name with an optional error code;
- Support for hardware-related built-in classes such as GPIO, ADC, PWM, etc.
For developers, it is valuable to be able to support the STM32F103 entry-level MCU and to share the STM32F401 development board with Micropython.
Author: dcexpert Time: 2016-9-13 09:42
This post was last edited by dcexpert at 2016-9-13 09:45
It looks very good and gives us another option, especially for MCUs like the STM32F103, which are much larger than the STM32F4. Thanks anlankliu. Author: nmg Time: 2016-9-13 09:45
Allankliu moderator appeared Author: strong161 Time: 2016-9-13 10:37
Would you like to play it! Author: Maier wind over time: 2016-9-13 11:28
Microphthon is still fainting, and it’s a big one, it’s even more dizzy. I’m still entangled in the underlying development, and I’m not working on this kind of upper-layer application development. Author: dcexpert Time: 2016-9-13 21:27
I tried it today and it didn’t work. Without the Nucleo-F401 board, you can download the virtualization firmware instead of F411, but the script can’t be downloaded. Can you give me a tutorial? Are you writing Zerynth’s book? Author: allankliu Time: 2016-9-14 07:24
Dcexpert Posted on 2016-9-13 21:27
I tried it today and it didn’t work. Without the Nucleo-F401 board, you can download the virtualization firmware instead of F411, but the script can’t be downloaded…
I have not tried the board of F411. The problem with the board of F401 is that you need to upgrade ST-LINK first, please STSW-LINK007, upgrade ST-LINK firmware. I and Zerynth’s technical support took a long time to discover the problem. Uplink does not work with ST-LINK firmware. Author: allankliu Time: 2016-9-14 08:01
Dcexpert Posted on 2016-9-13 21:27
I tried it today and it didn’t work. Without the Nucleo-F401 board, you can download the virtualization firmware instead of F411, but the script can’t be downloaded…
The F411 is not listed on the PCBA list that Zerynth officially supports, but you may try it out with 411/Qualiboard. What it supports is:
ESP8266/NodeMCU;
NUCLEO F401;
Arudino DUE, SAM3X;
Flip_Click from mikroE, based upon SAM3X;
Quali board,based upon STM32F427;
Spark/Paticle, STM32F103CB and STM32F205RG.
I will take some time to add some Zerynth tutorials every day. Zerynth’s developers are very professional and adapt quickly. But I also need to understand their business model in depth.
The Python manuscript has been delivered to the Electronics Industry Press. It took 11 months to complete, and the editor said that he still had to wait three months for the final publication. Among them, the embedded Linux virtual machine includes micropython, zerynth, and pymite over mbed as the key introduction. In addition to the MCU-level Python virtual machine, this chapter summarizes the available Python virtual machines for running environments on various types of embedded Linux. mainly includes:
- LFS/CLFS (Cross Linux from Scratch), cross-compilation standard CPython (most troublesome);
- LFS/CLFS, cross-compile pymite desktop and micropython UNIX version (very simple, but requires OS/C API adaptation)
- Embedded Linux, such as OpenMoko/OpenWRT, install pre-cross-compilation using a software manager (a bunch of routers are available);
- Embedded Linux, such as Raspberry Pi and NanoPi, install CPython using apt/yum;
- Embedded Linux+Java, using Jython to run Python scripts and Java programs (tested TigerJython from Switzerland on the Raspberry Pi);
- The full version of Linux/OS, using native GCC, often has its own CPython version and Pypy accelerated version.
Another application of Python focuses on server-side and data analysis. Because GIL and CPython are not running fast, I have evaluated pypy to run 8 times faster than CPython. Next, evaluate the use of the libuv asynchronous library in Python. It is said that the optimized speed and Golang are on an order of magnitude.
There are many topics to discuss.