Directory:

1) Linux environment construction

2) Windows environment construction

3) Software burning

4) Source package

The source code of Harmony does not support building in Windows, so we need to build a Linux environment. For the tools and components required for building the OS, see the open source website of Hongmeng OS: gitee.com/openharmony… .

This document lists the problems encountered during the construction process for your reference:

Symptom: ** After python3.8.5 is installed and Python3 is entered, the following interface is displayed:

** Cause: ** In Linux, the python version is 3.6.9. The command output is Python 3.8.5. This appears to be the case as described in the Harmony OS Setup documentation, but it is recommended that python3.6.9 be uninstalled and that more than two Versions of Python exist in the Linux environment.

Problem solution:

Uninstall redundant Python versions; Link the python3 command to python3.8.5;

CD /usr/bin && sudo rm python3 && sudo ln -s python3.8-path python3 && python3 –version

Uninstall the Reference method of the Python version

1. Uninstall python3.6.9

sudo apt-get remove python3 2. Uninstall PYTHon3.6.9 and its dependencies

sudo apt-get remove –auto-remove python3 3. Clear some python3.6.9 configuration files

Sudo apt-get purge python3.6.9 sudo apt-get purge –auto-remove python3

When the Linux environment is Ubuntu16, the Hi3861 build environment installation scons, the environment has more Python versions, the source code build failed.

Sudo apt-get install scons-y

The reason for this problem is that under Ubuntu16, the default download version of Scons is 3.0.2, while Scons relies on python2.7.17.

Problem solution:

Delete the Python version; Download scons 3.0.4 (via offline installation) or download the corresponding Scons version via PIp3

2) under Windows environment set up main IDE environment setup, facilitate through IDE compiles, burn, commissioning work, specific please refer to: device.harmonyos.com/cn/docs/ide…

Key issues:

During node.js installation, select necessary tools (such as Python and Visual Studio Build toolchain) for automatic installation. After node.js is installed, click Finish. The system automatically opens PowerShell and starts installing necessary tools.



Error “Unable to load file C: Users\xx\AppData\Roaming\ NPM \cnpm.ps1, because scripts are not allowed to run on this system **”

Solution:

1. Type “Windos PowerShell” in the system search box

2. Click “Run as Administrator”

3. Take the set-executionPolicy RemoteSigned and press Enter

4. Enter A and press Enter as prompted

Error: COMX open fail, please check com is busy or exist.

Solution: The serial port terminal is dedicated, shut down the serial port terminal, restart burning.

3) Software burning in Windows environment, through VS+ Harmony IDE coordination, connected to Linux server to complete the code writing, compilation, burning and debugging;

To burn the software, decompress the DevEco Device Tool and run hiburn. exe to burn the software

The specific operation steps are as follows:

1. Get DevecoDeviceKool-1.0.0. vsix (plug-in the application through VSIXProject, in fact, the application depends on the file package, distributed as a plug-in) 2. Decompress the plug-in with 7-zip, go to Extension \deveco\tools, and start hiburn.exe

See more chapters >>>

Author: jone_hai

For more information, please visit harmonyos.51cto.com/, a strategic collaboration between 51CTO and Huawei