In general, thanks to all who helped (especially @Sergey). In this link I described what and how to do - https://github.com/Rashid-S/ADAM-3600
1. Introduction
This project consistently outlines the steps for building and cross-compiling the Python 3.5.5 interpreter for the ARM core. Cross-compilation was performed on Ubuntu 12.04 OS, simulated on a virtual machine. The interpreter is designed to work in Linux on the Adam-3600 industrial controller (hereinafter referred to as PLC), but it can also be used on other controllers (I don’t know, didn’t check).
2. Dependencies
Install updates
$ sudo apt-get install update $ sudo apt-get install upgrade
Install the following libraries
$ sudo apt-get install libssl-dev $ sudo apt-get install libffi-dev $ sudo apt-get install gcc-arm-linux-gnueabihf $ sudo apt-get install dff $ reboot
Check the version of arm-linux-gnueabihf-gcc with the command arm-linux-gnueabihf-gcc --version . The version should be 4.6.3.
3. Cross-compiling OpenSSL 1.0.1t
$ cd $HOME wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1t.tar.gz tar xvzf openssl-1.0.1t.tar.gz $ cd openssl-1.0.1t $ ./Configure linux-generic32 shared --cross-compile-prefix=arm-linux-gnueabihf- $ make $ sudo make install $ mkdir lib $ cp ./*.{so,so.1.0.0,a,pc} ./lib
4. Cross-compiling and building Python-3.5.5
Run sequentially commands
$ cd $HOME $ mkdir PythonSrc $ cd PythonSrc $ wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz $ tar zxf Python-3.5.5.tgz $ mv Python-3.5.5 Python-3.5.5-host $ cd Python-3.5.5-host $ ./configure --prefix=$HOME/PythonSrc/PythonHost $ make python Parser/pgen $ make install
$ cd $HOME $ wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz $ tar zxf Python-3.5.5.tgz $ cd Python-3.5.5 $ export CC=arm-linux-gnueabihf-gcc $ export CXX=arm-linux-gnueabihf-g++ $ export AR=arm-linux-gnueabihf-ar $ export RANLIB=arm-linux-gnueabihf-ranlib $ export ac_cv_file__dev_ptmx=no $ export ac_cv_file__dev_ptc=no $ export ac_cv_have_long_long_format=yes $ export PATH=/home/rashid/PythonSrc/PythonHost/bin:$PATH $ export OPENSSL_ROOT=/home/rashid/openssl-1.0.1t $ ./configure --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --build=x86_64-linux-gnu --prefix=$HOME/PythonSrc/PythonTarget --disable-ipv6 --enable-shared $ export HOSTPYTHON=$HOME/PythonSrc/Python-3.5.5-host/python3 $ export HOSTPGEN=$HOME/Python-3.5.5-host/Parser/pgen $ export BLDSHARED="arm-linux-gnueabihf-gcc -shared" $ export CROSS_COMPILE=arm-linux-gnueabihf- $ export CROSS_COMPILE_TARGET=yes $ export HOSTARCH=arm-linux $ export BUILDARCH=arm-linux-gnueabihf
/usr/rashid/Python-3.5.5/Modules/Setup.dist files /usr/rashid/Python-3.5.5/Modules/Setup.dist and /usr/rashid/Python-3.5.5/setup.py . Further
$ make $ make install
The compiled project should appear in the $HOME/PythonSrc/PythonTarget/
5. Run interpreter on Adam-3600
There are four directories in the $HOME/PythonSrc/PythonTarget/ directory: /bin, /include, /lib, /share . I copied the contents of each directory into the same directories on the PLC - /usr/bin, /usr/include, /usr/lib, /usr/share respectively, with the exception of the /lib/python3.5/test directory, since the PLC does not there is so much space, and there is no need for this catalog.
Log in to the /usr/bin . Run on command line
chmod +x python3.5
Further
python3.5
In response, an interpreter prompt should appear on the command line.
Python 3.5.5 (default, Apr 28 2019, 20:19:45) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>>