From e305ac8a6a28a410da665bb5a94c0bf49cfb8cf2 Mon Sep 17 00:00:00 2001 From: "ester.zhou" Date: Thu, 28 Apr 2022 10:23:26 +0800 Subject: [PATCH] update folder Signed-off-by: ester.zhou --- en/device-dev/quick-start/Readme-EN.md | 2 +- ...uickstart-ide-lite-env-setup-win-ubuntu.md | 20 +- .../quickstart-ide-lite-steps-hi3861-burn.md | 2 +- ...ickstart-ide-lite-steps-hi3861-running.md} | 0 .../quickstart-ide-lite-steps-hi3861.md | 2 +- ...start-ide-standard-env-setup-win-ubuntu.md | 20 +- .../quickstart-lite-env-setup-linux.md | 248 --------- .../quickstart-lite-env-setup-overview.md | 10 - .../quickstart-lite-env-setup-windows.md | 63 --- .../quick-start/quickstart-lite-env-setup.md | 58 +- .../quickstart-lite-ide-directory.md | 2 +- .../quickstart-lite-introduction-hi3518.md | 52 -- .../quickstart-lite-introduction.md | 9 - .../quick-start/quickstart-lite-reference.md | 16 +- .../quickstart-lite-sourcecode-acquire.md | 50 -- .../quickstart-lite-steps-hi3516-faqs.md | 152 ------ .../quickstart-lite-steps-hi3516-program.md | 494 ------------------ .../quickstart-lite-steps-hi3518-faqs.md | 154 ------ .../quickstart-lite-steps-hi3518-running.md | 233 --------- .../quickstart-lite-steps-hi3518-setting.md | 104 ---- .../quickstart-lite-steps-hi3518.md | 9 - .../quickstart-lite-steps-hi3861-burn.md | 2 +- ...quickstart-lite-steps-hi3861-connection.md | 131 ----- .../quickstart-lite-steps-hi3861-faqs.md | 291 ----------- .../quickstart-lite-steps-hi3861-running.md | 149 ------ .../quick-start/quickstart-standard-burn.md | 69 --- .../quickstart-standard-docker-environment.md | 93 ---- .../quickstart-standard-env-setup.md | 50 +- ...quickstart-standard-package-environment.md | 92 ---- .../quickstart-standard-reference.md | 16 +- .../quickstart-standard-sourcecode-acquire.md | 49 -- ...quickstart-standard-windows-environment.md | 63 --- 32 files changed, 95 insertions(+), 2610 deletions(-) rename en/device-dev/quick-start/{quickstart-ide-lite-steps-hi3816-running.md => quickstart-ide-lite-steps-hi3861-running.md} (100%) delete mode 100644 en/device-dev/quick-start/quickstart-lite-env-setup-linux.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-env-setup-overview.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-env-setup-windows.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-introduction-hi3518.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-introduction.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-sourcecode-acquire.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3516-faqs.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3516-program.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3518-faqs.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3518-running.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3518-setting.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3518.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3861-connection.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3861-faqs.md delete mode 100644 en/device-dev/quick-start/quickstart-lite-steps-hi3861-running.md delete mode 100644 en/device-dev/quick-start/quickstart-standard-burn.md delete mode 100644 en/device-dev/quick-start/quickstart-standard-docker-environment.md delete mode 100644 en/device-dev/quick-start/quickstart-standard-package-environment.md delete mode 100644 en/device-dev/quick-start/quickstart-standard-sourcecode-acquire.md delete mode 100644 en/device-dev/quick-start/quickstart-standard-windows-environment.md diff --git a/en/device-dev/quick-start/Readme-EN.md b/en/device-dev/quick-start/Readme-EN.md index a95d57b814..93481265a2 100644 --- a/en/device-dev/quick-start/Readme-EN.md +++ b/en/device-dev/quick-start/Readme-EN.md @@ -12,7 +12,7 @@ - [Burning](quickstart-ide-lite-steps-hi3861-burn.md) - [Networking](quickstart-ide-lite-steps-hi3861-netconfig.md) - [Debugging and Verification](quickstart-ide-lite-steps-hi3861-debug.md) - - [Running](quickstart-ide-lite-steps-hi3816-running.md) + - [Running](quickstart-ide-lite-steps-hi3861-running.md) - Hi3516 Development Board - [Writing a Hello World Program](quickstart-ide-lite-steps-hi3516-application-framework.md) - [Building](quickstart-ide-lite-steps-hi3516-building.md) diff --git a/en/device-dev/quick-start/quickstart-ide-lite-env-setup-win-ubuntu.md b/en/device-dev/quick-start/quickstart-ide-lite-env-setup-win-ubuntu.md index 8c482fb6e0..5505b7a897 100644 --- a/en/device-dev/quick-start/quickstart-ide-lite-env-setup-win-ubuntu.md +++ b/en/device-dev/quick-start/quickstart-ide-lite-env-setup-win-ubuntu.md @@ -24,7 +24,7 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G 1. Make sure the Ubuntu shell environment is **bash**. 1. Run the following command and check whether the command output is **bash**. If the command output is not **bash**, go to step 2. - + ``` ls -l /bin/sh ``` @@ -32,7 +32,7 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G ![en-us_image_0000001226764302](figures/en-us_image_0000001226764302.png) 2. Start the command-line tool, run the following command, enter your password, and select **No** to set **Ubuntu shell** to **bash**. - + ``` sudo dpkg-reconfigure dash ``` @@ -44,13 +44,13 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G 3. Decompress the DevEco Device Tool software package and assign permission on the folder obtained from the decompression. 1. Go to the directory where the DevEco Device Tool software package is stored and run the following command to decompress the software package. In the command, change **devicetool-linux-tool-3.0.0.400.zip** to the actual software package name. - + ``` unzip devicetool-linux-tool-3.0.0.400.zip ``` 2. Open the folder of the decompressed software package and run the following command to grant the execute permission on the installation file. In the command, change **devicetool-linux-tool-3.0.0.400.sh** to the actual installation file name. - + ``` chmod u+x devicetool-linux-tool-3.0.0.400.sh ``` @@ -60,7 +60,7 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > During the installation, the setup wizard automatically checks whether Python 3.8 or 3.9 is installed. If Python 3.8 or 3.9 is not installed, the setup wizard displays the "Do you want to continue?" message; enter **Y** to allow the setup wizard to automatically install Python. - + ``` sudo ./devicetool-linux-tool-3.0.0.400.sh ``` @@ -126,19 +126,19 @@ To remotely access the Ubuntu environment through Windows and enjoy the benefits > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > If the command fails to be executed and the system displays a message indicating that the openssh-server and openssh-client depend on different versions, install the openssh-client of the required version (for example, **sudo apt-get install openssh-client=1:8.2p1-4**) as prompted on the command-line interface (CLI) and run the command again to install the openssh-server. - + ``` sudo apt-get install openssh-server ``` 2. Run the following command to start the SSH service: - + ``` sudo systemctl start ssh ``` 3. Run the following command to obtain the IP address of the current user for remote access to the Ubuntu environment from Windows: - + ``` ifconfig ``` @@ -148,7 +148,7 @@ To remotely access the Ubuntu environment through Windows and enjoy the benefits ### Installing Remote SSH -1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us-cn_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. +1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. ![en-us_image_0000001193920448](figures/en-us_image_0000001193920448.png) @@ -187,7 +187,7 @@ To remotely access the Ubuntu environment through Windows and enjoy the benefits After the preceding operations are complete, you can remotely connect to the Ubuntu environment through Windows for development. However, you need to frequently enter the remote connection password. To eliminate this need, you can use the SSH public key. 1. Open the Git bash CLI and run the following command to generate an SSH public key. During command execution, perform operations as prompted. Set **username** and **ip** to the user name and IP address you use for connecting to the Ubuntu system. - + ``` ssh-keygen -t rsa ssh-copy-id -i ~/.ssh/id_rsa.pub username@ip diff --git a/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861-burn.md b/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861-burn.md index e80143299b..3ebd031b51 100644 --- a/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861-burn.md +++ b/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861-burn.md @@ -53,4 +53,4 @@ Hi3861 V100 supports burning through the serial port. To burn source code throug 10. Wait until the burning is complete. When the following message is displayed, the burning is successful. - ![en-us_image_0000001216761476](figures/en-us_image_0000001216761476.png) + ![en-us_image_0000001216761476](figures/en-us_image_0000001216761476.png) \ No newline at end of file diff --git a/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3816-running.md b/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861-running.md similarity index 100% rename from en/device-dev/quick-start/quickstart-ide-lite-steps-hi3816-running.md rename to en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861-running.md diff --git a/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861.md b/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861.md index 0c22b10cba..76066f541d 100644 --- a/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861.md +++ b/en/device-dev/quick-start/quickstart-ide-lite-steps-hi3861.md @@ -12,4 +12,4 @@ - **[Debugging and Verification](quickstart-ide-lite-steps-hi3861-debug.md)** -- **[Running](quickstart-ide-lite-steps-hi3816-running.md)** +- **[Running](quickstart-ide-lite-steps-hi3861-running.md)** diff --git a/en/device-dev/quick-start/quickstart-ide-standard-env-setup-win-ubuntu.md b/en/device-dev/quick-start/quickstart-ide-standard-env-setup-win-ubuntu.md index e394e47626..affb9ae21b 100644 --- a/en/device-dev/quick-start/quickstart-ide-standard-env-setup-win-ubuntu.md +++ b/en/device-dev/quick-start/quickstart-ide-standard-env-setup-win-ubuntu.md @@ -25,7 +25,7 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G 1. Make sure the Ubuntu shell environment is **bash**. 1. Run the following command and check whether the command output is **bash**. If the command output is not **bash**, go to step 2. - + ``` ls -l /bin/sh ``` @@ -33,7 +33,7 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G ![en-us_image_0000001226764302](figures/en-us_image_0000001226764302.png) 2. Start the command-line tool, run the following command, enter your password, and select **No** to set **Ubuntu shell** to **bash**. - + ``` sudo dpkg-reconfigure dash ``` @@ -45,12 +45,12 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G 3. Decompress the DevEco Device Tool software package and assign permission on the folder obtained from the decompression. 1. Go to the directory where the DevEco Device Tool software package is stored and run the following command to decompress the software package. In the command, change **devicetool-linux-tool-3.0.0.400.zip** to the actual software package name. - + ``` unzip devicetool-linux-tool-3.0.0.400.zip ``` 2. Open the folder of the decompressed software package and run the following command to grant the execute permission on the installation file. In the command, change **devicetool-linux-tool-3.0.0.400.sh** to the actual installation file name. - + ``` chmod u+x devicetool-linux-tool-3.0.0.400.sh ``` @@ -60,7 +60,7 @@ The setup procedure varies, depending on whether you need a GUI. If you need a G > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > During the installation, the setup wizard automatically checks whether Python 3.8 or 3.9 is installed. If Python 3.8 or 3.9 is not installed, the setup wizard displays the "Do you want to continue?" message; enter **Y** to allow the setup wizard to automatically install Python. - + ``` sudo ./devicetool-linux-tool-3.0.0.400.sh ``` @@ -126,19 +126,19 @@ To remotely access the Ubuntu environment through Windows and enjoy the benefits > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > If the command fails to be executed and the system displays a message indicating that the openssh-server and openssh-client depend on different versions, install the openssh-client of the required version (for example, **sudo apt-get install openssh-client=1:8.2p1-4**) as prompted on the command-line interface (CLI) and run the command again to install the openssh-server. - + ``` sudo apt-get install openssh-server ``` 2. Run the following command to start the SSH service: - + ``` sudo systemctl start ssh ``` 3. Run the following command to obtain the IP address of the current user for remote access to the Ubuntu environment from Windows: - + ``` ifconfig ``` @@ -148,7 +148,7 @@ To remotely access the Ubuntu environment through Windows and enjoy the benefits ### Installing Remote SSH -1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us-cn_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. +1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. ![en-us_image_0000001193920448](figures/en-us_image_0000001193920448.png) @@ -187,7 +187,7 @@ To remotely access the Ubuntu environment through Windows and enjoy the benefits After the preceding operations are complete, you can remotely connect to the Ubuntu environment through Windows for development. However, you need to frequently enter the remote connection password. To eliminate this need, you can use the SSH public key. 1. Open the Git bash CLI and run the following command to generate an SSH public key. During command execution, perform operations as prompted. Set **username** and **ip** to the user name and IP address you use for connecting to the Ubuntu system. - + ``` ssh-keygen -t rsa ssh-copy-id -i ~/.ssh/id_rsa.pub username@ip diff --git a/en/device-dev/quick-start/quickstart-lite-env-setup-linux.md b/en/device-dev/quick-start/quickstart-lite-env-setup-linux.md deleted file mode 100644 index 826404d576..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-env-setup-linux.md +++ /dev/null @@ -1,248 +0,0 @@ -# Setting Up Ubuntu Development Environment - -Operating system: 64-bit version of Ubuntu 16.04 or later. - -Perform the following steps to set up the development environment: - -1. Obtain source code. -2. Install necessary libraries and tools. -3. Install Python3. -4. Install LLVM \(required only for OpenHarmony\_v1.x\). -5. Install hb. - ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->- Docker is provided for the Ubuntu build environment, which encapsulates related build tools. If you use Docker to prepare the build environment, you do not need to perform the following steps in this section. For details, see [Using Docker to Prepare the Build Environment](../get-code/gettools-acquire.md#section107932281315). ->- By default, basic software, such as Samba and Vim, is installed in the system. Adaptation on the software is required to support file sharing between the Linux server and the Windows workstation. ->- For details about the compilation and building subsystem of OpenHarmony, see [Compilation and Building Overview](../subsystems/subsys-build-mini-lite.md). - -## Obtaining Source Code and Tools - -The following table describes the tools and source code required for setting up the general environment for a Linux server and how to obtain these tools and the source code. - -**Table 1** Source code and development tools and their obtaining methods - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Item

-

Description

-

How to Obtain

-

Source code

-

Develops functions.

-

See Source Code Acquisition.

-

Necessary libraries and tools

-

Used for compilation (such as packaging and image creation).

-

Internet

-

Python3.7+

-

Executes script compilation.

-

Internet

-

LLVM (required only for OpenHarmony_v1.x)

-

Functions as the compiler toolchain.

