Как разрабатывать ПО для Wiren Board/en: различия между версиями
(нет различий)
|
Текущая версия на 13:57, 7 июня 2019
Note: this article is about how to create new software for Wiren Board, and is intended for programmers;
- tandard Wiren Board software - Wiren Board Software,
- use the built-in rules system to write rules and scripts.
Environment
All Wiren Board controllers come with full Debian Linux. Processor architecture: armel. The controller uses libc version 2.13.
It is recommended to install the software using the Debian package Manager and package the SOFTWARE in deb packages
General consideration
Wiren Board controllers have from 64 to 512MB of RAM, depending on the model. This means that you need to consider memory consumption when developing your programs. For information about how to control memory consumption in Linux, see the website http://www.linuxatemyram.ru/.
Building packages and programs
It is recommended to build programs on a Linux computer using a special development environment. Compiling and developing directly on the Wiren Board 5 is not recommended due to the small amount of RAM.
Development environment
The development environment is provided as a Docker container. For its use in Linux, there is a convenient script wbdev. When using an environment, cross-compilation is not necessary. The wbdev script automatically runs the appropriate commands in a virtualized environment with the armel architecture corresponding to the Wiren Board processor architecture.
The Assembly of packages is made by calling the wbdeb, for example:
$ wbdev chroot #run virtualized qemu chroot environment with Debian 7 armel architecture $ wbdev make # call 'make' in a virtualized qemu chroot environment $ wbdev cdeb # build a package written in C++ in a virtualized qemu chroot environment $ wbdev gdeb # build a package written in Go using cross-compile Go $ wbdev ndeb # collect architecture-independent package, containing for example a project in Python
Full description of the work with the environment is in the documentation.