-

Internet

-

hb

-

Compiles the OpenHarmony source code.

-

Internet

-
- ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install compilation tools like **gn** and **ninja**. ->- \(Recommended\) If you obtain the source code via the mirror site or code repository, install compilation tools such as **gn**, **ninja**, and LLVM. When installing these tools, ensure that their environment variable paths are unique. - -## Obtaining Source Code - -You need to acquire [source code](../get-code/sourcecode-acquire.md), download it on a Linux server, and decompress it. - -## Installing Necessary Libraries and Tools - -Run the following command to install the libraries and tools required for compilation: - -``` -sudo apt-get install build-essential gcc g++ make zlib* libffi-dev e2fsprogs pkg-config flex bison perl bc openssl libssl-dev libelf-dev libc6-dev-amd64 binutils binutils-dev libdwarf-dev u-boot-tools mtd-utils gcc-arm-linux-gnueabi cpio device-tree-compiler -``` - -## Installing Python3 - -1. Start a Linux server. -2. Run the following command to check the Python version: - - ``` - python3 --version - ``` - - If Python version is earlier than 3.7, reinstall Python. Do as follows to install Python, for example, Python 3.8. - - 1. Check the Ubuntu version. - - ``` - cat /etc/issue - ``` - - 2. Install Python based on the Ubuntu version. - - If the Ubuntu version is 18 or later, run the following command: - - ``` - sudo apt-get install python3.8 - ``` - - - If the Ubuntu version is 16, perform the following steps: - - a. Install dependency packages. - - ``` - sudo apt update && sudo apt install software-properties-common - ``` - - b. Add the source of deadsnakes PPA and press **Enter**. - - ``` - sudo add-apt-repository ppa:deadsnakes/ppa - ``` - - c. Install Python 3.8. - - ``` - sudo apt upgrade && sudo apt install python3.8 - ``` - - -3. Set the soft link of **python** and **python3** to **python3.8**. - - ``` - sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 - sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 - ``` - -4. Install and upgrade the Python package management tool \(pip3\) using either of the following methods: - - **Command line:** - - ``` - sudo apt-get install python3-setuptools python3-pip -y - sudo pip3 install --upgrade pip - ``` - - - **Installation package:** - - ``` - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py - python get-pip.py - ``` - - - -## Installing LLVM \(Required only for OpenHarmony\_v1.x\) - ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->When downloading source code under the OpenHarmony\_v1.x branches or tags, perform the operation procedure described in this section to install LLVM 9.0.0. ->When downloading source code under the Master and OpenHarmony\_v2.x branches or tags, skip this section. The hb automatically downloads the latest version of LLVM. - -1. Start a Linux server. -2. [Download LLVM](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar). -3. Decompress the LLVM installation package to **\~/llvm**. - - ``` - tar -zxvf llvm.tar -C ~/ - ``` - -4. Set an environment variable. - - ``` - vim ~/.bashrc - ``` - - Copy the following command to the last line of the **.bashrc** file, save the file, and exit. - - ``` - export PATH=~/llvm/bin:$PATH - ``` - -5. Validate the environment variable. - - ``` - source ~/.bashrc - ``` - - -## Installing hb - -### Prerequisites - -Python 3.7.4 or later has been installed. For details, see [Installing Python3](#section1238412211211). - -### Installation Procedure - -1. Install **hb**. - - ``` - python3 -m pip install --user ohos-build - ``` - -2. Set an environment variable. - - ``` - vim ~/.bashrc - ``` - - Copy the following command to the last line of the **.bashrc** file, save the file, and exit. - - ``` - export PATH=~/.local/bin:$PATH - ``` - - Update the environment variable. - - ``` - source ~/.bashrc - ``` - -3. Run the **hb -h** command. If the following information is displayed, the installation is successful: - - ``` - usage: hb - - OHOS build system - - positional arguments: - {build,set,env,clean} - build Build source code - set OHOS build settings - env Show OHOS build env - clean Clean output - - optional arguments: - -h, --help Show this help message and exit - ``` - - -### Uninstalling hb - -``` -python3 -m pip uninstall ohos-build -``` - ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->If you encounter any problem during the installation, resort to the [FAQs](quickstart-lite-env-setup-faqs.md). - diff --git a/en/device-dev/quick-start/quickstart-lite-env-setup-overview.md b/en/device-dev/quick-start/quickstart-lite-env-setup-overview.md deleted file mode 100644 index 5b5feef48c..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-env-setup-overview.md +++ /dev/null @@ -1,10 +0,0 @@ -# Overview - -Use the DevEco Device Tool for development, build, burning, and debugging of OpenHarmony. - -The DevEco Device Tool is currently available on Windows and Ubuntu. This document takes the Windows version as an example. - -For details about how to use the Ubuntu version, see the [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). - -The Windows version supports build for the Hi3861 development board only. For other development boards, you should use the Ubuntu version and switch to the Ubuntu platform. The following describes how to set up the development environment and build environment for mini and small OpenHarmony. - diff --git a/en/device-dev/quick-start/quickstart-lite-env-setup-windows.md b/en/device-dev/quick-start/quickstart-lite-env-setup-windows.md deleted file mode 100644 index dc2276c104..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-env-setup-windows.md +++ /dev/null @@ -1,63 +0,0 @@ -# Setting Up Windows Development Environment - -System requirements: - -- OS: 64-bit Windows 10 -- User name: cannot contain Chinese characters - -## Installing DevEco Device Tool - -DevEco Device Tool is installed in Visual Studio Code as a plug-in and depends on Python, Node.js, and HPM for running. - -DevEco Device Tool supports integrated installation. The DevEco Device Tool setup wizard checks whether the adaptation versions of Visual Studio Code, Python, Node.js and HPM tools have been installed. If any of the tools is not installed, you'll be prompted to select the tool to be automatically installed. - ->![](../public_sys-resources/icon-note.gif) **NOTE:** ->Before installing DevEco Device Tool, make sure the user name of the host does not contain Chinese characters. Otherwise, the **DevEco Home** page will be stuck loading and the DevEco Device Tool cannot work. - -1. Log in to the [HarmonyOS Device website](https://device.harmonyos.com/cn/ide#download_beta) with your HUAWEI ID and download DevEco Device Tool V3.0 Beta1 or a later version. If you do not have a HUAWEI ID, [register](https://developer.huawei.com/consumer/en/doc/start/registration-and-verification-0000001053628148) one first. -2. Decompress the DevEco Device Tool package, double-click the installer, and then click **Next**. -3. Set the installation path of DevEco Device Tool and click **Next**. -4. When prompted, select the tools to be automatically installed and click **Next**. - - ![](figures/snap28.png) - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >When the setup wizard detects that a compatible Python version has been installed, it prompts you to select the installed Python version or download the recommended Python version. - -5. In the dialog box shown below, click **Next** to download and install the tools. - - ![](figures/snap8.png) - -6. In the displayed Python setup wizard, select **Add Python 3.8 to PATH** and click **Install Now**. After the installation is complete, click **Close**. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you have selected the compatible Python version installed on your device, the Python setup wizard will not be displayed. In this case, you skip this step. - >If DevEco Device Tool 2.1 Release is installed, the Python version must be 3.8.x. If DevEco Device Tool V3.0 Beta1 or a later version is installed, the Python version must be 3.8.x or 3.9.x. - - ![](figures/snap34.png) - -7. In the Visual Studio Code setup wizard, install Visual Studio Code as prompted. During the installation, select **Add to PATH \(requires shell restart\)**. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you are using the correct version of Visual Studio Code, the Visual Studio Code setup wizard will not be displayed. In this case, you skip this step. - - ![](figures/snap33.png) - -8. In the Node.js setup wizard, retain the default settings and click **Next** until **Finish** is displayed. During the installation, Node.js will automatically set the system Path environment variable to the installation directory of **node.exe**. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you are using the correct version of Node.js, the Node.js setup wizard will not be displayed. In this case, you skip this step. - -9. Wait for the DevEco Device Tool setup wizard to automatically install the HPM and DevEco Device Tool. After the installation is complete, click **Finish** to close the setup wizard. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you are using the correct version of HPM, the setup wizard does not download or install HPM. - -10. Start Visual Studio Code. The C/C++ and CodeLLDB plug-ins on which DevEco Device Tool depends will be automatically installed. After the installation is complete, click ![](figures/button.png) on the left of Visual Studio Code to check whether C/C++, CodeLLDB, and DevEco Device Tool are included in the **INSTALLED** list. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If the C/C++ and CodeLLDB plug-ins fail to be installed, DevEco Device Tool cannot run properly. To solve the issue, see [Installing the C/C++ and CodeLLDB Plug-ins Offline](https://device.harmonyos.com/en/docs/ide/user-guides/offline_plugin_install-0000001074376846). - - ![](figures/deveco-device-tool-install-sucessful.png) - - diff --git a/en/device-dev/quick-start/quickstart-lite-env-setup.md b/en/device-dev/quick-start/quickstart-lite-env-setup.md index fd013b163b..978e50123c 100644 --- a/en/device-dev/quick-start/quickstart-lite-env-setup.md +++ b/en/device-dev/quick-start/quickstart-lite-env-setup.md @@ -19,7 +19,7 @@ To install the necessary libraries and tools, perform the following steps. On Ubuntu: 1. Run the following **apt-get** command: - + ``` sudo apt-get update && sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib gcc-arm-linux-gnueabi libc6-dev-i386 libc6-dev-amd64 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby genext2fs device-tree-compiler make libffi-dev e2fsprogs pkg-config perl openssl libssl-dev libelf-dev libdwarf-dev u-boot-tools mtd-utils cpio doxygen liblz4-tool openjdk-8-jre gcc g++ texinfo dosfstools mtools default-jre default-jdk libncurses5 apt-utils wget scons python3.8-distutils tar rsync git-core libxml2-dev lib32z-dev grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5-dev libncursesw5 libstdc++6 gcc-arm-none-eabi vim ssh locales ``` @@ -35,13 +35,13 @@ On Ubuntu: Check the location of Python 3.8: - + ``` which python3.8 ``` Change python and python3 to python3.8. - + ``` sudo update-alternatives --install /usr/bin/python python {python3.8 path} 1 #{Python3.8 path} is the location of Python 3.8 obtained in the previous step. sudo update-alternatives --install /usr/bin/python3 python3 {python3.8 path} 1 #{Python3.8 path} is the location of Python 3.8 obtained in the previous step. @@ -104,14 +104,14 @@ To remotely access the Ubuntu environment through Windows to perform operations 1. Make sure the Ubuntu shell environment is **bash**. 1. Run the following command and check whether the command output is **bash**. If the command output is not **bash**, go to step 2. - + ``` ls -l /bin/sh ``` ![en-us_image_0000001226764302](figures/en-us_image_0000001226764302.png) 2. Start the command-line tool, run the following command, enter your password, and select **No** to set **Ubuntu shell** to **bash**. - + ``` sudo dpkg-reconfigure dash ``` @@ -123,12 +123,12 @@ To remotely access the Ubuntu environment through Windows to perform operations 3. Decompress the DevEco Device Tool software package and assign permission on the folder obtained from the decompression. 1. Go to the directory where the DevEco Device Tool software package is stored and run the following command to decompress the software package. In the command, change **devicetool-linux-tool-3.0.0.400.zip** to the actual software package name. - + ``` unzip devicetool-linux-tool-3.0.0.400.zip ``` 2. Open the folder of the decompressed software package and run the following command to grant the execute permission on the installation file. In the command, change **devicetool-linux-tool-3.0.0.400.sh** to the actual installation file name. - + ``` chmod u+x devicetool-linux-tool-3.0.0.400.sh ``` @@ -138,7 +138,7 @@ To remotely access the Ubuntu environment through Windows to perform operations > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > During the installation, the setup wizard automatically checks whether Python 3.8 or 3.9 is installed. If Python 3.8 or 3.9 is not installed, the setup wizard displays the "Do you want to continue?" message; enter **Y** to allow the setup wizard to automatically install Python. - + ``` sudo ./devicetool-linux-tool-3.0.0.400.sh ``` @@ -158,19 +158,19 @@ To remotely access the Ubuntu environment through Windows to perform operations > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > If the command fails to be executed and the system displays a message indicating that the openssh-server and openssh-client depend on different versions, install the openssh-client of the required version (for example, **sudo apt-get install openssh-client=1:8.2p1-4**) as prompted on the command-line interface (CLI) and run the command again to install the openssh-server. - + ``` sudo apt-get install openssh-server ``` 2. Run the following command to start the SSH service: - + ``` sudo systemctl start ssh ``` 3. Run the following command to obtain the IP address of the current user for remote access to the Ubuntu environment from Windows: - + ``` ifconfig ``` @@ -180,7 +180,7 @@ To remotely access the Ubuntu environment through Windows to perform operations ### Installing Remote SSH -1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us-cn_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. +1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. ![en-us_image_0000001193920448](figures/en-us_image_0000001193920448.png) @@ -219,7 +219,7 @@ To remotely access the Ubuntu environment through Windows to perform operations After the preceding operations are complete, you can remotely connect to the Ubuntu environment through Windows for development. However, you need to frequently enter the remote connection password. To eliminate this need, you can use the SSH public key. 1. Open the Git bash CLI and run the following command to generate an SSH public key. During command execution, perform operations as prompted. Set **username** and **ip** to the user name and IP address you use for connecting to the Ubuntu system. - + ``` ssh-keygen -t rsa ssh-copy-id -i ~/.ssh/id_rsa.pub username@ip @@ -256,13 +256,13 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony ``` Run the following command to install the tools: - + ``` sudo apt-get install git git-lfs ``` 4. Configure user information. - + ``` git config --global user.name "yourname" git config --global user.email "your-email-address" @@ -270,7 +270,7 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony ``` 5. Run the following commands to install the **repo** tool: - + ``` curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable. chmod a+x /usr/local/bin/repo @@ -295,7 +295,7 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony Method 2: Use the **repo** tool to download the source code over HTTPS. - + ``` repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify repo sync -c @@ -310,7 +310,7 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony ### Running prebuilts Go to the root directory of the source code and run the following script to install the compiler and binary tool: - + ``` bash build/prebuilts_download.sh ``` @@ -326,34 +326,34 @@ Perform the following steps in Ubuntu: ### Install hb. > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** -> To install a proxy, see [Configuring a Proxy](../quick-start/quickstart-lite-reference.md#configuring-a-proxy). +> To install a proxy, see [Configuring the Proxy](../quick-start/quickstart-lite-reference.md#section6204129143010). 1. Run the following command to install hb and update it to the latest version: - + ``` pip3 install --user build/lite ``` 2. Set the environment variable. - + ``` vim ~/.bashrc ``` Copy the following command to the last line of the .bashrc file, save the file, and exit. - + ``` export PATH=~/.local/bin:$PATH ``` Update the environment variable. - + ``` source ~/.bashrc ``` 3. Run the **hb -h** command in the source code directory. If the following information is displayed, the installation is successful: - + ``` usage: hb @@ -372,7 +372,7 @@ Perform the following steps in Ubuntu: > ![icon-notice.gif](public_sys-resources/icon-notice.gif) **NOTICE** > - Run the following command to uninstall hb: -> +> > ``` > pip3 uninstall ohos-build > ``` @@ -392,26 +392,26 @@ Perform the following steps in Ubuntu: 2. [Download LLVM](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar) 3. Decompress the LLVM installation package to **~/llvm**. - + ``` tar -zxvf llvm.tar -C ~/ ``` 4. Set the environment variable. - + ``` vim ~/.bashrc ``` Copy the following command to the last line of the .bashrc file, save the file, and exit. - + ``` export PATH=~/llvm/bin:$PATH ``` 5. Validate the environment variable. - + ``` source ~/.bashrc ``` diff --git a/en/device-dev/quick-start/quickstart-lite-ide-directory.md b/en/device-dev/quick-start/quickstart-lite-ide-directory.md index ba40d1a379..88773504a4 100644 --- a/en/device-dev/quick-start/quickstart-lite-ide-directory.md +++ b/en/device-dev/quick-start/quickstart-lite-ide-directory.md @@ -11,7 +11,7 @@ - [Burning](quickstart-ide-lite-steps-hi3861-burn.md) - [Networking](quickstart-ide-lite-steps-hi3861-netconfig.md) - [Debugging and Verification](quickstart-ide-lite-steps-hi3861-debug.md) - - [Running](quickstart-ide-lite-steps-hi3816-running.md) + - [Running](quickstart-ide-lite-steps-hi3861-running.md) - Hi3516 Development Board - [Writing a Hello World Program](quickstart-ide-lite-steps-hi3516-application-framework.md) - [Building](quickstart-ide-lite-steps-hi3516-building.md) diff --git a/en/device-dev/quick-start/quickstart-lite-introduction-hi3518.md b/en/device-dev/quick-start/quickstart-lite-introduction-hi3518.md deleted file mode 100644 index 384aac6f3f..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-introduction-hi3518.md +++ /dev/null @@ -1,52 +0,0 @@ -# Hi3518 Development Board - -## Introduction - -Hi3518E V300 is a next-generation system on chip \(SoC\) designed for the industry-dedicated smart HD IP camera. It introduces a next-generation image signal processor \(ISP\), the H.265 video compression encoder, and the advanced low-power process and architecture design, leading the industry in terms of low bit rate, high image quality, and low power consumption. - -**Figure 1** Hi3518E V300 front view -![](figures/hi3518e-v300-front-view.png "hi3518e-v300-front-view") - -**Figure 2** Hi3518E V300 rear view -![](figures/hi3518e-v300-rear-view.png "hi3518e-v300-rear-view") - -## Development Board Specifications - -**Table 1** Specifications of the Hi3518 development board - - - - - - - - - - - - - - - - - - - - - - -

Type

-

Description

-

Processor core

-
  • Hi3518E V300
-

Imaging device

-
  • 1/2.9 F23
-

External interfaces

-
  • External microphone
  • External 8 Ω/1.5 W speaker
-

External memory interface

-
  • TF card

    A maximum file size of 128 GB is allowed (FAT32 format).

    -
-

WLAN protocol

-
  • 802.11 b/g/n
-
- diff --git a/en/device-dev/quick-start/quickstart-lite-introduction.md b/en/device-dev/quick-start/quickstart-lite-introduction.md deleted file mode 100644 index 2f95599480..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-introduction.md +++ /dev/null @@ -1,9 +0,0 @@ -# Introduction - -- **[Hi3861 Development Board](quickstart-lite-introduction-hi3861.md)** - -- **[Hi3516 Development Board](quickstart-lite-introduction-hi3516.md)** - -- **[Hi3518 Development Board](quickstart-lite-introduction-hi3518.md)** - - diff --git a/en/device-dev/quick-start/quickstart-lite-reference.md b/en/device-dev/quick-start/quickstart-lite-reference.md index a1bb41dcfd..c6fa6d023f 100644 --- a/en/device-dev/quick-start/quickstart-lite-reference.md +++ b/en/device-dev/quick-start/quickstart-lite-reference.md @@ -5,7 +5,7 @@ 1. Go to the root directory of the source code and run the build command. - + ``` ./build.sh --product-name name --ccache ``` @@ -14,7 +14,7 @@ > _name_ indicates the product name, for example, **Hi3516D V300** and **rk3568**. 2. Check the build result. After the build is complete, the following information is displayed in the log: - + ``` post_process =====build name successful. @@ -25,19 +25,19 @@ > For details about other modular compilation operations, see [Building a Standard System](../subsystems/subsys-build-standard-large.md). -## Configuring the Proxy +## Configuring the Proxy ### Setting Up the Python Proxy 1. Create a proxy configuration file. - + ``` mkdir ~/.pipvim ~/.pip/pip.conf ``` 2. Add the following proxy information to the file, save the file, and exit: - + ``` [global] index-url = http:// Proxy URL @@ -49,20 +49,20 @@ ### Setting Up the npm Proxy 1. Create a proxy configuration file. - + ``` vim ~/.npmrc ``` 2. Add the following proxy information to the file, save the file, and exit: - + ``` Registry=http:// Proxy URL strict-ssl=false ``` 3. Add the following content to the **.bashrc** file, save the file, and exit: - + ``` export NPM_REGISTRY=http:// Proxy URL source .bashrc diff --git a/en/device-dev/quick-start/quickstart-lite-sourcecode-acquire.md b/en/device-dev/quick-start/quickstart-lite-sourcecode-acquire.md deleted file mode 100644 index 3e1f2ec05f..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-sourcecode-acquire.md +++ /dev/null @@ -1,50 +0,0 @@ -# Obtaining Source Code - - -## Prerequisites - -1. Register your account with Gitee. -2. Register an SSH public key for access to Gitee. -3. Install the [git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information. - - ``` - git config --global user.name "yourname" - git config --global user.email "your-email-address" - git config --global credential.helper store - ``` - -4. Run the following commands to install the **repo** tool: - - ``` - curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable. - chmod a+x /usr/local/bin/repo - pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests - ``` - - -## How to Obtain - ->![](../public_sys-resources/icon-note.gif) **NOTE**
->Download the master code if you want to get quick access to the latest features for your development. Download the release code, which is more stable, if you want to develop commercial functionalities. - -- **Obtaining OpenHarmony master code** - - Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to Gitee.\) - - ``` - repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify - repo sync -c - repo forall -c 'git lfs pull' - ``` - - Method 2: Use the **repo** tool to download the source code over HTTPS. - - ``` - repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify - repo sync -c - repo forall -c 'git lfs pull' - ``` - -- **Obtaining OpenHarmony release code** - - For details about how to obtain the source code of an OpenHarmony release, see the [Release-Notes](../get-code/../../release-notes/Readme.md). diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3516-faqs.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3516-faqs.md deleted file mode 100644 index 98248bf57f..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3516-faqs.md +++ /dev/null @@ -1,152 +0,0 @@ -# FAQs - -## "Error: Opening COMxx: Access denied" Is Displayed After a Serial Port Is Selected for Burning - -- **Symptom** - - **Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port. - - ![](figures/failed-to-open-the-serial-port.png) - -- **Possible Causes** - - The serial port has been used. - -- Solution - - The serial port may be in use. Perform the following steps to troubleshoot: - - 1. Search for the serial port from the drop-down list in the **TERMINAL** panel. - - ![](figures/terminal-list.png) - - 2. Click the dustbin for the terminal using the serial port to disable the terminal. - - -## What should I do when Windows-based PC failed to be connected to the board? - -- **Symptom** - - The file image cannot be obtained after clicking **Burn** and selecting a serial port. - - **Figure 1** Failed to obtain the image file due to unavailable connection - ![](figures/failed-to-obtain-the-image-file-due-to-unavailable-connection.png "failed-to-obtain-the-image-file-due-to-unavailable-connection") - -- **Possible Causes** - - The board is disconnected from the Windows-based PC. - - Windows Firewall does not allow Visual Studio Code to access the network. - -- **Solutions** - -1. Check whether the network cable is properly connected. -2. Click **Windows Firewall**. - - ![](figures/hi3516-network-and-firewall-setting.png) - -3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**. - - ![](figures/hi3516-firewall-and-network-protection.png) - -4. Select the Visual Studio Code application. - - ![](figures/hi3516-selecting-the-visual-studio-code-application.png) - -5. Select the **Private** and **Public** network access rights for the Visual Studio Code application. - - ![](figures/hi3516-allowing-the-visual-studio-code-application-to-access-the-network.png) - - -## What should I do when the image failed to be burnt? - -- **Symptom** - - The burning status is not displayed after clicking **Burn** and selecting a serial port. - -- **Possible Causes** - - The IDE is not restarted after the DevEco plug-in is installed. - -- **Solutions** - - Restart the IDE. - - -## What should I do when the message indicating Python cannot be found is displayed during compilation and building? - -- **Symptom** - - ![](figures/symptom-for-not-finding-python.png) - - -- **Possible Cause 1**: Python is not installed. -- **Solutions** - - [Install Python](../quick-start/quickstart-lite-env-setup-linux.md). - -- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. - - ![](figures/reason-for-not-finding-python.png) - -- **Solutions** - - Run the following commands: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - Example: - - ![](figures/solution.png) - - -## What should I do when no command output is displayed? - -- **Symptom** - - The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**. - -- **Possible Cause 1** - - The serial port is connected incorrectly. - -- **Solutions** - - Change the serial port number. - - Start **Device Manager** to check whether the serial port connected to the board is the same as that connected to the terminal device. If the serial ports are different, perform step 1 in the **Running an Image** section to change the serial port number. - - -- **Possible Cause 2** - - The U-Boot of the board is damaged. - -- **Solutions** - - Burn the U-Boot. - - If the fault persists after you perform the preceding operations, the U-Boot of the board may be damaged. You can burn the U-Boot by performing the following steps: - - -1. Obtain the U-Boot file. - - >![](../public_sys-resources/icon-notice.gif) **NOTICE:** - >The U-Boot file of the two boards can be obtained from the following paths, respectively. - >Hi3516D V300: **device\\hisilicon\\hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3516dv300.bin** - >Hi3518E V300: **device\\hisilicon\\hispark\_aries\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3518ev300.bin** - -2. Burn the U-Boot file by following the procedures for burning a U-Boot file over USB. - - Select the U-Boot files of corresponding development boards for burning by referring to [Programming Flash Memory on the Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681)/[Programming Flash Memory on the Hi3518](https://device.harmonyos.com/en/docs/ide/user-guides/hi3518_upload-0000001057313128) - -3. Log in to the serial port after the burning is complete. - - **Figure 2** Serial port displayed after the U-Boot is burnt - ![](figures/serial-port-displayed-after-the-u-boot-is-burnt.png "serial-port-displayed-after-the-u-boot-is-burnt") - - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3516-program.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3516-program.md deleted file mode 100644 index f4d84ab803..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3516-program.md +++ /dev/null @@ -1,494 +0,0 @@ -# Developing a Driver - -This section describes how to develop a driver on the board, including introduction, compilation, burning, and running of the driver. - -## Introduction to Driver - -The following operations take a HDF-based UART driver as an example to show how to add configuration files, code the driver, and compile the code for interactions between the user-space applications and the driver. The driver source code is stored in the **drivers/framework/sample** directory. - -1. Add Configurations. - - Add driver configurations to the HDF driver configuration file \(for example, **device/hisilicon/hi3516dv300/sdk\_liteos/config/uart/uart\_config.hcs**\). - - ``` - root { - platform { - uart_sample { - num = 5; // UART device number - base = 0x120a0000; // Base address of the UART register - irqNum = 38; - baudrate = 115200; - uartClk = 24000000; - wlen = 0x60; - parity = 0; - stopBit = 0; - match_attr = "sample_uart_5"; - } - } - } - ``` - - Add the device node information to the HDF device configuration file \(for example, **vendor/hisilicon/ipcamera\_hi3516dv300\_liteos/config/device\_info/device\_info.hcs**\) - - ``` - root { - device_info { - platform :: host { - hostName = "platform_host"; - priority = 50; - device_uart :: device { - device5 :: deviceNode { - policy = 2; - priority = 10; - permission = 0660; - moduleName = "UART_SAMPLE"; - serviceName = "HDF_PLATFORM_UART_5"; - deviceMatchAttr = "sample_uart_5"; - } - } - } - } - } - ``` - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >The configuration files are in the same path as the source code of the UART driver. You need to manually add the files to the path of the Hi3516D V300 development board. - -2. Register a UART driver entry. - - Register the **HdfDriverEntry** of the UART driver with the HDF. - - ``` - // Bind the UART driver interface to the HDF. - static int32_t SampleUartDriverBind(struct HdfDeviceObject *device) - { - struct UartHost *uartHost = NULL; - - if (device == NULL) { - return HDF_ERR_INVALID_OBJECT; - } - HDF_LOGI("Enter %s:", __func__); - - uartHost = UartHostCreate(device); - if (uartHost == NULL) { - HDF_LOGE("%s: UartHostCreate failed", __func__); - return HDF_FAILURE; - } - uartHost->service.Dispatch = SampleDispatch; - return HDF_SUCCESS; - } - - // Obtain configuration information from the HCS of the UART driver. - static uint32_t GetUartDeviceResource( - struct UartDevice *device, const struct DeviceResourceNode *resourceNode) - { - struct UartResource *resource = &device->resource; - struct DeviceResourceIface *dri = NULL; - dri = DeviceResourceGetIfaceInstance(HDF_CONFIG_SOURCE); - if (dri == NULL || dri->GetUint32 == NULL) { - HDF_LOGE("DeviceResourceIface is invalid"); - return HDF_FAILURE; - } - - if (dri->GetUint32(resourceNode, "num", &resource->num, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read num fail"); - return HDF_FAILURE; - } - if (dri->GetUint32(resourceNode, "base", &resource->base, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read base fail"); - return HDF_FAILURE; - } - resource->physBase = (unsigned long)OsalIoRemap(resource->base, 0x48); - if (resource->physBase == 0) { - HDF_LOGE("uart config fail to remap physBase"); - return HDF_FAILURE; - } - if (dri->GetUint32(resourceNode, "irqNum", &resource->irqNum, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read irqNum fail"); - return HDF_FAILURE; - } - if (dri->GetUint32(resourceNode, "baudrate", &resource->baudrate, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read baudrate fail"); - return HDF_FAILURE; - } - if (dri->GetUint32(resourceNode, "wlen", &resource->wlen, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read wlen fail"); - return HDF_FAILURE; - } - if (dri->GetUint32(resourceNode, "parity", &resource->parity, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read parity fail"); - return HDF_FAILURE; - } - if (dri->GetUint32(resourceNode, "stopBit", &resource->stopBit, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read stopBit fail"); - return HDF_FAILURE; - } - if (dri->GetUint32(resourceNode, "uartClk", &resource->uartClk, 0) != HDF_SUCCESS) { - HDF_LOGE("uart config read uartClk fail"); - return HDF_FAILURE; - } - return HDF_SUCCESS; - } - - // Attach the configuration and interface of the UART driver to the HDF. - static int32_t AttachUartDevice(struct UartHost *host, struct HdfDeviceObject *device) - { - int32_t ret; - struct UartDevice *uartDevice = NULL; - if (device->property == NULL) { - HDF_LOGE("%s: property is NULL", __func__); - return HDF_FAILURE; - } - uartDevice = (struct UartDevice *)OsalMemCalloc(sizeof(struct UartDevice)); - if (uartDevice == NULL) { - HDF_LOGE("%s: OsalMemCalloc uartDevice error", __func__); - return HDF_ERR_MALLOC_FAIL; - } - ret = GetUartDeviceResource(uartDevice, device->property); - if (ret != HDF_SUCCESS) { - (void)OsalMemFree(uartDevice); - return HDF_FAILURE; - } - host->num = uartDevice->resource.num; - host->priv = uartDevice; - AddUartDevice(host); - return InitUartDevice(uartDevice); - } - - // Initialize the UART driver. - static int32_t SampleUartDriverInit(struct HdfDeviceObject *device) - { - int32_t ret; - struct UartHost *host = NULL; - - if (device == NULL) { - HDF_LOGE("%s: device is NULL", __func__); - return HDF_ERR_INVALID_OBJECT; - } - HDF_LOGI("Enter %s:", __func__); - host = UartHostFromDevice(device); - if (host == NULL) { - HDF_LOGE("%s: host is NULL", __func__); - return HDF_FAILURE; - } - ret = AttachUartDevice(host, device); - if (ret != HDF_SUCCESS) { - HDF_LOGE("%s: attach error", __func__); - return HDF_FAILURE; - } - host->method = &g_sampleUartHostMethod; - return ret; - } - - static void DeinitUartDevice(struct UartDevice *device) - { - struct UartRegisterMap *regMap = (struct UartRegisterMap *)device->resource.physBase; - /* Wait for the UART to enter the idle state. */ - while (UartPl011IsBusy(regMap)); - UartPl011ResetRegisters(regMap); - uart_clk_cfg(0, false); - OsalIoUnmap((void *)device->resource.physBase); - device->state = UART_DEVICE_UNINITIALIZED; - } - - // Detach and release the UART driver. - static void DetachUartDevice(struct UartHost *host) - { - struct UartDevice *uartDevice = NULL; - - if (host->priv == NULL) { - HDF_LOGE("%s: invalid parameter", __func__); - return; - } - uartDevice = host->priv; - DeinitUartDevice(uartDevice); - (void)OsalMemFree(uartDevice); - host->priv = NULL; - } - - // Release the UART driver. - static void SampleUartDriverRelease(struct HdfDeviceObject *device) - { - struct UartHost *host = NULL; - HDF_LOGI("Enter %s:", __func__); - - if (device == NULL) { - HDF_LOGE("%s: device is NULL", __func__); - return; - } - host = UartHostFromDevice(device); - if (host == NULL) { - HDF_LOGE("%s: host is NULL", __func__); - return; - } - if (host->priv != NULL) { - DetachUartDevice(host); - } - UartHostDestroy(host); - } - - struct HdfDriverEntry g_sampleUartDriverEntry = { - .moduleVersion = 1, - .moduleName = "UART_SAMPLE", - .Bind = SampleUartDriverBind, - .Init = SampleUartDriverInit, - .Release = SampleUartDriverRelease, - }; - - HDF_INIT(g_sampleUartDriverEntry); - ``` - -3. Register a UART driver interface. - - Implement the UART driver interface using the template **UartHostMethod** provided by the HDF. - - ``` - static int32_t SampleUartHostInit(struct UartHost *host) - { - HDF_LOGI("%s: Enter", __func__); - if (host == NULL) { - HDF_LOGE("%s: invalid parameter", __func__); - return HDF_ERR_INVALID_PARAM; - } - return HDF_SUCCESS; - } - - static int32_t SampleUartHostDeinit(struct UartHost *host) - { - HDF_LOGI("%s: Enter", __func__); - if (host == NULL) { - HDF_LOGE("%s: invalid parameter", __func__); - return HDF_ERR_INVALID_PARAM; - } - return HDF_SUCCESS; - } - - // Write data into the UART device. - static int32_t SampleUartHostWrite(struct UartHost *host, uint8_t *data, uint32_t size) - { - HDF_LOGI("%s: Enter", __func__); - uint32_t idx; - struct UartRegisterMap *regMap = NULL; - struct UartDevice *device = NULL; - - if (host == NULL || data == NULL || size == 0) { - HDF_LOGE("%s: invalid parameter", __func__); - return HDF_ERR_INVALID_PARAM; - } - device = (struct UartDevice *)host->priv; - if (device == NULL) { - HDF_LOGE("%s: device is NULL", __func__); - return HDF_ERR_INVALID_PARAM; - } - regMap = (struct UartRegisterMap *)device->resource.physBase; - for (idx = 0; idx < size; idx++) { - UartPl011Write(regMap, data[idx]); - } - return HDF_SUCCESS; - } - - // Set the baud rate for the UART device. - static int32_t SampleUartHostSetBaud(struct UartHost *host, uint32_t baudRate) - { - HDF_LOGI("%s: Enter", __func__); - struct UartDevice *device = NULL; - struct UartRegisterMap *regMap = NULL; - UartPl011Error err; - - if (host == NULL) { - HDF_LOGE("%s: invalid parameter", __func__); - return HDF_ERR_INVALID_PARAM; - } - device = (struct UartDevice *)host->priv; - if (device == NULL) { - HDF_LOGE("%s: device is NULL", __func__); - return HDF_ERR_INVALID_PARAM; - } - regMap = (struct UartRegisterMap *)device->resource.physBase; - if (device->state != UART_DEVICE_INITIALIZED) { - return UART_PL011_ERR_NOT_INIT; - } - if (baudRate == 0) { - return UART_PL011_ERR_INVALID_BAUD; - } - err = UartPl011SetBaudrate(regMap, device->uartClk, baudRate); - if (err == UART_PL011_ERR_NONE) { - device->baudrate = baudRate; - } - return err; - } - - // Obtain the baud rate of the UART device. - static int32_t SampleUartHostGetBaud(struct UartHost *host, uint32_t *baudRate) - { - HDF_LOGI("%s: Enter", __func__); - struct UartDevice *device = NULL; - - if (host == NULL) { - HDF_LOGE("%s: invalid parameter", __func__); - return HDF_ERR_INVALID_PARAM; - } - device = (struct UartDevice *)host->priv; - if (device == NULL) { - HDF_LOGE("%s: device is NULL", __func__); - return HDF_ERR_INVALID_PARAM; - } - *baudRate = device->baudrate; - return HDF_SUCCESS; - } - - // Bind the UART device using HdfUartSampleInit. - struct UartHostMethod g_sampleUartHostMethod = { - .Init = SampleUartHostInit, - .Deinit = SampleUartHostDeinit, - .Read = NULL, - .Write = SampleUartHostWrite, - .SetBaud = SampleUartHostSetBaud, - .GetBaud = SampleUartHostGetBaud, - .SetAttribute = NULL, - .GetAttribute = NULL, - .SetTransMode = NULL, - }; - ``` - - Add the sample module of the UART driver to the compilation script **device/hisilicon/drivers/lite.mk**. - - ``` - LITEOS_BASELIB += -lhdf_uart_sample - LIB_SUBDIRS += $(LITEOS_SOURCE_ROOT)/drivers/framework/sample/platform/uart - ``` - -4. Implement the code for interaction between the user-space applications and driver. - - Create the **/dev/uartdev-5** node after the UART driver is initialized successfully. The following example shows how to interact with the UART driver through the node. - - ``` - #include - #include - #include - #include "hdf_log.h" - - #define HDF_LOG_TAG "hello_uart" - #define INFO_SIZE 16 - - int main(void) - { - int ret; - int fd; - const char info[INFO_SIZE] = {" HELLO UART! "}; - - fd = open("/dev/uartdev-5", O_RDWR); - if (fd < 0) { - HDF_LOGE("hello_uart uartdev-5 open failed %d", fd); - return -1; - } - ret = write(fd, info, INFO_SIZE); - if (ret != 0) { - HDF_LOGE("hello_uart write uartdev-5 ret is %d", ret); - } - ret = close(fd); - if (ret != 0) { - HDF_LOGE("hello_uart uartdev-5 close failed %d", fd); - return -1; - } - return ret; - } - ``` - - Add the **hello\_uart\_sample** component to **targets** of the **hdf\_hi3516dv300\_liteos\_a** component in the **build/lite/components/hdf.json** file. - - ``` - { - "components": [ - { - "component": "hdf_hi3516dv300_liteos_a", - ... - "targets": [ - "//drivers/framework/sample/platform/uart:hello_uart_sample" - ] - } - ] - } - ``` - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >Preceding code snippets are for reference only. You can view the complete sample code in **drivers/framework/sample**. - >The sample code is not automatically compiled by default. You can add it to the compilation script. - - -## Building Source Code and Burning Images - -Perform the [building](quickstart-lite-steps-hi3516-running.md#section1077671315253) and [burning](quickstart-lite-steps-hi3516-running.md#section1347011412201) as instructed in **Running a Hello OHOS Program**. - -## Running an Image - -1. Connect to a serial port. - - >![](../public_sys-resources/icon-notice.gif) **NOTICE:** - >If the connection fails, rectify the fault by referring to [FAQs](quickstart-lite-steps-hi3516-faqs.md#section14871149155911). - - **Figure 1** Serial port connection - ![](figures/serial-port-connection.png "serial-port-connection") - - 1. Click **Monitor** to enable the serial port. - 2. Press **Enter** repeatedly until **hisilicon** displays. - 3. Go to step [2](#li109940111259) if the board is started for the first time or the startup parameters need to be modified; go to step [3](#li448312542515) otherwise. - -2. \(Mandatory when the board is started for the first time\) Modify the **bootcmd** and **bootargs** parameters of U-Boot. You need to perform this step only once if the parameters need not to be modified during the operation. The board automatically starts after it is reset. - - >![](../public_sys-resources/icon-notice.gif) **NOTICE:** - >The default waiting time in the U-Boot is 2s. You can press **Enter** to interrupt the waiting and run the **reset** command to restart the system after "hisilicon" is displayed. - - **Table 1** Parameters of the U-Boot - - - - - - - - - - - - - - - - - - - -

Command

-

Description

-

setenv bootcmd "mmc read 0x0 0x80000000 0x800 0x4800; go 0x80000000";

-

Run this command to read content that has a size of 0x4800 (9 MB) and a start address of 0x800 (1 MB) to the memory address 0x80000000. The file size must be the same as that of the OHOS_Image.bin file in the IDE.

-

setenv bootargs "console=ttyAMA0,115200n8 root=emmc fstype=vfat rootaddr=10M rootsize=20M rw";

-

Run this command to set the output mode to serial port output, baud rate to 115200, data bit to 8, rootfs to be mounted to the emmc component, and file system type to vfat.

-

rootaddr=10M rootsize=20M rw indicates the start address and size of the rootfs.img file to be burnt, respectively. The file size must be the same as that of the rootfs.img file in the IDE.

-

saveenv

-

saveenv means to save the current configuration.

-

reset

-

reset means to reset the board.

-
- - >![](../public_sys-resources/icon-notice.gif) **NOTICE:** - >**go 0x80000000** is optional. It indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press **Enter** in the countdown phase of the U-Boot startup to interrupt the automatic startup. - -3. Run the **reset** command and press **Enter** to restart the board. After the board is restarted, **OHOS** is displayed when you press **Enter**. - - **Figure 2** System startup - ![](figures/system-startup.png "system-startup") - -4. In the root directory, run the **./bin/hello\_uart** command line to execute the demo program. The compilation result is shown in the following example. - - ``` - OHOS # ./bin/hello_uart - OHOS # HELLO UART! - ``` - - -## Follow-up Learning - -Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/device-iotcamera.md). - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3518-faqs.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3518-faqs.md deleted file mode 100644 index 0ffca08c54..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3518-faqs.md +++ /dev/null @@ -1,154 +0,0 @@ -# FAQs - -## "Error: Opening COMxx: Access denied" Is Displayed After a Serial Port Is Selected for Burning - -- **Symptom** - - **Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port. - - ![](figures/failed-to-open-the-serial-port.png) - -- **Possible Causes** - - The serial port has been used. - -- Solution - - The serial port may be in use. Perform the following steps to troubleshoot: - - 1. Search for the serial port from the drop-down list in the **TERMINAL** panel. - - ![](figures/terminal-list.png) - - 2. Click the dustbin for the terminal using the serial port to disable the terminal. - - -## What should I do when Windows-based PC failed to be connected to the board? - -- **Symptom** - - The file image cannot be obtained after clicking **Burn** and selecting a serial port. - - **Figure 1** Failed to obtain the image file due to unavailable connection - ![](figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-0.png "failed-to-obtain-the-image-file-due-to-unavailable-connection-0") - -- **Possible Causes** - - The board is disconnected from the Windows-based PC. - - Windows Firewall does not allow Visual Studio Code to access the network. - -- **Solutions** - -1. Check whether the network cable is properly connected. -2. Click **Windows Firewall**. - - ![](figures/hi3518-network-and-firewall-setting.png) - -3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**. - - ![](figures/hi3518-firewall-and-network-protection.png) - -4. Select the Visual Studio Code application. - - ![](figures/hi3518-selecting-the-visual-studio-code-application.png) - -5. Select the **Private** and **Public** network access rights for the Visual Studio Code application. - - ![](figures/hi3518-allowing-the-visual-studio-code-application-to-access-the-network.png) - - -## What should I do when the image failed to be burnt? - -- **Symptom** - - The burning status is not displayed after clicking **Burn** and selecting a serial port. - -- **Possible Causes** - - The IDE is not restarted after the DevEco plug-in is installed. - -- **Solutions** - - Restart the IDE. - - -## What should I do when the message indicating Python cannot be found is displayed during compilation and building? - -- **Symptom** - - ![](figures/hi3518-error-for-not-finding-python.png) - - -- **Possible Cause 1** - - Python is not installed. - -- **Solutions** - - [Install Python](../quick-start/quickstart-lite-env-setup-linux.md). - -- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. - - ![](figures/hi3518-reason-no-python-soft-link.png) - -- **Solutions** - - Run the following commands: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - Example: - - ![](figures/hi3518-solution-set-python-soft-link.png) - - -## What should I do when no command output is displayed? - -- **Symptom** - - The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**. - -- **Possible Cause 1** - - The serial port is connected incorrectly. - -- **Solutions** - - Change the serial port number. - - Start **Device Manager** to check whether the serial port connected to the board is the same as that connected to the terminal device. If the serial ports are different, perform step 1 in the **Running an Image** section to change the serial port number. - - -- **Possible Cause 2** - - The U-Boot of the board is damaged. - -- **Solutions** - - Burn the U-Boot. - - If the fault persists after you perform the preceding operations, the U-Boot of the board may be damaged. You can burn the U-Boot by performing the following steps: - - -1. Obtain the U-Boot file. - - >![](../public_sys-resources/icon-notice.gif) **NOTICE:** - >The U-Boot file of the two boards can be obtained from the following paths, respectively. - >Hi3516D V300: **device\\hisilicon\\hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3516dv300.bin** - >Hi3518E V300: **device\\hisilicon\\hispark\_aries\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3518ev300.bin** - -2. Burn the U-Boot file by following the procedures for burning a U-Boot file over USB. - - Select the U-Boot files of corresponding development boards for burning by referring to [Programming Flash Memory on the Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681)/[Programming Flash Memory on the Hi3518](https://device.harmonyos.com/en/docs/ide/user-guides/hi3518_upload-0000001057313128) - -3. Log in to the serial port after the burning is complete. - - ![](figures/login-serial-port.png) - - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3518-running.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3518-running.md deleted file mode 100644 index 6d16d33c4c..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3518-running.md +++ /dev/null @@ -1,233 +0,0 @@ -# Running a Hello OHOS Program - -This section describes how to create, compile, burn, and run the first program, and finally print **Hello OHOS!** on the develop board. - -## Creating a Program - -1. Create a directory and the program source code. - - Create the **applications/sample/camera/apps/src/helloworld.c** directory and file whose code is shown in the following example. You can customize the content to be printed. For example, you can change **OHOS** to **World**. You can use either C or C++ to develop a program. - - ``` - #include - - int main(int argc, char **argv) - { - printf("\n************************************************\n"); - printf("\n\t\tHello OHOS!\n"); - printf("\n************************************************\n\n"); - - return 0; - } - ``` - -2. Create a build file. - - Create the **applications/sample/camera/apps/BUILD.gn** file. The file content is as follows: - - ``` - import("//build/lite/config/component/lite_component.gni") - lite_component("hello-OHOS") { - features = [ ":helloworld" ] - } - executable("helloworld") { - output_name = "helloworld" - sources = [ "src/helloworld.c" ] - include_dirs = [] - defines = [] - cflags_c = [] - ldflags = [] - } - ``` - -3. Add a component. - - Add the configuration of the **hello\_world\_app** component to the **build/lite/components/applications.json** file. The sample code below shows some configurations defined in the **applications.json** file, and the code between **"\#\#start\#\#"** and **"\#\#end\#\#"** is the new configuration \(Delete the rows where **"\#\#start\#\#"** and **"\#\#end\#\#"** are located after the configurations are added.\) - - ``` - { - "components": [ - { - "component": "camera_sample_communication", - "description": "Communication related samples.", - "optional": "true", - "dirs": [ - "applications/sample/camera/communication" - ], - "targets": [ - "//applications/sample/camera/communication:sample" - ], - "rom": "", - "ram": "", - "output": [], - "adapted_kernel": [ "liteos_a" ], - "features": [], - "deps": { - "components": [], - "third_party": [] - } - }, - ##start## - { - "component": "hello_world_app", - "description": "Communication related samples.", - "optional": "true", - "dirs": [ - "applications/sample/camera/apps" - ], - "targets": [ - "//applications/sample/camera/apps:hello-OHOS" - ], - "rom": "", - "ram": "", - "output": [], - "adapted_kernel": [ "liteos_a" ], - "features": [], - "deps": { - "components": [], - "third_party": [] - } - }, - ##end## - { - "component": "camera_sample_app", - "description": "Camera related samples.", - "optional": "true", - "dirs": [ - "applications/sample/camera/launcher", - "applications/sample/camera/cameraApp", - "applications/sample/camera/setting", - "applications/sample/camera/gallery", - "applications/sample/camera/media" - ], - ``` - -4. Modify the board configuration file. - - Add the **hello\_world\_app** component to the **vendor/hisilicon/hispark\_aries/config.json** file. The sample code below shows the configurations of the **applications** subsystem, and the code between **\#\#start\#\#** and **\#\#end\#\#** is the new configuration \(Delete the rows where **\#\#start\#\#** and **\#\#end\#\#** are located after the configurations are added.\) - - ``` - { - "subsystem": "applications", - "components": [ - ##start## - { "component": "hello_world_app", "features":[] }, - ##end## - { "component": "camera_sample_app", "features":[] } - - ] - }, - ``` - - -## Building - -If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/gettools-acquire.md#section107932281315). If the Linux environment is installed using a software package, go to the root directory of the source code and run the following commands for source code compilation: - -``` -hb set (Set the building path.) -. (Select the current path.) -Select ipcamera_hispark_aries@hisilicon and press Enter. -hb build -f (Start building.) -``` - -The result files are generated in the **out/hispark\_aries/ipcamera\_hispark\_aries** directory. - -**Figure 1** Hi3518 settings -![](figures/hi3518-settings.png "hi3518-settings") - ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->The U-Boot file of the Hi3518E V300 development board can be obtained from the following path: device/hisilicon/hispark\_aries/sdk\_liteos/uboot/out/boot/u-boot-hi3518ev300.bin - -## Burning - -Burning is the process of downloading compiled program files to a chipset development board to provide a basis for subsequent debugging. With the one-click burning function of DevEco Device Tool, you can burn development boards quickly and efficiently. - -You can burn the Hi3518E V300 development board through the USB port or serial port. - -- **Windows system: Supports burning through the USB port or serial port** -- **Linux system: Supports burning through the serial port \(Linux+Windows dual system: Supports burning through the serial port or USB port\)** - -Except for environment setup, the operations of burning are the same for Windows and Linux. - -The following uses the USB port burning as an example. - -1. Connect the PC and the target development board through the serial port and USB port. For details, see [Introduction to the Hi3518 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des_3518-0000001105201138). -2. Open Device Manager, then check and record the serial port number corresponding to the development board. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If the serial port number is not displayed correctly, follow the steps described in [Installing the Serial Port Driver on the Hi3516 or Hi3518 Series Development Boards](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695). - - ![](figures/hi3518-record-the-serial-port-number.png) - -3. Open DevEco Device Tool, choose **QUICK ACCESS** \> **DevEco Home** \> **Projects**, and then click **Settings**. - - ![](figures/hi3518-deveco-device-tool-setting.png) - -4. On the **Partition Configuration** tab page, modify the settings. In general cases, you can leave the fields at their default settings. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If the file to be burnt is obtained by copying, you must manually change the path of the file to be burnt: Click the tab of the file to be burnt, select **Partition\_bin** from the **New Option** drop-down list box in **Partition Settings**, and set the path of the file to be burnt in **Partition\_bin**. - -5. On the **hi3518ev300** tab page, set the burning options. - - - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001057313128_li46411811196). - - **upload\_protocol**: Select the burning protocol **hiburn-usb**. - - **upload\_partitions**: Select the files to be burnt. By default, the **fastboot**, **kernel**, **rootfs**, and **userfs** files are burnt at the same time. - - ![](figures/upload-options.png) - -6. When you finish modifying, click **Save** in the upper right corner. -7. Open the project file, go to ![](figures/hi3518-deveco-device-tool-logo.png) \> **PROJECT TASKS** \> **hi3518ev300\_fastboot** \> **Erase** to erase U-Boot. - - ![](figures/erase-u-boot.png) - -8. When the following message is displayed, power off the development board and then power it on. - - ![](figures/hi3518-restart-the-development-board.png) - -9. If the following message is displayed, it indicates that U-Boot is erased successfully. - - ![](figures/u-boot-erased-successfully.png) - -10. Go to **hi3518ev300** \> **Upload** to start burning. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If this is the first time you burn the Hi3516D V300 or Hi3518E V300 board, the message "not find the Devices" may be displayed. In this case, follow the steps in [Installing the USB Driver on the Hi3516 or Hi3518 Series Development Boards](https://device.harmonyos.com/en/docs/ide/user-guides/usb_driver-0000001058690393) and start burning again. - - ![](figures/hi3518-upload.png) - -11. If the following message is displayed, it indicates that the burning is successful. - - ![](figures/hi3518-burning-succeeded.png) - -12. When the burning is successful, perform the operations in Running an Image to start the system. - -## Running an Image - -After burning is completed, you need to configure the bootloader to run the OpenHarmony system. - -1. In the Hi3518E V300 task, click **Configure bootloader \(Boot OS\)** to configure the bootloader. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >The bootloader configuration in DevEco Device Tool has been adapted to Hi3518E V300. Therefore, no manual modification is needed. - - ![](figures/hi3518-bootloader.png) - -2. When the message shown below is displayed, restart the development board. If **SUCCESS** is displayed, it indicates that the configuration is successful. - - ![](figures/hi3518-reset-success.png) - -3. Click **Monitor** on the taskbar to start the serial port tool. - - ![](figures/hi3518-monitor.png) - -4. Follow the onscreen instructions until **OHOS \#** is displayed, indicating that the system is started successfully. - - ![](figures/hi3518-reboot-success.png) - - -## Follow-up Learning - -Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/device-iotcamera.md). - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3518-setting.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3518-setting.md deleted file mode 100644 index f1b4e562e8..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3518-setting.md +++ /dev/null @@ -1,104 +0,0 @@ -# Setting Up the Environment - -## Environment Requirements - -### Hardware - -- Hi3518E V300 IoT camera development board -- USB-to-serial cable and network cable \(The Windows workstation is connected to the Hi3518E V300 development board through the USB-to-serial cable and network cable.\) - - The following figure shows the hardware connections. - - **Figure 1** Hi3518 hardware connections - ![](figures/hi3518-hardware-connections.png "hi3518-hardware-connections") - - -### Software - ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->This section describes how to use an installation package to set up the compilation and development environment. If you are going to use Docker to set up the environment, skip this section and [Installing Linux Build Tools](#section8831868501). - -The following table describes the tools required for setting up the general environment for a Linux server of the Hi3518 development board and how to obtain these tools. - -**Table 1** Development tools and obtaining methods - - - - - - - - - - - - - - - - - - - - -

Development Tool

-

Description

-

How to Obtain

-

bash

-

Processes CLI commands.

-

System configuration

-

Basic software package for compilation and building (required only for Ubuntu 20+)

-

Provides a basic software package for compilation and building.

-

Internet

-

dosfstools, mtools, and mtd-utils

-

Pack files.

-

apt-get install

-
- -## Installing Linux Build Tools - ->![](../public_sys-resources/icon-notice.gif) **NOTICE:** ->- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install **hc-gen**. ->- \(Recommended\) If you obtain the source code via the mirror site or code repository, install **hc-gen**. When installing the compilation tool, ensure that its environment variable path is unique. - -### Changing Linux Shell to Bash - -Check whether bash is used as the shell. - -``` -ls -l /bin/sh -``` - -If **/bin/sh -\> bash** is not displayed, do as follows to change shell to bash. - -**Method 1:** Run the following command on the device and then click **No**. - -``` -sudo dpkg-reconfigure dash -``` - -**Method 2:** Run the first command to delete **sh** and then run the second command to create a new soft link. - -``` -sudo rm -rf /bin/sh -sudo ln -s /bin/bash /bin/sh -``` - -### Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\) - -Install the software. - -``` -sudo apt-get install build-essential gcc g++ make zlib* libffi-dev -``` - -### Installing File Packing Tools - -1. Start a Linux server. -2. Install dosfstools, mtools, and mtd-utils. - - ``` - sudo apt-get install dosfstools mtools mtd-utils - ``` - - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3518.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3518.md deleted file mode 100644 index c9b43c657d..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3518.md +++ /dev/null @@ -1,9 +0,0 @@ -# Hi3518 - -- **[Setting Up the Environment](quickstart-lite-steps-hi3518-setting.md)** - -- **[Running a Hello OHOS Program](quickstart-lite-steps-hi3518-running.md)** - -- **[FAQs](quickstart-lite-steps-hi3518-faqs.md)** - - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-burn.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3861-burn.md index 41c5b7ae41..5a2d1a31a5 100644 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-burn.md +++ b/en/device-dev/quick-start/quickstart-lite-steps-hi3861-burn.md @@ -87,4 +87,4 @@ After the source code is imported, perform the following steps: 10. Wait until the burning is complete. When the following message is displayed, the burning is successful. - ![en-us_image_0000001216761476](figures/en-us_image_0000001216761476.png) + ![en-us_image_0000001216761476](figures/en-us_image_0000001216761476.png) \ No newline at end of file diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-connection.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3861-connection.md deleted file mode 100644 index c1ef04f654..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-connection.md +++ /dev/null @@ -1,131 +0,0 @@ -# Setting Up WLAN Connection - -This example shows how to connect the WLAN module to the gateway using attention \(AT\) commands. - -## Building Source Code - -This section describes how to perform the WLAN module building on a Linux server. - -If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/gettools-acquire.md#section107932281315). If the Linux environment is installed using a software package, perform the following steps: - -1. Open the HUAWEI DevEco Device Tool and choose **View** \> **Terminal**. - - **Figure 1** Starting the IDE terminal tool - ![](figures/starting-the-ide-terminal-tool.png "starting-the-ide-terminal-tool") - - On the **TERMINAL** panel, run the ssh command, for example, **ssh** **_user_@_ipaddr_**, to connect to the Linux server. - - **Figure 2** TERMINAL panel - ![](figures/terminal-panel.png "terminal-panel") - -2. Go to the root directory of the code, run the **hb set** and **.** commands on the **TERMINAL** panel, and select the **wifiiot\_hispark\_pegasus** version. - - **Figure 3** Selecting the target build version - ![](figures/selecting-the-target-build-version.png "selecting-the-target-build-version") - -3. Run the **hb build** command to start building. - - **Figure 4** Running commands on the TERMINAL panel - ![](figures/running-commands-on-the-terminal-panel.png "running-commands-on-the-terminal-panel") - -4. Check whether the building is successful. If yes, **wifiiot\_hispark\_pegasus build success** will be displayed, as shown in the following figure. - - **Figure 5** Successful building - ![](figures/successful-building.png "successful-building") - -5. Check whether the following files are generated in the **./out/wifiiot/** directory. - - ``` - ls -l out/hispark_pegasus/wifiiot_hispark_pegasus/ - ``` - - **Figure 6** Directory for storing the generated files - ![](figures/directory-for-storing-the-generated-files.png "directory-for-storing-the-generated-files") - - -## Burning Images - -Burning is the process of downloading compiled program files to a chipset development board to provide a basis for subsequent debugging. With the one-click burning function of DevEco Device Tool, you can burn development boards quickly and efficiently. - -**You can burn to the Hi3861 V100 development board through the serial port using the burn-serial or hiburn-serial protocol. The hiburn-serial protocol is applicable to both Windows and Linux systems, while the burn-serial is applicable to Linux only.** - ->![](../public_sys-resources/icon-note.gif) **NOTE:** ->The burn-serial protocol is used for compatibility with the projects of historical versions. It does not differ from hiburn-serial in operations. - -The operations for burning in Windows and Linux are the same. The only difference lies in the environment setup for DevEco Device Tool. - -1. Connect the PC and the target development board through the USB port. For details, see [Introduction to the Hi3861 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des_3861-0000001105041324). -2. Open Device Manager, then check and record the serial port number corresponding to the development board. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If the serial port number is not displayed correctly, follow the steps described in [Installing the Serial Port Driver on the Hi3861 Series Development Board](https://device.harmonyos.com/en/docs/ide/user-guides/hi3861-drivers-0000001058153433). - - ![](figures/hi3861-record-the-serial-port-number.png) - -3. Open DevEco Device Tool, choose **QUICK ACCESS** \> **DevEco Home** \> **Projects**, and then click **Settings**. - - ![](figures/hi3861-deveco-device-tool-setting.png) - -4. On the **Partition Configuration** tab page, modify the settings. In general cases, you can leave the fields at their default settings. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If the file to be burnt is obtained by copying, you must manually change the path of the file to be burnt: Click the tab of the file to be burnt, select **Partition\_bin** from the **New Option** drop-down list box in **Partition Settings**, and set the path of the file to be burnt in **Partition\_bin**. - -5. On the **hi3861** tab page, set the burning options. - - - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001056563976_li848662117291). - - **upload\_protocol**: Select the burning protocol. For Windows, set this parameter to **burn-serial** or **hiburn-serial**. For Linux, set this parameter to **hiburn-serial**. - - **upload\_partitions**: Select the files to be burnt. **hi3861\_app** is selected by default. - - ![](figures/options.png) - -6. When you finish modifying, click **Save** in the upper right corner. -7. Open the project file. In the DevEco Device Tool window, go to **PROJECT TASKS** \> **hi3861** \> **Upload** to start burning. - - ![](figures/hi3861-upload.png) - -8. When the following information is displayed, press the RST button on the development board to restart it. - - ![](figures/hi3861-restart-the-development-board.png) - -9. If the following message is displayed, it indicates that the burning is successful. - - ![](figures/hi3861-burning-succeeded.png) - - -## Connecting WLAN Module to the Internet. - -After completing version building and burning, do as follows to connect the WLAN module to the Internet using AT commands. - -1. Click the icon of **DevEco: Serial Monitor** at the bottom of DevEco Studio to keep the connection between the Windows workstation and the WLAN module. - - **Figure 7** Opening the DevEco serial port - ![](figures/opening-the-deveco-serial-port.png "opening-the-deveco-serial-port") - -2. Reset the WLAN module. The message **ready to OS start** is displayed on the **TERMINAL** panel, indicating that the WLAN module is started successfully. - - **Figure 8** Successful resetting of the WLAN module - ![](figures/successful-resetting-of-the-wlan-module.png "successful-resetting-of-the-wlan-module") - -3. Run the following AT commands in sequence via the DevEco serial port terminal to start the STA mode, connect to the specified AP, and enable Dynamic Host Configuration Protocol \(DHCP\). - - ``` - AT+STARTSTA # Start the STA mode. - AT+SCAN # Scan for available APs. - AT+SCANRESULT # Display the scanning result. - AT+CONN="SSID",,2,"PASSWORD" # Connect to the specified AP. (SSID and PASSWORD represent the name and password of the hotspot to be connected, respectively.) - AT+STASTAT # View the connection result. - AT+DHCP=wlan0,1 # Request the IP address of wlan0 from the AP using DHCP. - ``` - -4. Check whether the WLAN module is properly connected to the gateway, as shown in the following figure. - - ``` - AT+IFCFG # View the IP address assigned to an interface of the module. - AT+PING=X.X.X.X # Check the connectivity between the module and the gateway. Replace X.X.X.X with the actual gateway address. - ``` - - **Figure 9** Successful networking of the WLAN module - ![](figures/successful-networking-of-the-wlan-module.png "successful-networking-of-the-wlan-module") - - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-faqs.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3861-faqs.md deleted file mode 100644 index 3d9f4c7890..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-faqs.md +++ /dev/null @@ -1,291 +0,0 @@ -# FAQs - -## What should I do when the message **configure: error: no acceptable C compiler found in $PATH** is displayed during Python 3 installation? - -- **Symptom** - - The following error occurs during Python 3 installation: - - ``` - configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details - ``` - -- **Possible Causes** - - **GCC** is not installed. - -- **Solutions** - - 1. Run the **apt-get install gcc** command to install **GCC** online. - - 2. After the installation, reinstall Python 3. - - -## What should I do when the message **-bash: make: command not found** is displayed during Python 3 installation? - -- **Symptom** - - The following error occurs during Python 3 installation: - - ``` - -bash: make: command not found - ``` - -- **Possible Causes** - - **Make** is not installed. - -- **Solutions** - - 1. Run the **apt-get install make** command to install **Make** online. - - 2. After the installation, reinstall Python 3. - - -## What should I do when the message **zlib not available** is displayed during Python 3 installation? - -- **Symptom** - - The following error occurs during Python 3 installation: - - ``` - zipimport.ZipImportError: can't decompress data; zlib not available - ``` - -- **Possible Causes** - - **zlib** is not installed. - -- **Solutions** - - Solution 1: Run the **apt-get install zlib** command to install **zlib** online. - - Solution 2: If the software source does not contain **zlib**, download the source code from [http://www.zlib.net/](http://www.zlib.net/). - - ![](figures/download-zlib.png) - - Then run the following commands to install **zlib** offline: - - ``` - # tar xvf zlib-1.2.11.tar.gz - # cd zlib-1.2.11 - # ./configure - # make && make install - ``` - - After the installation, reinstall Python 3. - - -## What should I do when the message **No module named '\_ctypes'** is displayed during Python 3 installation? - -- **Symptom** - - The following error occurs during Python 3 installation: - - ``` - ModuleNotFoundError: No module named '_ctypes' - ``` - - -- **Possible Causes** - - **libffi** and **libffi-devel** are not installed. - - -- **Solutions** - - 1. Run the **apt-get install libffi\* -y** command to install **libffi** and **libffi-devel** online. - - 2. After the installation, reinstall Python 3. - - -## What should I do when the message **No module named 'Crypto'** is displayed during compilation and building? - -- **Symptom** - - The following error occurs during compilation and building: - - ``` - ModuleNotFoundError: No module named 'Crypto' - ``` - - -- **Possible Causes** - - **Crypto** is not installed. - - -- **Solutions** - - Solution 1: Run the **pip3 install Crypto** command to install **Crypto** online. - - Solution 2: Install **Crypto** offline. - - - Download the source code from [https://pypi.org/project/pycrypto/\#files](https://pypi.org/project/pycrypto/#files). - - ![](figures/download-the-source-code.png) - - - Save the source code package to the Linux server, decompress the package, and run the **python3 setup.py install** command to install **Crypto**. - - Rebuild an environment. - - -## What should I do when the message **No module named 'ecdsa'** is displayed during compilation and building? - -- **Symptom** - - The following error occurs during compilation and building: - - ``` - ModuleNotFoundError: No module named 'ecdsa' - ``` - - -- **Possible Causes** - - **ecdsa** is not installed. - - -- **Solutions** - - Solution 1: Run the **pip3 install ecdsa** command to install **ecdsa** online. - - Solution 2: Install **ecdsa** offline. - - - Download the installation package from [https://pypi.org/project/ecdsa/\#files](https://pypi.org/project/ecdsa/#files). - - ![](figures/download-ecdsa.png) - - - Save the installation package to the Linux server and run the **pip3 install ecdsa-0.15-py2.py3-none-any.whl** command to install **ecdsa**. - - Rebuild an environment. - - -## What should I do when the message **Could not find a version that satisfies the requirement six\>=1.9.0** is displayed during compilation and building? - -- **Symptom** - - The following error occurs during compilation and building: - - ``` - Could not find a version that satisfies the requirement six>=1.9.0 - ``` - - -- **Possible Causes** - - **six** is not installed. - - -- **Solutions** - - Solution 1: Run the **pip3 install six** command to install **six** online. - - Solution 2: Install **six** offline. - - - Download the installation package from [https://pypi.org/project/six/\#files](https://pypi.org/project/six/#files). - - ![](figures/download-six.png) - - - Save the source code to the Linux server and run the **pip3 install six-1.14.0-py2.py3-none-any.whl** command to install **six**. - - Rebuild an environment. - - -## What should I do when the message **cannot find -lgcc** is displayed during compilation and building? - -- **Symptom** - - The following error occurs during compilation and building: - - ``` - riscv32-unknown-elf-ld: cannot find -lgcc - ``` - - -- **Possible Causes** - - The PATH is incorrectly written by **gcc\_riscv32**. There is an extra slash \(/\). - - ``` - ~/gcc_riscv32/bin/:/data/toolchain/ - ``` - - -- **Solutions** - - Modify the PATH by deleting the slash \(/\). - - ``` - ~/gcc_riscv32/bin:/data/toolchain/ - ``` - - -## What should I do when the message indicating Python cannot be found is displayed during compilation and building? - -- **Symptom** - - The following error occurs during compilation and building: - - ``` - -bash: /usr/bin/python: No such file or directory - ``` - - -- **Possible Cause 1:** Python is not installed. -- **Solutions** - - [Install Python](../quick-start/quickstart-lite-env-setup-linux.md). - -- **Possible Cause 2:** The soft link that points to the Python does not exist in the **usr/bin** directory. - - ![](figures/reason-no-python-soft-link.png) - -- **Solutions** - - Run the following commands to add a soft link: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - Example: - - ![](figures/solution-add-soft-link.png) - - -## What should I do when the message indicating Python3 cannot be found is displayed during compilation and building? - -- **Symptom** - - ![](figures/11.png) - - -- **Possible Causes** - - Python 3 is not installed. - -- **Solutions** - - [Install Python](../quick-start/quickstart-lite-env-setup-linux.md). - - -## What should I do when an error with **lsb\_release** occurs during **kconfiglib** installation? - -- **Symptom** - - The following error occurs during **kconfiglib** installation: - - ``` - subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1. - ``` - -- **Possible Causes** - - The Python version matched with the **lsb\_release** module is different from the current Python version. - -- **Solutions** - - Run the **find / -name lsb\_release** command, for example, **sudo rm -rf /usr/bin/lsb\_release** to locate and delete **lsb\_release**. - - diff --git a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-running.md b/en/device-dev/quick-start/quickstart-lite-steps-hi3861-running.md deleted file mode 100644 index ba2c045de3..0000000000 --- a/en/device-dev/quick-start/quickstart-lite-steps-hi3861-running.md +++ /dev/null @@ -1,149 +0,0 @@ -# Running a Hello World Program - -This example shows how to compile a simple service and print **Hello World** to help you preliminarily understand how to run OpenHarmony on Hi3861. - -## Modifying Source Code - -The source code needs to be modified when fixing bugs or compiling a new service. The following describes how to modify the source code when compiling a new service, for example, **my\_first\_app**. - -1. Determine the directory structure. - - Before compiling a service, you must create a directory \(or a directory structure\) in **./applications/sample/wifi-iot/app** to store source code files. - - For example, add the **my\_first\_app** service to the **app** directory, where **hello\_world.c** is the service code and **BUILD.gn** is the compilation script. The directory structure is shown as follows: - - ``` - . - └── applications - └── sample - └── wifi-iot - └── app - │── my_first_app - │ │── hello_world.c - │ └── BUILD.gn - └── BUILD.gn - ``` - -2. Compile the service code. - - Create the **hello\_world.c** file in **./applications/sample/wifi-iot/app/my\_first\_app**. Then, create the service entry function **HelloWorld** in **hello\_world.c** and implement service logic. Use the SYS\_RUN\(\) of the OpenHarmony **bootstrap** module to start services. \(**SYS\_RUN** is defined in the **ohos\_init.h** file.\) - - ``` - #include - #include "ohos_init.h" - #include "ohos_types.h" - - void HelloWorld(void) - { - printf("[DEMO] Hello world.\n"); - } - SYS_RUN(HelloWorld); - ``` - -3. Compile the **BUILD.gn** file for building services into a static library. - - Create the **BUILD.gn** file in **./applications/sample/wifi-iot/app/my\_first\_app** and fill in three parts \(target, source file, and header file path\) of the **BUILD.gn** file. - - ``` - static_library("myapp") { - sources = [ - "hello_world.c" - ] - include_dirs = [ - "//utils/native/lite/include" - ] - } - ``` - - - Specify the compilation result named libmyapp.a in **static\_library**. You can fill in this part based on your need. - - Specify the .c file on which a file depends and its path in **sources**. The path that contains **//** represents an absolute path \(the code root path\), otherwise it is a relative path. - - Specify the path of .h file on which **sources** depends in **include\_dirs**. - -4. Compile the **BUILD.gn** file and specify the feature modules to be built. - - Configure the **./applications/sample/wifi-iot/app/BUILD.gn** file and add an index to the **features** field to enable the target to be involved in compilation. Specify the path and target of a service module in **features**. The following uses **my\_first\_app** as an example and the **features** is configured as follows: - - ``` - import("//build/lite/config/component/lite_component.gni") - - lite_component("app") { - features = [ - "my_first_app:myapp", - ] - } - ``` - - - **my\_first\_app** is a relative path that points to **./applications/sample/wifi-iot/app/my\_first\_app/BUILD.gn**. - - **myapp** represents the **static\_library\("myapp"\)** in **./applications/sample/wifi-iot/app/my\_first\_app/BUILD.gn**. - - -## Debugging and Verification - -Currently, there are two debugging and verification methods: using printf to print logs and using ASM files to locate **panic** problems. You can select one of them based on your need. - -As the service shown is simple, use the printf method. The following describes the two debugging methods. - -### printf - -Add the **printf** function to the code, which helps print data to the serial port. You can add log printing in key service paths or service exception locations, as shown in the following figure. - -``` -void HelloWorld(void) -{ - printf("[DEMO] Hello world.\n"); -} -``` - -### Locating Exceptions Using the ASM File - -When the system exits abnormally, the call stack information about the abnormal exit is displayed on the serial port. The following is an example: You can locate the exception by parsing the exception stack information. - -``` -=======KERNEL PANIC======= -**********************Call Stack********************* -Call Stack 0 -- 4860d8 addr:f784c -Call Stack 1 -- 47b2b2 addr:f788c -Call Stack 2 -- 3e562c addr:f789c -Call Stack 3 -- 4101de addr:f78ac -Call Stack 4 -- 3e5f32 addr:f78cc -Call Stack 5 -- 3f78c0 addr:f78ec -Call Stack 6 -- 3f5e24 addr:f78fc -********************Call Stack end******************* -``` - -To parse the call stack information, the **Hi3861\_wifiiot\_app.asm** file is required. This file records the symbol addresses of the functions in the code in the flash memory and the disassembly information. The ASM file is built and output together with the version software package and is stored in the **./out/wifiiot/** directory. - -1. \(Optional\) Save the call stack information to a TXT file for later editing. -2. Open the ASM file, search for the function address in each call stack, and list the corresponding function. Generally, you only need to find the functions matching the first several stacks to locate exceptions. - - ``` - Call Stack 0 -- 4860d8 addr:f784c -- WadRecvCB - Call Stack 1 -- 47b2b2 addr:f788c -- wal_sdp_process_rx_data - Call Stack 2 -- 3e562c addr:f789c - Call Stack 3 -- 4101de addr:f78ac - Call Stack 4 -- 3e5f32 addr:f78cc - Call Stack 5 -- 3f78c0 addr:f78ec - Call Stack 6 -- 3f5e24 addr:f78fc - ``` - -3. Based on the above call stack information, it can be determined that an exception occurs in the **WadRecvCB** function. - - ![](figures/wadrecvcb-function.png) - -4. Check and modify the code. - -## Viewing Execution Result - -After the sample code is compiled, burnt, run, and debugged, the following information is displayed on the serial port interface: - -``` -ready to OS start -FileSystem mount ok. -wifi init success! -[DEMO] Hello world. -``` - -## Follow-up Learning - -Congratulations! You have finished all steps! You are advised to go on learning how to develop [WLAN-connected products](../guide/device-wlan.md). - diff --git a/en/device-dev/quick-start/quickstart-standard-burn.md b/en/device-dev/quick-start/quickstart-standard-burn.md deleted file mode 100644 index 8d06a9d394..0000000000 --- a/en/device-dev/quick-start/quickstart-standard-burn.md +++ /dev/null @@ -1,69 +0,0 @@ -# Burning Images - -Burning of a regular system requires DevEco Device Tool v2.2 Beta1 or later. - -Hi3516D V300 supports burning of the standard system through the USB port, network port, or serial port, where: - -- **Windows system: Supports burning through the USB port, serial port, or network port** -- **Linux system: Supports burning through the network port or serial port** - -Except for environment setup, the operations of burning are the same for Windows and Linux. - ->![](../public_sys-resources/icon-note.gif) **NOTE:** ->Currently, the Hi3516D V300 development board supports programming flash memory of the standard system through the USB port, network port, or serial port. This document uses the network port as an example. For details about programming flash memory over other ports, see [Programming Flash Memory on Hi3516D V300](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681). - -## Prerequisites - -In DevEco Device Tool, select **Import Project** to open the folder where the target file is located. Set **MCU** to **Hi3516DV300** under **HiSilicon\_Arm\_Linux** and **Framework** to **Ohos-sources** or **Hpm**. - -![](figures/hisilicon-arm-linux.png) - -## Programming Flash Memory Through the Network Port - -The Hi3516DV300 supports burning through the network port in Windows or Linux. - -1. Connect the PC and the target development board through the serial port, network port, and power port. For details, see [Introduction to the Hi3516 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des_3516-0000001152041033). -2. Open Device Manager, then check and record the serial port number corresponding to the development board. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If the serial port number is not displayed correctly, follow the steps described in [Installing the Serial Port Driver on the Hi3516 or Hi3518 Series Development Boards](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695). - - ![](figures/hi3516-record-the-serial-port-number.png) - -3. Open DevEco Device Tool, choose **QUICK ACCESS** \> **DevEco Home** \> **Projects**, and then click **Settings**. - - ![](figures/hi3516-deveco-device-tool-setting.png) - -4. On the **hi3516dv300** tab page, configure the burning options. - - - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001056443961_li1050616379507). - - **upload\_protocol**: Select the burning protocol **hiburn-net**. - - **upload\_partitions**: Select the files to be burnt. By default, **fastboot**, **boot**, **updater**, **misc**, **system**, **vendor**, and **userdata** are burnt at the same time. - - ![](figures/upload-options-2.png) - -5. Check and set the IP address of the network adapter connected to the development board. For details, see [Setting the IP Address of the Network Port for Burning to Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/set_ipaddress-0000001141825075). -6. Set the IP address of the network port for burning: - - - **upload\_net\_server\_ip**: Select the IP address set in step [5](#en-us_topic_0000001056443961_li85106114532), such as 192.168.1.2. - - **upload\_net\_client\_mask**: Set the subnet mask of the development board, such as 255.255.255.0. Once the **upload\_net\_server\_ip** field is set, this field will be automatically populated. Example: 255.255.255.0. - - **upload\_net\_client\_gw**: Set the gateway of the development board, such as 192.168.1.1. Once the **upload\_net\_server\_ip** field is set, this field will be automatically populated. Example: 192.168.1.1. - - **upload\_net\_client\_ip**: Set the IP address of the development board, such as 192.168.1.3. Once the **upload\_net\_server\_ip** field is set, this field will be automatically populated. Example: 192.168.1.3. - - ![](figures/ip-address-information-3.png) - -7. When you finish modifying, click **Save** in the upper right corner. -8. Open the project file and go to ![](figures/2021-01-27_170334.png) \> **PROJECT TASKS** \> **hi3516dv300** \> **Upload** to start burning. - - ![](figures/en-us_image_0000001215342695.png) - -9. When the following message is displayed, power off the development board and then power it on. - - ![](figures/hi3516-restart-the-development-board.png) - -10. If the following message is displayed, it indicates that the burning is successful. - - ![](figures/hi3516-burning-succeeded-net.png) - -11. When the burning is successful, perform the operations in [Running an Image](https://device.harmonyos.com/en/docs/start/introduce/quickstart-standard-running-0000001142160948) to start the system. - diff --git a/en/device-dev/quick-start/quickstart-standard-docker-environment.md b/en/device-dev/quick-start/quickstart-standard-docker-environment.md deleted file mode 100644 index ab1534cdd0..0000000000 --- a/en/device-dev/quick-start/quickstart-standard-docker-environment.md +++ /dev/null @@ -1,93 +0,0 @@ -# Setting Up a Ubuntu Development Environment in Docker Mode - -The standard OpenHarmony system provides a Docker environment which encapsulates build tools. - ->![](../public_sys-resources/icon-note.gif) **NOTE:** ->- Before using Docker, install it by following instructions in [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/). ->- You can also use the [installation package](quickstart-standard-package-environment.md) to set up the Ubuntu development environment. - -## Obtaining Standard-System Source Code - -### Prerequisites - -1. Register your account with Gitee. -2. Register an SSH public key for access to Gitee. -3. Install the [git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information. - - ``` - git config --global user.name "yourname" - git config --global user.email "your-email-address" - git config --global credential.helper store - ``` - -4. Run the following commands to install the **repo** tool: - - ``` - curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable. - chmod a+x /usr/local/bin/repo - pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests - ``` - - -### Procedure - -Two methods are provided for you to obtain the OpenHarmony master code. You are advised to create a new folder and run the related commands in this folder to download the source code. This folder will then be the root directory of the source code. - -Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to Gitee.\) - -``` -repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify -repo sync -c -repo forall -c 'git lfs pull' -``` - -Method 2: Use the **repo** tool to download the source code over HTTPS. - -``` -repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify -repo sync -c -repo forall -c 'git lfs pull' -``` - -## Running prebuilts - -Go to the root directory of the source code and run the following script to install the compiler and binary tool: - -``` -bash build/prebuilts_download.sh -``` - -By default, the downloaded prebuilts binary file is stored in **OpenHarmony\_2.0\_canary\_prebuilts** \(which is in the same directory as **OpenHarmony**\). - -## Obtaining the Docker Environment - -1. Obtain the Docker image. - - ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 - ``` - -2. Go to the root directory of source code and run the following command to access the Docker build environment: - - ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:1.0.0 - ``` - - -## Building Source Code - -1. Run the following script to start building for standard-system devices \(reference memory ≥ 128 MB\). - - ``` - ./build.sh --product-name {product_name} --ccache - ``` - - **product\_name** indicates the platform supported by the current distribution, for example, Hi3516DV300 and rk3568. - - Files generated during building are stored in the **out/{device_name}/** directory, and the generated image is stored in the **out/{device_name}/packages/phone/images/** directory. - -2. Burn the image. For details, see [Burning Images](quickstart-standard-burn.md). - ->![](../public_sys-resources/icon-note.gif) **NOTE:** ->You can exit Docker by simply running the **exit** command. - diff --git a/en/device-dev/quick-start/quickstart-standard-env-setup.md b/en/device-dev/quick-start/quickstart-standard-env-setup.md index 945ab49e46..068cd76a98 100644 --- a/en/device-dev/quick-start/quickstart-standard-env-setup.md +++ b/en/device-dev/quick-start/quickstart-standard-env-setup.md @@ -19,7 +19,7 @@ To install the necessary libraries and tools, perform the following steps. In Ubuntu: 1. Run the following **apt-get** command: - + ``` sudo apt-get update && sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib gcc-arm-linux-gnueabi libc6-dev-i386 libc6-dev-amd64 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby genext2fs device-tree-compiler make libffi-dev e2fsprogs pkg-config perl openssl libssl-dev libelf-dev libdwarf-dev u-boot-tools mtd-utils cpio doxygen liblz4-tool openjdk-8-jre gcc g++ texinfo dosfstools mtools default-jre default-jdk libncurses5 apt-utils wget scons python3.8-distutils tar rsync git-core libxml2-dev lib32z-dev grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5-dev libncursesw5 libstdc++6 gcc-arm-none-eabi vim ssh locales ``` @@ -34,13 +34,13 @@ In Ubuntu: 2. Set Python 3.8 as the default Python version. Check the location of Python 3.8: - + ``` which python3.8 ``` Change python and python3 to python3.8. - + ``` sudo update-alternatives --install /usr/bin/python python {python3.8 path} 1 #{Python3.8 path} is the location of Python 3.8 obtained in the previous step. sudo update-alternatives --install /usr/bin/python3 python3 {python3.8 path} 1 #{Python3.8 path} is the location of Python 3.8 obtained in the previous step. @@ -98,14 +98,14 @@ To remotely access the Ubuntu environment through Windows to perform operations 1. Make sure the Ubuntu shell environment is **bash**. 1. Run the following command and check whether the command output is **bash**. If the command output is not **bash**, go to step 2. - + ``` ls -l /bin/sh ``` ![en-us_image_0000001226764302](figures/en-us_image_0000001226764302.png) 2. Start the command-line tool, run the following command, enter your password, and select **No** to set **Ubuntu shell** to **bash**. - + ``` sudo dpkg-reconfigure dash ``` @@ -116,12 +116,12 @@ To remotely access the Ubuntu environment through Windows to perform operations 3. Decompress the DevEco Device Tool software package and assign permission on the folder obtained from the decompression. 1. Go to the directory where the DevEco Device Tool software package is stored and run the following command to decompress the software package. In the command, change **devicetool-linux-tool-3.0.0.400.zip** to the actual software package name. - + ``` unzip devicetool-linux-tool-3.0.0.400.zip ``` 2. Open the folder of the decompressed software package and run the following command to grant the execute permission on the installation file. In the command, change **devicetool-linux-tool-3.0.0.400.sh** to the actual installation file name. - + ``` chmod u+x devicetool-linux-tool-3.0.0.400.sh ``` @@ -130,7 +130,7 @@ To remotely access the Ubuntu environment through Windows to perform operations > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > During the installation, the setup wizard automatically checks whether Python 3.8 or 3.9 is installed. If Python 3.8 or 3.9 is not installed, the setup wizard displays the "Do you want to continue?" message; enter **Y** to allow the setup wizard to automatically install Python. - + ``` sudo ./devicetool-linux-tool-3.0.0.400.sh ``` @@ -149,19 +149,19 @@ To remotely access the Ubuntu environment through Windows to perform operations > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > If the command fails to be executed and the system displays a message indicating that the openssh-server and openssh-client depend on different versions, install the openssh-client of the required version (for example, **sudo apt-get install openssh-client=1:8.2p1-4**) as prompted on the command-line interface (CLI) and run the command again to install the openssh-server. - + ``` sudo apt-get install openssh-server ``` 2. Run the following command to start the SSH service: - + ``` sudo systemctl start ssh ``` 3. Run the following command to obtain the IP address of the current user for remote access to the Ubuntu environment from Windows: - + ``` ifconfig ``` @@ -171,7 +171,7 @@ To remotely access the Ubuntu environment through Windows to perform operations ### Installing Remote SSH -1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us-cn_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. +1. Open Visual Studio Code in Windows, click ![en-us_image_0000001239080359](figures/en-us_image_0000001239080359.png), and search for **remote-ssh** in the Extension Marketplace. ![en-us_image_0000001193920448](figures/en-us_image_0000001193920448.png) @@ -210,7 +210,7 @@ To remotely access the Ubuntu environment through Windows to perform operations After the preceding operations are complete, you can remotely connect to the Ubuntu environment through Windows for development. However, you need to frequently enter the remote connection password. To eliminate this need, you can use the SSH public key. 1. Open the Git bash CLI and run the following command to generate an SSH public key. During command execution, perform operations as prompted. Set **username** and **ip** to the user name and IP address you use for connecting to the Ubuntu system. - + ``` ssh-keygen -t rsa ssh-copy-id -i ~/.ssh/id_rsa.pub username@ip @@ -245,13 +245,13 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony ``` Run the following command to install the tools: - + ``` sudo apt-get install git git-lfs ``` 4. Configure user information. - + ``` git config --global user.name "yourname" git config --global user.email "your-email-address" @@ -259,7 +259,7 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony ``` 5. Run the following commands to install the **repo** tool: - + ``` curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable. chmod a+x /usr/local/bin/repo @@ -284,7 +284,7 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony Method 2: Use the **repo** tool to download the source code over HTTPS. - + ``` repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify repo sync -c @@ -299,7 +299,7 @@ In the Ubuntu environment, perform the following steps to obtain the OpenHarmony ### Running prebuilts Go to the root directory of the source code and run the following script to install the compiler and binary tool: - + ``` bash build/prebuilts_download.sh ``` @@ -311,35 +311,35 @@ hb is a compilation tool of OpenHarmony. To install hb in Ubuntu, perform the fo > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** -> To install a proxy, see [Configuring a Proxy](../quick-start/quickstart-standard-reference.md#configuring-a-proxy). +> To install a proxy, see [Configuring the Proxy](../quick-start/quickstart-standard-reference.md#section6204129143012). 1. Run the following command to install hb and update it to the latest version: - + ``` pip3 install --user build/lite ``` 2. Set the environment variable. - + ``` vim ~/.bashrc ``` Copy the following command to the last line of the .bashrc file, save the file, and exit. - + ``` export PATH=~/.local/bin:$PATH ``` Update the environment variable. - + ``` source ~/.bashrc ``` 3. Run the **hb -h** command in the source code directory. If the following information is displayed, the installation is successful: - + ``` usage: hb @@ -359,7 +359,7 @@ hb is a compilation tool of OpenHarmony. To install hb in Ubuntu, perform the fo > ![icon-notice.gif](public_sys-resources/icon-notice.gif) **NOTICE** > - Run the following command to uninstall hb: -> +> > ``` > pip3 uninstall ohos-build > ``` diff --git a/en/device-dev/quick-start/quickstart-standard-package-environment.md b/en/device-dev/quick-start/quickstart-standard-package-environment.md deleted file mode 100644 index 21f0787427..0000000000 --- a/en/device-dev/quick-start/quickstart-standard-package-environment.md +++ /dev/null @@ -1,92 +0,0 @@ -# Setting Up a Ubuntu Development Environment Using the Installation Package - -## Installing Dependent Tools - -The installation command is as follows: - -``` -sudo apt-get update && sudo apt-get install binutils git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby -``` - ->![](../public_sys-resources/icon-note.gif) **NOTE:** ->The preceding command is applicable to Ubuntu 18.04. For other Ubuntu versions, modify the preceding installation command based on the installation package name. Python 3.7 or later is required. Python 3.8 is used as an example. - -## Obtaining Standard-System Source Code - -### Prerequisites - -1. Register your account with Gitee. -2. Register an SSH public key for access to Gitee. -3. Install the [git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information. - - ``` - git config --global user.name "yourname" - git config --global user.email "your-email-address" - git config --global credential.helper store - ``` - -4. Run the following commands to install the **repo** tool: - - ``` - curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable. - chmod a+x /usr/local/bin/repo - pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests - ``` - - -### Procedure - -Two methods are provided for you to obtain the OpenHarmony master code. You are advised to create a new folder and run the related commands in this folder to download the source code. This folder will then be the root directory of the source code. - -Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to Gitee.\) - -``` -repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify -repo sync -c -repo forall -c 'git lfs pull' -``` - -Method 2: Use the **repo** tool to download the source code over HTTPS. - -``` -repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify -repo sync -c -repo forall -c 'git lfs pull' -``` - -## Running prebuilts - -Go to the root directory of the source code and run the following script to install the compiler and binary tool: - -``` -bash build/prebuilts_download.sh -``` - -By default, the downloaded prebuilts binary file is stored in **OpenHarmony\_2.0\_canary\_prebuilts** \(which is in the same directory as **OpenHarmony**\). - -## Building Source Code - -Perform the following operations in the Linux environment: - -1. Go to the root directory of the source code and run the following command to build the distribution. - - ``` - ./build.sh --product-name {product_name} - ``` - - **product\_name** indicates the product supported by the current distribution, for example, **Hi3516DV300**. - -2. Check the build result. After the build is complete, the following information is displayed in the log: - - ``` - build system image successful. - =====build Hi3516DV300 successful. - ``` - - Files generated during the build are stored in the **out/{device_name}/** directory, and the generated image is stored in the **out/{device_name}/packages/phone/images/** directory. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >For details about module-specific build operations, see [Building Guidelines](../subsystems/subsys-build-standard-large.md). - -3. Burn the image. For details, see [Burning Images](quickstart-standard-burn.md). - diff --git a/en/device-dev/quick-start/quickstart-standard-reference.md b/en/device-dev/quick-start/quickstart-standard-reference.md index a1bb41dcfd..2c20ea4143 100644 --- a/en/device-dev/quick-start/quickstart-standard-reference.md +++ b/en/device-dev/quick-start/quickstart-standard-reference.md @@ -5,7 +5,7 @@ 1. Go to the root directory of the source code and run the build command. - + ``` ./build.sh --product-name name --ccache ``` @@ -14,7 +14,7 @@ > _name_ indicates the product name, for example, **Hi3516D V300** and **rk3568**. 2. Check the build result. After the build is complete, the following information is displayed in the log: - + ``` post_process =====build name successful. @@ -31,13 +31,13 @@ ### Setting Up the Python Proxy 1. Create a proxy configuration file. - + ``` mkdir ~/.pipvim ~/.pip/pip.conf ``` 2. Add the following proxy information to the file, save the file, and exit: - + ``` [global] index-url = http:// Proxy URL @@ -46,23 +46,23 @@ ``` -### Setting Up the npm Proxy +### Setting Up the npm Proxy 1. Create a proxy configuration file. - + ``` vim ~/.npmrc ``` 2. Add the following proxy information to the file, save the file, and exit: - + ``` Registry=http:// Proxy URL strict-ssl=false ``` 3. Add the following content to the **.bashrc** file, save the file, and exit: - + ``` export NPM_REGISTRY=http:// Proxy URL source .bashrc diff --git a/en/device-dev/quick-start/quickstart-standard-sourcecode-acquire.md b/en/device-dev/quick-start/quickstart-standard-sourcecode-acquire.md deleted file mode 100644 index 53b2301eb0..0000000000 --- a/en/device-dev/quick-start/quickstart-standard-sourcecode-acquire.md +++ /dev/null @@ -1,49 +0,0 @@ -# Obtaining Source Code - -### Prerequisites - -1. Register your account with Gitee. -2. Register an SSH public key for access to Gitee. -3. Install the [git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information. - - ``` - git config --global user.name "yourname" - git config --global user.email "your-email-address" - git config --global credential.helper store - ``` - -4. Run the following commands to install the **repo** tool: - - ``` - curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 -o /usr/local/bin/repo # If you do not have the access permission to this directory, download the tool to any other accessible directory and configure the directory to the environment variable. - chmod a+x /usr/local/bin/repo - pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests - ``` - - -### How to Obtain - ->![](../public_sys-resources/icon-note.gif) **NOTE**
->Download the master code if you want to get quick access to the latest features for your development. Download the release code, which is more stable, if you want to develop commercial functionalities. - -- **Obtaining OpenHarmony master code** - - Method 1 \(recommended\): Use the **repo** tool to download the source code over SSH. \(You must have registered an SSH public key for access to Gitee.\) - - ``` - repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify - repo sync -c - repo forall -c 'git lfs pull' - ``` - - Method 2: Use the **repo** tool to download the source code over HTTPS. - - ``` - repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify - repo sync -c - repo forall -c 'git lfs pull' - ``` - -- **Obtaining OpenHarmony release code** - - For details about how to obtain the source code of an OpenHarmony release, see the [Release-Notes](../get-code/../../release-notes/Readme.md). diff --git a/en/device-dev/quick-start/quickstart-standard-windows-environment.md b/en/device-dev/quick-start/quickstart-standard-windows-environment.md deleted file mode 100644 index a7b213cda5..0000000000 --- a/en/device-dev/quick-start/quickstart-standard-windows-environment.md +++ /dev/null @@ -1,63 +0,0 @@ -# Setting Up a Windows Development Environment - -System requirements: - -- OS: 64-bit Windows 10 -- User name: cannot contain Chinese characters - -## Installing DevEco Device Tool - -DevEco Device Tool is installed in Visual Studio Code as a plug-in and depends on Python, Node.js, and HPM for running. - -DevEco Device Tool supports integrated installation. The DevEco Device Tool setup wizard checks whether the adaptation versions of Visual Studio Code, Python, Node.js and HPM tools have been installed. If any of the tools is not installed, you'll be prompted to select the tool to be automatically installed. - ->![](../public_sys-resources/icon-note.gif) **NOTE:** ->Before installing DevEco Device Tool, make sure the user name of the host does not contain Chinese characters. Otherwise, the **DevEco Home** page will be stuck loading and the DevEco Device Tool cannot work. - -1. Log in to the [HarmonyOS Device website](https://device.harmonyos.com/cn/ide#download_beta) with your HUAWEI ID and download DevEco Device Tool V3.0 Beta1 or a later version. If you do not have a HUAWEI ID, [register](https://developer.huawei.com/consumer/en/doc/start/registration-and-verification-0000001053628148) one first. -2. Decompress the DevEco Device Tool package, double-click the installer, and then click **Next**. -3. Set the installation path of DevEco Device Tool and click **Next**. -4. When prompted, select the tools to be automatically installed and click **Next**. - - ![](figures/snap28.png) - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >When the setup wizard detects that a compatible Python version has been installed, it prompts you to select the installed Python version or download the recommended Python version. - -5. In the dialog box shown below, click **Next** to download and install the tools. - - ![](figures/snap8.png) - -6. In the displayed Python setup wizard, select **Add Python 3.8 to PATH** and click **Install Now**. After the installation is complete, click **Close**. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you have selected the compatible Python version installed on your device, the Python setup wizard will not be displayed. In this case, you skip this step. - >If DevEco Device Tool 2.1 Release is installed, the Python version must be 3.8.x. If DevEco Device Tool V3.0 Beta1 or a later version is installed, the Python version must be 3.8.x or 3.9.x. - - ![](figures/snap34.png) - -7. In the Visual Studio Code setup wizard, install Visual Studio Code as prompted. During the installation, select **Add to PATH \(requires shell restart\)**. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you are using the correct version of Visual Studio Code, the Visual Studio Code setup wizard will not be displayed. In this case, you skip this step. - - ![](figures/snap33.png) - -8. In the Node.js setup wizard, retain the default settings and click **Next** until **Finish** is displayed. During the installation, Node.js will automatically set the system Path environment variable to the installation directory of **node.exe**. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you are using the correct version of Node.js, the Node.js setup wizard will not be displayed. In this case, you skip this step. - -9. Wait for the DevEco Device Tool setup wizard to automatically install the HPM and DevEco Device Tool. After the installation is complete, click **Finish** to close the setup wizard. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If you are using the correct version of HPM, the setup wizard does not download or install HPM. - -10. Start Visual Studio Code. The C/C++ and CodeLLDB plug-ins on which DevEco Device Tool depends will be automatically installed. After the installation is complete, click ![](figures/button.png) on the left of Visual Studio Code to check whether C/C++, CodeLLDB, and DevEco Device Tool are included in the **INSTALLED** list. - - >![](../public_sys-resources/icon-note.gif) **NOTE:** - >If the C/C++ and CodeLLDB plug-ins fail to be installed, DevEco Device Tool cannot run properly. To solve the issue, see [Installing the C/C++ and CodeLLDB Plug-ins Offline](https://device.harmonyos.com/en/docs/ide/user-guides/offline_plugin_install-0000001074376846). - - ![](figures/deveco-device-tool-install-sucessful.png) - - -- GitLab