diff --git a/en/device-dev/get-code/Readme-EN.md b/en/device-dev/get-code/Readme-EN.md index 0d01c57880c928a464da55125f5f87d314a69a2c..5431040667db64eba5ec745df12217f96780f532 100644 --- a/en/device-dev/get-code/Readme-EN.md +++ b/en/device-dev/get-code/Readme-EN.md @@ -2,4 +2,6 @@ - [Source Code Acquisition](source-code-acquisition.md) - [Tool Acquisition](tool-acquisition.md) + - [Docker Environment](docker-environment.md) + - [IDE](ide.md) diff --git a/en/device-dev/get-code/docker-environment.md b/en/device-dev/get-code/docker-environment.md new file mode 100644 index 0000000000000000000000000000000000000000..a9dce7ccc7baf0628c9485dccd4013e3c25a00d7 --- /dev/null +++ b/en/device-dev/get-code/docker-environment.md @@ -0,0 +1,313 @@ +# Docker Environment + +- [Introduction](#section107932281315) +- [Preparations](#section7337134183512) +- [Standalone Docker Environment](#section2858536103611) + - [Setting Up the Docker Environment for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\)](#section319412277287) + - [Building for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\)](#section631485163615) + - [Setting Up the Docker Environment for Standard-System Devices \(reference memory ≥ 128 MB\)](#section13585262391) + - [Building for Standard-System Devices \(reference memory ≥ 128 MB\)](#section193711513406) + +- [HPM-based Docker Environment](#section485713518337) + - [Setting Up the Docker Environment](#section3295842510) + - [Obtaining and Building Source Code](#section69141039143518) + + +## Introduction + +OpenHarmony provides the following two types of Docker environments for you to quickly get the development environment ready: + +- Standalone Docker environment: applicable when using Ubuntu or Windows to build a distribution +- HPM-based Docker environment: applicable when using the HarmonyOS Package Manager \(HPM\) to build a distribution + +**Table 1** Docker image + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Docker Environment

+

System Type

+

Operating Platform

+

Docker Image Repository

+

Tag

+

Standalone Docker environment

+

Mini and small systems

+

Ubuntu or Windows

+

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

+

0.0.5

+

Standard system

+

Ubuntu

+

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard

+

0.0.1

+

HPM-based Docker environment

+

Mini and small systems

+

Ubuntu or Windows

+

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

+

0.0.3

+
+ +## Preparations + +Before using the Docker environment, perform the following operations: + +1. Install Docker. For details, see [Install Docker Engine](https://docs.docker.com/engine/install/). +2. Obtain the OpenHarmony source code. For details, see [Source Code Acquisition](source-code-acquisition.md). + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >You do not need to obtain the source code for the HPM-based Docker environment. + + +## Standalone Docker Environment + +The Docker image of OpenHarmony is hosted on [HUAWEI CLOUD SWR](https://console.huaweicloud.com/swr/?region=cn-south-1&locale=en-us#/app/warehouse/warehouseMangeDetail/goldensir/openharmony-docker/openharmony-docker?type=ownImage). Using the Docker image will help simplify environment configurations needed for the building. The following describes the detailed procedure. + +### Setting Up the Docker Environment for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\) + +**Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR** + +1. Obtain the Docker image. + + ``` + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + +2. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: + + Run the following command in Ubuntu: + + ``` + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + Run the following command in Windows \(assuming that the source code directory is **D:\\OpenHarmony**\): + + ``` + docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + +**Method 2: Using the Dockerfile to Build a Local Docker Image** + +1. Obtain the Dockerfile script for a local Docker image. + + ``` + git clone https://gitee.com/openharmony/docs.git + ``` + +2. Go to the directory of the Dockerfile code and run the following command to build the Docker image: + + ``` + cd docs/docker + ./build.sh + ``` + +3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: + + Run the following command in Ubuntu: + + ``` + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + Run the following command in Windows \(assuming that the source code directory is **D:\\OpenHarmony**\): + + ``` + docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + +### Building for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\) + +The following uses the Hi3516 platform as an example to describe the build procedure. + +Set the build path to the current path. + +``` +hb set + . +``` + +**Figure 1** Setting page + + +![](figures/en-us_image_0000001101413884.png) + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>The mapping between the development board and the building GUI: +>- Hi3861: wifiiot\_hispark\_pegasus@hisilicon +>- Hi3516: ipcamera\_hispark\_taurus@hisilicon +>- Hi3518: ipcamera\_hispark\_aries@hisilicon + +1. Select **ipcamera\_hispark\_taurus@hisilicon** and press **Enter**. +2. Start building. + + ``` + hb build -f + ``` + +3. View the build result. + + The files will be generated in the **out/hispark\_taurus/ipcamera\_hispark\_taurus** directory. + + +### Setting Up the Docker Environment for Standard-System Devices \(reference memory ≥ 128 MB\) + +**Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR** + +1. Obtain the Docker image. + + ``` + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 + ``` + +2. Go to the root directory of OpenHarmony 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-standard:0.0.1 + ``` + + +**Method 2: Using the Dockerfile to Build a Local Docker Image** + +1. Obtain the Dockerfile script for a local Docker image. + + ``` + git clone https://gitee.com/openharmony/docs.git + ``` + +2. Go to the directory of the Dockerfile code and run the following command to build the Docker image: + + ``` + cd docs/docker/standard + ./build.sh + ``` + +3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: + + ``` + docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.1 + ``` + + +### Building for Standard-System Devices \(reference memory ≥ 128 MB\) + +1. Run the preprocessing script in the root directory of the source code. + + ``` + ../scripts/prepare.sh + ``` + +2. Run the following script to start building for standard-system devices \(reference memory ≥ 128 MB\). + + ``` + ./build.sh --product-name {product_name} + ``` + + **product\_name** indicates the platform supported by the current distribution, for example, Hi3516D V300. + + Files generated during building are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. + + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>You can exit Docker by simply running the **exit** command. + +## HPM-based Docker Environment + +**docker\_dist** is a template component in the [HPM](https://hpm.harmonyos.com/#/en/home) system. It helps to quickly initialize an HPM project and use the Docker image to quickly build a distribution of OpenHarmony, greatly simplifying environment configurations needed for building. After configuring the Ubuntu and [hpm-cli](https://device.harmonyos.com/en/docs/develop/bundles/oem_bundle_guide_prepare-0000001050129846) development environments, perform the following steps to access the Docker environment: + +### Setting Up the Docker Environment + +1. Initialize the installation template by running the following command in any of the working directories: + + ``` + hpm init -t @ohos/docker_dist + ``` + +2. Modify the **publishAs** field. + + The obtained bundle is of the template type. Open the **bundle.json** file in the current directory and change the value of **publishAs** from **template** to **distribution** as needed. + + +### Obtaining and Building Source Code + +Start building. Docker can be automatically installed only in Ubuntu. If you are using any other operating system, manually install Docker before pulling the image. + +- **Automatically Installing Docker \(Ubuntu\)** + + Running the following command will automatically install Docker, pull the Docker image, and start the pulling and building of the corresponding solution in the container. + + **Method 1:** + + Add a parameter to specify the solution. For example: + + ``` + hpm run docker solution={product} + ``` + + **\{product\}** indicates the solution, for example, **@ohos/hispark\_taurus**, **@ohos/hispark\_aries**, and **@ohos/hispark\_pegasus**. + + **Method 2:** + + Set an environment variable to specify the solution, and then run the build command. + + 1. Select the desired solution. + + ``` + export solution={product} + ``` + + **\{product\}** indicates the solution, for example, **@ohos/hispark\_taurus**, **@ohos/hispark\_aries**, and **@ohos/hispark\_pegasus**. + + 2. Obtain and build the source code. + + ``` + hpm run docker + ``` + + + This example uses the **@ohos/hispark\_taurus** solution for illustration. If the execution is successful, the output is as follows: + + ``` + ... + ohos ipcamera_hispark_taurus build success! + @ohos/hispark_taurus: distribution building completed. + ``` + + +- **Manually Installing Docker \(Non-Ubuntu\)** + + Perform the following operations to install Docker: + + ``` + # Pull the image. + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.3# Compile the Docker image in the Linux environment. + hpm run distWithDocker solution={product} + # When using Windows, make sure to configure the Git Bash. + hpm config set shellPath "Git Bash path" + hpm run distWithDocker solution={product} + ``` + + diff --git a/en/device-dev/get-code/figures/3.png b/en/device-dev/get-code/figures/3.png index c99cddf919e6f912aa19c43189f1fdbe895764ac..7936efcb1acc374be338d44d8d2911fa82f29076 100644 Binary files a/en/device-dev/get-code/figures/3.png and b/en/device-dev/get-code/figures/3.png differ diff --git a/en/device-dev/get-code/ide.md b/en/device-dev/get-code/ide.md new file mode 100644 index 0000000000000000000000000000000000000000..f3551de3126341e207afe450d509d8d37cc0979a --- /dev/null +++ b/en/device-dev/get-code/ide.md @@ -0,0 +1,17 @@ +# IDE + +- [Acquiring the Device Development Tool \(HUAWEI DevEco Device Tool\)](#section2452141120244) +- [Acquiring the Application Development Tool \(HUAWEI DevEco Studio\)](#section0904101019258) + +## Acquiring the Device Development Tool \(HUAWEI DevEco Device Tool\) + +HUAWEI DevEco Device Tool is a one-stop integrated development environment \(IDE\) provided to develop applications for OpenHarmony devices. It allows on-demand customization of OpenHarmony components, code editing, building, burning, and debugging, and supports C and C++ languages. This tool is installed in Visual Studio Code as a plug-in. For details, see [HUAWEI DevEco Device Tool](https://device.harmonyos.com/en/ide) and [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). + +The roadmap of Huawei DevEco Device Tool for supporting OpenHarmony device development is shown in the figure below. + +![](figures/3.png) + +## Acquiring the Application Development Tool \(HUAWEI DevEco Studio\) + +HUAWEI DevEco Studio \(DevEco Studio for short\) is a one-stop IDE oriented to Huawei devices in all scenarios. It provides E2E OpenHarmony application development services, ranging from project template creation to development, building, debugging, and release. With DevEco Studio, you will be able to efficiently develop OpenHarmony applications with distributed capabilities while speeding up innovation. For details, see [HUAWEI DevEco Studio](https://developer.harmonyos.com/en/develop/deveco-studio) and [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387). + diff --git a/en/device-dev/get-code/source-code-acquisition.md b/en/device-dev/get-code/source-code-acquisition.md index f7a7c3f5c758bcac5d10c91de12a53e406205cfd..a7d68fe82d7e7b64663197b7d915710410e46069 100644 --- a/en/device-dev/get-code/source-code-acquisition.md +++ b/en/device-dev/get-code/source-code-acquisition.md @@ -62,7 +62,7 @@ This document describes how to acquire OpenHarmony source code and provides its 4. Run the following commands to install the **repo** tool: ``` - curl 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. + 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 ``` diff --git a/en/device-dev/get-code/tool-acquisition.md b/en/device-dev/get-code/tool-acquisition.md index ddfc607243ddd0682ed23b79e3f95d59ae1addc6..dd1797b10426918c0921386817fb51c1b9e83a3b 100644 --- a/en/device-dev/get-code/tool-acquisition.md +++ b/en/device-dev/get-code/tool-acquisition.md @@ -1,283 +1,7 @@ -# Tool Acquisition +# Tool Acquisition -- [How to Obtain the Docker Environment](#section107932281315) -- [HPM-based Docker](#section485713518337) - - [Setting Up the Docker Environment](#section18957202218355) - - [Building](#section69141039143518) +- **[Docker Environment](docker-environment.md)** -- [Standalone Docker Environment](#section2858536103611) - - [Setting Up the Docker Environment for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\)](#section319412277287) - - [Building for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\)](#section631485163615) - - [Setting Up the Docker Environment for Standard-System Devices \(reference memory ≥ 128 MB\)](#section13585262391) - - [Building for Standard-System Devices \(reference memory ≥ 128 MB\)](#section193711513406) +- **[IDE](ide.md)** -- [Acquiring the Device Development Tool \(HUAWEI DevEco Device Tool\)](#section2452141120244) -- [Acquiring the Application Development Tool \(HUAWEI DevEco Studio\)](#section0904101019258) - -## How to Obtain the Docker Environment - -OpenHarmony provides the following two types of Docker environments for you to quickly get the development environment ready: - -- HPM-based Docker environment: applicable when using the HarmonyOS Package Manager \(HPM\) to build a distribution. -- Standalone Docker environment: applicable when using Ubuntu or Windows to build a distribution. - - The following table lists container-based options needed for building in the standalone Docker environment. - - **Table 1** Docker image - - - - - - - - - - - - - - - - -

Docker Image Repository

-

Tag

-

Description

-

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

-

0.0.5

-

The OpenHarmony build environment has been pre-installed. This repository applies to Mini-System Devices (reference memory ≥ 128 KB) and Small-System Devices (reference memory ≥ 1 MB).

-

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard

-

0.0.1

-

The OpenHarmony build environment has been pre-installed. This repository applies to Standard-System Devices (reference memory ≥ 128 MB).

-
- - >![](public_sys-resources/icon-note.gif) **NOTE:** - >For details about how to install Docker, see [Install Docker Engine on Ubuntu](https://docs.docker.com/engine/install/ubuntu/). - - -## HPM-based Docker - -**docker\_dist** is a template component in the [HPM](https://hpm.harmonyos.com/#/en/home) system. It helps to quickly initialize an HPM project and use the Docker image to quickly build a distribution of OpenHarmony, greatly simplifying environment configurations needed for building. After configuring the Ubuntu and [hpm-cli](https://device.harmonyos.com/en/docs/develop/bundles/oem_bundle_guide_prepare-0000001050129846) development environments, perform the following steps to access the Docker environment: - -### Setting Up the Docker Environment - -1. Initialize the installation template by running the following command in any of the working directories: - - ``` - hpm init -t @ohos/docker_dist - ``` - -2. Modify the **publishAs** field. - - The obtained bundle is of the template type. Open the **bundle.json** file in the current directory and change the value of **publishAs** from **template** to **distribution** as needed. - - -### Building - -Start building. Docker can be automatically installed only on Ubuntu. If you are using any other operating system, manually install Docker before pulling the image. - -- **Automatically Installing Docker \(Ubuntu\)** - - Running the following command will automatically install Docker, pull the Docker image, and start the pulling and building of the corresponding solution in the container. - - Method 1: - - Add a parameter to specify the solution. For example: - - ``` - hpm run docker solution={product} - ``` - - **\{product\}** indicates the solution, for example, **@ohos/hispark\_taurus**, **@ohos/hispark\_aries**, and **@ohos/hispark\_pegasus**. - - Method 2: - - Set an environment variable to specify the solution, and then run the build command. - - 1. Select the desired solution. - - ``` - export solution={product} - ``` - - **\{product\}** indicates the solution, for example, **@ohos/hispark\_taurus**, **@ohos/hispark\_aries**, and **@ohos/hispark\_pegasus**. - - 2. Start building. - - ``` - hpm run docker - ``` - - This example uses the **@ohos/hispark\_taurus** solution for illustration. If the execution is successful, the output is as follows: - - ``` - ... - ohos ipcamera_hispark_taurus build success! - @ohos/hispark_taurus: distribution building completed. - ``` - - -- **Manually Installing Docker \(Non-Ubuntu\)** - - Perform the following operations to install Docker: - - ``` - # Pull the image. - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.3# Compile the Docker image in the Linux environment. - hpm run distWithDocker solution={product} - # When using Windows, make sure to configure the Git Bash. - hpm config set shellPath "Git Bash path" - hpm run distWithDocker solution={product} - ``` - - -## Standalone Docker Environment - -The Docker image of OpenHarmony is hosted on [HUAWEI CLOUD SWR](https://console.huaweicloud.com/swr/?region=cn-south-1&locale=en-us#/app/warehouse/warehouseMangeDetail/goldensir/openharmony-docker/openharmony-docker?type=ownImage). Using the Docker image will help simplify environment configurations needed for the building. After configuring the development environments, perform the procedures below to access the Docker environment. Both Ubuntu and Windows are supported. The following procedures use Ubuntu as an example. - -### Setting Up the Docker Environment for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\) - -**Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR** - -1. Obtain the Docker image. - - ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 - ``` - -2. Go to the root directory of OpenHarmony 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:0.0.5 - ``` - - -**Method 2: Using the Dockerfile to Build a Local Docker Image** - -1. Obtain the Dockerfile script for a local Docker image. - - ``` - git clone https://gitee.com/openharmony/docs.git - ``` - -2. Go to the directory of the Dockerfile code and run the following command to build the Docker image: - - ``` - cd docs/docker - ./build.sh - ``` - -3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: - - ``` - docker run -it -v $(pwd):/home/openharmony openharmony-docker:0.0.5 - ``` - - -### Building for Mini-System Devices \(reference memory ≥ 128 KB\) and Small-System Devices \(reference memory ≥ 1 MB\) - -The following uses the Hi3516 platform as an example to describe the build procedure. Run the following build scripts to start building: - -Set the build path to the current path. - -``` -hb set - . -``` - -**Figure 1** Setting page - - -![](figures/en-us_image_0000001101413884.png) - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->The mapping between the development board and the building GUI: ->- Hi3861: wifiiot\_hispark\_pegasus@hisilicon ->- Hi3516: ipcamera\_hispark\_taurus@hisilicon ->- Hi3518: ipcamera\_hispark\_aries@hisilicon - -1. Select **ipcamera\_hispark\_taurus@hisilicon** and press **Enter**. -2. Start building. - - ``` - hb build -f - ``` - -3. View the build result. - - The files will be generated in the **out/hispark\_taurus/ipcamera\_hispark\_taurus** directory. - - -### Setting Up the Docker Environment for Standard-System Devices \(reference memory ≥ 128 MB\) - -**Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR** - -1. Obtain the Docker image. - - ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 - ``` - -2. Go to the root directory of OpenHarmony 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-standard:0.0.1 - ``` - - -**Method 2: Using the Dockerfile to Build a Local Docker Image** - -1. Obtain the Dockerfile script for a local Docker image. - - ``` - git clone https://gitee.com/openharmony/docs.git - ``` - -2. Go to the directory of the Dockerfile code and run the following command to build the Docker image: - - ``` - cd docs/docker/standard - ./build.sh - ``` - -3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: - - ``` - docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.1 - ``` - - -### Building for Standard-System Devices \(reference memory ≥ 128 MB\) - -1. Run the preprocessing script in the root directory of the source code. - - ``` - ../scripts/prepare.sh - ``` - -2. Run the following script to start building for Standard-System Devices \(reference memory ≥ 128 MB\). - - ``` - ./build.sh --product-name {product_name} - ``` - - **product\_name** indicates the platform supported by the current distribution, for example, Hi3516D V300. - - Files generated during compilation are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. - - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->You can exit Docker by simply running the **exit** command. - -## Acquiring the Device Development Tool \(HUAWEI DevEco Device Tool\) - -HUAWEI DevEco Device Tool is a one-stop integrated development environment \(IDE\) provided to develop applications for OpenHarmony-based smart devices. It allows on-demand customization of OpenHarmony components, code editing, compilation, burning, and debugging, and supports C and C++ languages. This tool is installed in Visual Studio Code as a plug-in. For details, see [Tool Acquisition](https://device.harmonyos.com/en/ide) and [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). - -The roadmap of Huawei DevEco Device Tool for supporting OpenHarmony device development is shown in the figure below. - -![](figures/3.png) - -## Acquiring the Application Development Tool \(HUAWEI DevEco Studio\) - -HUAWEI DevEco Studio \(DevEco Studio for short\) is a one-stop IDE oriented to Huawei devices in all scenarios. It provides E2E OpenHarmony application development services, ranging from project template creation to development, compilation, debugging, and release. With DevEco Studio, you will be able to efficiently develop OpenHarmony applications with distributed capabilities while speeding up innovation. For details, see [Tool Acquisition](https://developer.harmonyos.com/en/develop/deveco-studio) and [HUAWEI DevEco Studio User Guide](https://developer.harmonyos.com/en/docs/documentation/doc-guides/tools_overview-0000001053582387). diff --git a/en/device-dev/guide/running-on-the-device-9.md b/en/device-dev/guide/running-on-the-device-9.md index b97c20b8a10a83bdcd1c7216a5d231212abb341d..72fdad2eca6863415f1db8890939a18f49d09103 100644 --- a/en/device-dev/guide/running-on-the-device-9.md +++ b/en/device-dev/guide/running-on-the-device-9.md @@ -1,6 +1,6 @@ # Running on the Device -Before you install the app and run it on the development board, install the DevEco Device Tool by following operations provided in [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). Burn OpenHarmony into the development board, and run it on the board. For details about how to build, burn, and run an image, see [Getting Started with Hi3516](../quick-start/how-to-develop-12.md). After the image is running normally and the system is started properly, perform the following steps to install or uninstall the app: +Before you install the app and run it on the development board, install the DevEco Device Tool by following operations provided in [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). Burn OpenHarmony into the development board, and run it on the board. For details about how to build, burn, and run an image, see [Getting Started with Hi3516](../quick-start/standard-system.md). After the image is running normally and the system is started properly, perform the following steps to install or uninstall the app: 1. Obtain the HDC client from the following path: diff --git a/en/device-dev/overview.md b/en/device-dev/overview.md new file mode 100644 index 0000000000000000000000000000000000000000..4a5832db5a9e81baccd6d4cbb4bf500c0f5a06a3 --- /dev/null +++ b/en/device-dev/overview.md @@ -0,0 +1,175 @@ +# Overview + +- [System Types](#section767218232110) +- [Document Outline](#section19810171681218) + +This topic provides a panorama of all documents for you to obtain helpful information quickly. These documents are classified based on your learning progress and development scenarios of OpenHarmony. + +## System Types + +It is good practice to understand the system types for you to find useful documents that can guide your development. + +OpenHarmony is an open-source distributed operating system for all scenarios. It uses a component-based design to tailor its features to better suit devices with 128 KiB to GiB-level of RAM. You can integrate a flexible combination of system components based on the hardware capabilities of the device. + +To make the integration simple and easy on different hardware, OpenHarmony defines three basic system types. You only need to select a suitable system type and configure the mandatory component set, thereby developing a system for your device at the minimum workload. The definitions of the basic system types are provided as follows for your reference: + +- Mini system + + A mini system runs on the devices whose memory is greater than or equal to 128 KiB and that are equipped with MCU processors such as Arm Cortex-M and 32-bit RISC-V. This system provides multiple lightweight network protocols and graphics frameworks, and a wide range of read/write components for the IoT bus. Typical products include connection modules, sensors, and wearables for smart home. + +- Small system + + A small system runs on the devices whose memory is greater than or equal to 1 MiB and that are equipped with application processors such as Arm Cortex-A. This system provides higher security capabilities, standard graphics frameworks, and video encoding and decoding capabilities. Typical products include smart home IP cameras, electronic cat eyes, and routers, and event data recorders \(EDRs\) for smart travel. + +- Standard system + + A standard system runs on the devices whose memory is greater than or equal to 128 MiB and that are equipped with application processors such as Arm Cortex-A. This system provides a complete application framework supporting the enhanced interaction, 3D GPU, hardware composer, diverse components, and rich animations. This system applies to high-end refrigerator displays. + + +In addition, OpenHarmony provides a series of optional system components that can be configured as required to support feature extension and customization. These system components are combined to form a series of system capabilities that, for better understanding, are described as features or functions for you to choose. + +## Document Outline + +- [Mini and Small System Development Guidelines](#table3762949121211) +- [Standard System Development Guidelines](#table17667535516) + +**Table 1** Mini and small system development guidelines \(reference memory < 128 MB\) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Topic

+

Development Scenario

+

Documents

+

About OpenHarmony

+

Getting familiar with OpenHarmony

+
+

Development resources

+

Preparing for your development

+
+

Quick start

+

Getting started with setup, build, burning, debugging, and running of OpenHarmony

+

Getting Started for Mini and Small Systems

+

Basic capabilities

+

Using basic capabilities of OpenHarmony

+
+

Advanced development

+

Developing smart devices based on system capabilities

+
+

Porting and adaptation

+
  • Porting and adapting the OpenHarmony to an SoC
  • Porting and adapting the OpenHarmony to a third-party library
+
+

Contributing components

+

Contributing components to OpenHarmony

+
+

Reference

+

Referring to development specifications

+
+
+ +**Table 2** Standard system development guidelines \(reference memory ≥ 128 MB\) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Topic

+

Development Scenario

+

Documents

+

About OpenHarmony

+

Getting familiar with OpenHarmony

+
+

Development resources

+

Preparing for your development

+
+

Quick start

+

Getting started with setup, build, burning, debugging, and running of OpenHarmony

+

Getting Started for Standard System

+

Basic capabilities

+

Using basic capabilities of OpenHarmony

+
+

Advanced development

+

Developing smart devices based on system capabilities

+
+

Porting and adaptation

+

Porting and adapting the OpenHarmony to a third-party library

+

Third-Party Library Porting Guide

+

Contributing components

+

Contributing components to OpenHarmony

+
+

Reference

+

Referring to development specifications

+
+
+ diff --git a/en/device-dev/quick-start/Readme-EN.md b/en/device-dev/quick-start/Readme-EN.md index 4aab1f04bc1ebcfdf3856df5a8f7b02d9cf26265..7c52dded2505a5db6cd57a6614e2f3665ccf66e8 100644 --- a/en/device-dev/quick-start/Readme-EN.md +++ b/en/device-dev/quick-start/Readme-EN.md @@ -33,12 +33,10 @@ - [FAQs](faqs-6.md) - [Standard System](standard-system.md) - - [Overview](overview-7.md) - - [Environment Setup](environment-setup-8.md) - - [Overview](overview-9.md) - - [Windows Development Environment](windows-development-environment-10.md) - - [Preparing the Ubuntu Build Environment](preparing-the-ubuntu-build-environment.md) - - [FAQs](faqs-11.md) - - - [How to Develop](how-to-develop-12.md) + - [Introduction](introduction.md) + - [Setting Up Windows Development Environment](setting-up-windows-development-environment.md) + - [Setting Up Ubuntu Development Environment in Docker Mode and Building Source Code](setting-up-ubuntu-development-environment-in-docker-mode-and-building-source-code.md) + - [Setting Up Ubuntu Development Environment with Installation Package and Building Source Code](setting-up-ubuntu-development-environment-with-installation-package-and-building-source-code.md) + - [Burning Images](burning-images.md) + - [FAQs](faqs-7.md) diff --git a/en/device-dev/quick-start/burning-images.md b/en/device-dev/quick-start/burning-images.md new file mode 100644 index 0000000000000000000000000000000000000000..b63966d94334be8ec473b7d641fb4f36c33b8866 --- /dev/null +++ b/en/device-dev/quick-start/burning-images.md @@ -0,0 +1,205 @@ +# Burning Images + +- [Next](#section5600113114323) + +Programming flash memory of a regular system requires DevEco Device Tool v2.2 Beta1 or later. + +The Hi3516DV300 of the Hi3516 series development boards supports programming flash memory of a regular system through the USB port, network port, or serial port, where: + +- **Windows system: Supports programming through the USB port, serial port, or network port** +- **Linux system: Supports programming through the serial port or network port \(Linux+Windows dual system: Also supports programming through the USB port\)** + +Except for environment setup, the operations of programming are the same for Windows and Linux. + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>Currently, the Hi3516D V300 development board supports system burning over the network port, USB port, or serial port. This document uses the network port as an example. For details about system burning over other ports, see [Programming Flash Memory on the Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681). + +### Prerequisites + +[Open a project](https://device.harmonyos.com/en/docs/ide/user-guides/open_project-0000001071680043) in DevEco Device Tool and select the folder where the file to be programmed is located. Select **Hi3516DV300** for the development board type and **Hb** for **Framework**. + +### Programming Flash Memory Through the Network Port + +The Hi3516DV300 supports programming through the network port in Windows or Linux. + +1. Connect the PC and the target development board through the power port, serial port, and network port. In this section, the Hi3516DV300 is used as an example. For details, please refer to [Introduction to the Hi3516 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_camera_start_3516-0000001052670587). +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/en-us_image_0000001114129428.png) + +3. Open DevEco Device Tool and go to **Projects** \> **Settings**. + + ![](figures/2021-01-27_170334-18.png) + +4. On the **Partition Configuration** tab page, enter the information about the files to be programmed, including the following. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

+

Binary

+

Memory

+

System

+

Address

+

Length

+

Board

+

Type

+

fastboot

+

Select u-boot-hi3516dv300_emmc.bin.

+

emmc

+

none

+

0x000000

+

0x100000

+

Select hi3516dv300.

+

NA

+

boot

+

Select uImage.

+

emmc

+

none

+

0x100000

+

0xf00000

+

NA

+

updater

+

Select updater.img.

+

emmc

+

ext3/4

+

0x1000000

+

0x1400000

+

NA

+

misc

+

Leave it blank.

+

emmc

+

none

+

0x2400000

+

0x100000

+

NA

+

system

+

Select system.img.

+

emmc

+

ext3/4

+

0x2500000

+

0xceb00000

+

NA

+

vendor

+

Select vendor.img.

+

emmc

+

ext3/4

+

0xd1000000

+

0x10000000

+

NA

+

userdata

+

Select userdata.img.

+

emmc

+

ext3/4

+

0xe1000000

+

0x5b800000

+

NA

+
+ + ![](figures/en-us_image_0000001160527611.png) + +5. On the **hi3516dv300** tab page, configure the programming options. + + - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001056443961_li1050616379507). + - **upload\_protocol**: Select the programming protocol **hiburn-net**. + - **upload\_partitions**: Select the file to be programmed, including the following: fastboot, boot, updater, misc, system, vendor, and userdata. + + ![](figures/en-us_image_0000001117621400.png) + +6. 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 Programming on Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/set_ipaddress-0000001141825075). +7. Set the IP address of the network port for programming: + + - **upload\_net\_server\_ip**: Select the IP address set in [6](en-us_topic_0000001056443961.md#li1558813168234), 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. + - **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. + - **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. + + ![](figures/en-us_image_0000001117463460.png) + +8. When you finish modifying, click **Save** in the upper right corner. +9. Open the project file, go to ![](figures/2021-01-27_170334-19.png) \> **PROJECT TASKS** \> **fastboot** \> **Erase** to erase U-boot. + + ![](figures/en-us_image_0000001163045527.png) + +10. When the following message is displayed, power off the development board and then power it on. + + ![](figures/en-us_image_0000001114129432.png) + +11. Start programming. When the following message is displayed, it indicates that the programming is successful. + + ![](figures/en-us_image_0000001113969542.png) + + +## Next + +Congratulations! You have completed the quick start for the standard system. Get yourself familiar with OpenHarmony by a [Development Example for Clock App](../guide/development-example-for-clock-apps.md). + diff --git a/en/device-dev/quick-start/developing-a-driver.md b/en/device-dev/quick-start/developing-a-driver.md index ab35222428df5f2d3c2b909f178486c45c4c9e40..46e8fc8d73366f89a16d84312e418e2c0a7d60b3 100644 --- a/en/device-dev/quick-start/developing-a-driver.md +++ b/en/device-dev/quick-start/developing-a-driver.md @@ -1,4 +1,4 @@ -# Developing a Driver +# Developing a Driver - [Introduction to Driver](#s8efc1952ebfe4d1ea717182e108c29bb) - [Compiling and Burning](#section660016185110) @@ -423,7 +423,7 @@ The following operations take a HDF-based UART driver as an example to show how ## Compiling and Burning -Compile and burn images by referring to [Building](../quick-start/running-a-hello-ohos-program.md)and [Burning](../quick-start/running-a-hello-ohos-program.md). +Compile and burn images by referring to [Building](../guide/development-example-for-platform-drivers.md)and [Burning](../guide/development-example-for-platform-drivers.md). ## Running an Image @@ -439,14 +439,14 @@ Compile and burn images by referring to [Building](../quick-start/running-a-hel 1. Click **Monitor** to enable the serial port. 2. Press **Enter** repeatedly until **hisilicon** displays. - 3. Go to step [2](running-a-hello-ohos-program.md#l5b42e79a33ea4d35982b78a22913b0b1) if the board is started for the first time or the startup parameters need to be modified; go to step [3](running-a-hello-ohos-program.md#ld26f18828aa44c36bfa36be150e60e49) otherwise. + 3. Go to [2](running-a-hello-ohos-program.md#l5b42e79a33ea4d35982b78a22913b0b1) if the board is started for the first time or the startup parameters need to be modified; go to [3](running-a-hello-ohos-program.md#ld26f18828aa44c36bfa36be150e60e49) 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. +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. + >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 + **Table 1** Parameters of the U-Boot - - - -

Command

@@ -457,30 +457,30 @@ Compile and burn images by referring to [Building](../quick-start/running-a-hel

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.

+

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.

+

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.

+

saveenv means to save the current configuration.

reset

reset means to reset the board.

+

reset means to reset the board.

>![](public_sys-resources/icon-notice.gif) **NOTICE:** - >**go 0x80000000** \(optional\) 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. + >**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**. @@ -499,5 +499,5 @@ Compile and burn images by referring to [Building](../quick-start/running-a-hel ## Follow-up Learning -Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/cameras-with-a-screen.md). +Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/cameras-without-a-screen.md). diff --git a/en/device-dev/quick-start/environment-setup-7.md b/en/device-dev/quick-start/environment-setup-7.md deleted file mode 100644 index ef15df388b11feb122f95d983f3232819c631f78..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/environment-setup-7.md +++ /dev/null @@ -1,11 +0,0 @@ -# Environment Setup - -- **[Overview](overview-8.md)** - -- **[Windows Development Environment](windows-development-environment-9.md)** - -- **[Ubuntu Build Environment](ubuntu-build-environment-10.md)** - -- **[FAQs](faqs-11.md)** - - diff --git a/en/device-dev/quick-start/environment-setup-8.md b/en/device-dev/quick-start/environment-setup-8.md deleted file mode 100644 index 2428c3c9e47baa0d290309f02302c9b49a9336fd..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/environment-setup-8.md +++ /dev/null @@ -1,11 +0,0 @@ -# Environment Setup - -- **[Overview](overview-9.md)** - -- **[Windows Development Environment](windows-development-environment-10.md)** - -- **[Preparing the Ubuntu Build Environment](preparing-the-ubuntu-build-environment.md)** - -- **[FAQs](faqs-11.md)** - - diff --git a/en/device-dev/quick-start/environment-setup.md b/en/device-dev/quick-start/environment-setup.md index d1b7756c427d8503df33e4091497f2a54abf3a79..289f31965d0c38aea69d9ff15c917b6df62d8019 100644 --- a/en/device-dev/quick-start/environment-setup.md +++ b/en/device-dev/quick-start/environment-setup.md @@ -1,4 +1,4 @@ -# Environment Setup +# Environment Setup - **[Overview](overview-1.md)** diff --git a/en/device-dev/quick-start/faq.md b/en/device-dev/quick-start/faq.md index b1c6da1ec2a9aa32b80bc52b228db109730b05df..b1ed6400050ae7938c1873878e305e8779acac1f 100644 --- a/en/device-dev/quick-start/faq.md +++ b/en/device-dev/quick-start/faq.md @@ -1,4 +1,4 @@ -# FAQ +# FAQ - [What should I do if garbled characters and segmentation faults occur during hb installation?](#section411894616119) - [What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?](#section629417571626) diff --git a/en/device-dev/quick-start/faqs-2.md b/en/device-dev/quick-start/faqs-2.md deleted file mode 100644 index d85c04678ebb9340c0f9a240f9a143642177d280..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/faqs-2.md +++ /dev/null @@ -1,172 +0,0 @@ -# FAQs - -- [What should I do when the images failed to be burnt over the selected serial port?](#section627268185113) -- [What should I do when Windows-based PC failed to be connected to the board?](#section195391036568) -- [What should I do when the image failed to be burnt?](#section571164016565) -- [What should I do when the message indicating Python cannot be found is displayed during compilation and building?](#section1039835245619) -- [What should I do when no command output is displayed?](#section14871149155911) - -## What should I do when the images failed to be burnt over the selected serial port? - -- **Symptom** - - **Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port. - - **Figure 1** Failed to open the serial port - ![](figures/failed-to-open-the-serial-port.png "failed-to-open-the-serial-port") - -- **Possible Causes** - - The serial port has been used. - -- **Solutions** - -1. Search for the terminal using serial-xx from the drop-down list in the **TERMINAL** panel. - - **Figure 2** Checking whether the serial port is used - ![](figures/checking-whether-the-serial-port-is-used.png "checking-whether-the-serial-port-is-used") - -2. Click the dustbin icon as shown in the following figure to disable the terminal using the serial port. - - **Figure 3** Disabling the terminal using the serial port - ![](figures/disabling-the-terminal-using-the-serial-port.png "disabling-the-terminal-using-the-serial-port") - -3. Click **Burn**, select the serial port, and start burning images again. - - **Figure 4** Restarting burning - - - ![](figures/changjian1.png) - - -## 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 5** 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**. - - **Figure 6** Network and firewall setting - ![](figures/network-and-firewall-setting.png "network-and-firewall-setting") - -3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**. - - **Figure 7** Firewall and network protection - ![](figures/firewall-and-network-protection.png "firewall-and-network-protection") - -4. Select the Visual Studio Code application - - **Figure 8** Selecting the Visual Studio Code application - ![](figures/selecting-the-visual-studio-code-application.png "selecting-the-visual-studio-code-application") - -5. Select the **Private** and **Public** network access rights for the Visual Studio Code application. - - **Figure 9** Allowing the Visual Studio Code application to access the network - ![](figures/allowing-the-visual-studio-code-application-to-access-the-network.png "allowing-the-visual-studio-code-application-to-access-the-network") - - -## 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/en-us_image_0000001105056492.png) - - -- **Possible Cause 1**: Python is not installed. -- **Solutions** - - Install Python by referring to [Installing and Configuring Python](../quick-start/ubuntu-build-environment.md). - -- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. - - ![](figures/en-us_image_0000001151976069.png) - -- **Solutions** - - Run the following commands: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - Example: - - ![](figures/en-us_image_0000001152176139.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](../quick-start/running-a-hello-ohos-program.md) 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 10** 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/faqs-3.md b/en/device-dev/quick-start/faqs-3.md index f756777596c26d45581846666d5bf7a16ab3c632..12c3a207b5cb348e0fc45f60c7985eacb886e61b 100644 --- a/en/device-dev/quick-start/faqs-3.md +++ b/en/device-dev/quick-start/faqs-3.md @@ -1,4 +1,4 @@ -# FAQs +# FAQs - [What should I do when the images failed to be burnt over the selected serial port?](#section627268185113) - [What should I do when Windows-based PC failed to be connected to the board?](#section195391036568) @@ -97,7 +97,7 @@ - **Symptom** - ![](figures/en-us_image_0000001105056492.png) + ![](figures/en-us_image_0000001174270715.png) - **Possible Cause 1**: Python is not installed. @@ -107,7 +107,7 @@ - **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. - ![](figures/en-us_image_0000001151976069.png) + ![](figures/en-us_image_0000001128470880.png) - **Solutions** @@ -122,7 +122,7 @@ Example: - ![](figures/en-us_image_0000001152176139.png) + ![](figures/en-us_image_0000001174270713.png) ## What should I do when no command output is displayed? diff --git a/en/device-dev/quick-start/faqs-5.md b/en/device-dev/quick-start/faqs-5.md deleted file mode 100644 index 86fbd180f7f576ae1c9e7a97cfea432ed7220e2e..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/faqs-5.md +++ /dev/null @@ -1,174 +0,0 @@ -# FAQs - -- [What should I do when the images failed to be burnt over the selected serial port?](#section1498892119619) -- [What should I do when Windows-based PC failed to be connected to the board?](#section8512971816) -- [What should I do when the image failed to be burnt?](#section1767804111198) -- [What should I do when the message indicating Python cannot be found is displayed during compilation and building?](#en-us_topic_0000001053466255_section1039835245619) -- [What should I do when no command output is displayed?](#en-us_topic_0000001053466255_section14871149155911) - -## What should I do when the images failed to be burnt over the selected serial port? - -- **Symptom** - - **Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port. - - **Figure 1** Failed to open the serial port - ![](figures/failed-to-open-the-serial-port-9.png "failed-to-open-the-serial-port-9") - -- **Possible Causes** - - The serial port has been used. - -- **Solutions** - -1. Search for the terminal using serial-xx from the drop-down list in the **TERMINAL** panel. - - **Figure 2** Checking whether the serial port is used - ![](figures/checking-whether-the-serial-port-is-used-10.png "checking-whether-the-serial-port-is-used-10") - -2. Click the dustbin icon as shown in the following figure to disable the terminal using the serial port. - - **Figure 3** Disabling the terminal using the serial port - ![](figures/disabling-the-terminal-using-the-serial-port-11.png "disabling-the-terminal-using-the-serial-port-11") - -3. Click **Burn**, select the serial port, and start burning images again. - - **Figure 4** Restarting burning - - - ![](figures/changjian1-12.png) - - -## 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 5** Failed to obtain the image file due to unavailable connection - ![](figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-13.png "failed-to-obtain-the-image-file-due-to-unavailable-connection-13") - -- **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**. - - **Figure 6** Network and firewall setting - ![](figures/network-and-firewall-setting-14.png "network-and-firewall-setting-14") - -3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**. - - **Figure 7** Firewall and network protection - ![](figures/firewall-and-network-protection-15.png "firewall-and-network-protection-15") - -4. Select the Visual Studio Code application - - **Figure 8** Selecting the Visual Studio Code application - ![](figures/selecting-the-visual-studio-code-application-16.png "selecting-the-visual-studio-code-application-16") - -5. Select the **Private** and **Public** network access rights for the Visual Studio Code application. - - **Figure 9** Allowing the Visual Studio Code application to access the network - ![](figures/allowing-the-visual-studio-code-application-to-access-the-network-17.png "allowing-the-visual-studio-code-application-to-access-the-network-17") - - -## 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/en-us_image_0000001105376260.png) - - -- **Possible Cause 1** - - Python is not installed. - -- **Solutions** - - Install Python by referring to [Installing and Configuring Python](../quick-start/ubuntu-build-environment.md). - -- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. - - ![](figures/en-us_image_0000001105216304.png) - -- **Solutions** - - Run the following commands: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - Example: - - ![](figures/en-us_image_0000001152256235.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](../quick-start/running-a-hello-ohos-program.md) 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/en-us_image_0000001105536118.png) - - diff --git a/en/device-dev/quick-start/faqs-6.md b/en/device-dev/quick-start/faqs-6.md index b428e3cf9fa250e5f077130f331806683bfbd8cf..05d53356aed9ab16ac8fe65e19da9dbe70089533 100644 --- a/en/device-dev/quick-start/faqs-6.md +++ b/en/device-dev/quick-start/faqs-6.md @@ -1,4 +1,4 @@ -# FAQs +# FAQs - [What should I do when the images failed to be burnt over the selected serial port?](#section1498892119619) - [What should I do when Windows-based PC failed to be connected to the board?](#section8512971816) @@ -97,7 +97,7 @@ - **Symptom** - ![](figures/en-us_image_0000001105376260.png) + ![](figures/en-us_image_0000001174270743.png) - **Possible Cause 1** @@ -110,7 +110,7 @@ - **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. - ![](figures/en-us_image_0000001105216304.png) + ![](figures/en-us_image_0000001174270739.png) - **Solutions** @@ -125,7 +125,7 @@ Example: - ![](figures/en-us_image_0000001152256235.png) + ![](figures/en-us_image_0000001174350661.png) ## What should I do when no command output is displayed? @@ -169,6 +169,6 @@ 3. Log in to the serial port after the burning is complete. - ![](figures/en-us_image_0000001105536118.png) + ![](figures/en-us_image_0000001174350659.png) diff --git a/en/device-dev/quick-start/faqs-11.md b/en/device-dev/quick-start/faqs-7.md similarity index 88% rename from en/device-dev/quick-start/faqs-11.md rename to en/device-dev/quick-start/faqs-7.md index 1a0b63cdc83f58505a315d982274ade0ffaa8a59..649bcba046dcb5d9429291e69e44cc933bbbd077 100644 --- a/en/device-dev/quick-start/faqs-11.md +++ b/en/device-dev/quick-start/faqs-7.md @@ -1,4 +1,4 @@ -# FAQs +# FAQs - **Symptom** diff --git a/en/device-dev/quick-start/faqs.md b/en/device-dev/quick-start/faqs.md index 67bf3ab4671f458cde77df06005ebd128a57eeec..43db6c0373612483fa0cc1e752058e256bf9665e 100644 --- a/en/device-dev/quick-start/faqs.md +++ b/en/device-dev/quick-start/faqs.md @@ -1,4 +1,4 @@ -# FAQs +# FAQs - [What should I do when the message configure: error: no acceptable C compiler found in $PATH is displayed during Python 3 installation?](#section1221016541119) - [What should I do when the message -bash: make: command not found is displayed during Python 3 installation?](#section1913477181213) @@ -134,7 +134,7 @@ - Download the source code from [https://pypi.org/project/pycrypto/\#files](https://pypi.org/project/pycrypto/#files). - ![](figures/en-us_image_0000001151976061.png) + ![](figures/en-us_image_0000001128470864.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. @@ -164,7 +164,7 @@ - Download the installation package from [https://pypi.org/project/ecdsa/\#files](https://pypi.org/project/ecdsa/#files). - ![](figures/en-us_image_0000001152176131.png) + ![](figures/en-us_image_0000001128311072.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. @@ -194,7 +194,7 @@ - Download the installation package from [https://pypi.org/project/six/\#files](https://pypi.org/project/six/#files). - ![](figures/en-us_image_0000001152056191.png) + ![](figures/en-us_image_0000001174270699.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. @@ -247,7 +247,7 @@ - **Possible Cause 2:** The soft link that points to the Python does not exist in the **usr/bin** directory. - ![](figures/en-us_image_0000001105376252.png) + ![](figures/en-us_image_0000001128311070.png) - **Solutions** @@ -262,7 +262,7 @@ Example: - ![](figures/en-us_image_0000001105216296.png) + ![](figures/en-us_image_0000001174350623.png) ## What should I do when an error with **lsb\_release** occurs during **kconfiglib** installation? diff --git a/en/device-dev/quick-start/figures/1-19.png b/en/device-dev/quick-start/figures/1-19.png deleted file mode 100644 index 8ed1535a6bc23dc5bd02fbd5a3f1392f46ad8d83..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/1-19.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/1-20.png b/en/device-dev/quick-start/figures/1-20.png deleted file mode 100644 index 8ed1535a6bc23dc5bd02fbd5a3f1392f46ad8d83..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/1-20.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/2021-01-27_170334-17.png b/en/device-dev/quick-start/figures/2021-01-27_170334-17.png deleted file mode 100644 index 1e7dd2cdb515e871a1c5d34b3332b097bc02351b..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/2021-01-27_170334-17.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/2021-01-27_170334-18.png b/en/device-dev/quick-start/figures/2021-01-27_170334-18.png index 5b573a4ddfe89fe25cb1b567736823244fdb9e97..1e7dd2cdb515e871a1c5d34b3332b097bc02351b 100644 Binary files a/en/device-dev/quick-start/figures/2021-01-27_170334-18.png and b/en/device-dev/quick-start/figures/2021-01-27_170334-18.png differ diff --git a/en/device-dev/quick-start/figures/2021-01-27_170334-6.png b/en/device-dev/quick-start/figures/2021-01-27_170334-6.png deleted file mode 100644 index 5b573a4ddfe89fe25cb1b567736823244fdb9e97..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/2021-01-27_170334-6.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/2021-01-27_181047.png b/en/device-dev/quick-start/figures/2021-01-27_181047.png deleted file mode 100644 index 587ca51a1010c3fefcc79be73ffc5584075551ed..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/2021-01-27_181047.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/2021-01-28_112953.png b/en/device-dev/quick-start/figures/2021-01-28_112953.png deleted file mode 100644 index a3a92549a345ad7ebb1d0142a50d2c41c4ede9f4..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/2021-01-28_112953.png and /dev/null differ diff --git "a/en/device-dev/quick-start/figures/3516\346\255\243\351\235\242-17.png" "b/en/device-dev/quick-start/figures/3516\346\255\243\351\235\242-17.png" new file mode 100644 index 0000000000000000000000000000000000000000..1ccb47f20022261cc291e8b435f263c00e8d4a27 Binary files /dev/null and "b/en/device-dev/quick-start/figures/3516\346\255\243\351\235\242-17.png" differ diff --git a/en/device-dev/quick-start/figures/allowing-the-visual-studio-code-application-to-access-the-network-17.png b/en/device-dev/quick-start/figures/allowing-the-visual-studio-code-application-to-access-the-network-17.png deleted file mode 100644 index 13d77ce93c78ac07039c8f09741db1db1d05a124..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/allowing-the-visual-studio-code-application-to-access-the-network-17.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/changjian1-12.png b/en/device-dev/quick-start/figures/changjian1-12.png deleted file mode 100644 index 208a4fbace342514f59f0000c4d50f5dc9321f0f..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/changjian1-12.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/checking-whether-the-serial-port-is-used-10.png b/en/device-dev/quick-start/figures/checking-whether-the-serial-port-is-used-10.png deleted file mode 100644 index cfa0ceb21f5a11d459b93721f512309c9d6da2ac..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/checking-whether-the-serial-port-is-used-10.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/chuankou1-7.png b/en/device-dev/quick-start/figures/chuankou1-7.png deleted file mode 100644 index 8eb26425f53028a08eb40e3037ecd302f3082270..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/chuankou1-7.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/disabling-the-terminal-using-the-serial-port-11.png b/en/device-dev/quick-start/figures/disabling-the-terminal-using-the-serial-port-11.png deleted file mode 100644 index 0c1f60638087d0fe56127f2f842244355afad85f..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/disabling-the-terminal-using-the-serial-port-11.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001078313582.png b/en/device-dev/quick-start/figures/en-us_image_0000001078313582.png deleted file mode 100644 index d09a7cc3c72dff150d1a06ab4a7fcaebb7de3265..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001078313582.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001113969536.png b/en/device-dev/quick-start/figures/en-us_image_0000001113969536.png deleted file mode 100644 index baac7b26450b8bc195a0db0bb3bb41119c0d9828..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001113969536.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001114129426.png b/en/device-dev/quick-start/figures/en-us_image_0000001114129426.png deleted file mode 100644 index c5548cb227bd024b49aa3adba0a20869581448e8..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001114129426.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001117621400.png b/en/device-dev/quick-start/figures/en-us_image_0000001117621400.png new file mode 100644 index 0000000000000000000000000000000000000000..bfb378217e99536cf076deecfb0f0677cb51eef8 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001117621400.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001119945810.png b/en/device-dev/quick-start/figures/en-us_image_0000001119945810.png deleted file mode 100644 index 8a4060e64fdd059143a3ec1adb9ee6937fa4af84..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001119945810.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001120802173.png b/en/device-dev/quick-start/figures/en-us_image_0000001120802173.png deleted file mode 100644 index 5576e74b99dc2ae0ea635d3f684b560b93fce516..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001120802173.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001120802383.png b/en/device-dev/quick-start/figures/en-us_image_0000001120802383.png deleted file mode 100644 index 4921a82341b8828a6117343b77f7c92b0d99a2c6..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001120802383.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001121061169.png b/en/device-dev/quick-start/figures/en-us_image_0000001121061169.png deleted file mode 100644 index 5081b5a4be6269549d271afe84f96f7f489fc419..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001121061169.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001105524466.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311066.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001105524466.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311066.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001105216304.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311070.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001105216304.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311070.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001152176131.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311072.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001152176131.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311072.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001096963405.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311090.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001096963405.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311090.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001078089378.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311092.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001078089378.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311092.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001073835952.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311094.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001073835952.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311094.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001056814287.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311096.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001056814287.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311096.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001160649343.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311098.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001160649343.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311098.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001128311100.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311100.png new file mode 100644 index 0000000000000000000000000000000000000000..61aec8202ac830a3598ef2c8a413be30c5a742f0 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001128311100.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001128311104.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311104.png new file mode 100644 index 0000000000000000000000000000000000000000..773abcd91a0c0ee1d3f5f87218216fc337d8f62f Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001128311104.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001078404538.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311116.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001078404538.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311116.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001057235392.png b/en/device-dev/quick-start/figures/en-us_image_0000001128311118.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001057235392.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128311118.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001151976061.png b/en/device-dev/quick-start/figures/en-us_image_0000001128470864.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001151976061.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128470864.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001105376252.png b/en/device-dev/quick-start/figures/en-us_image_0000001128470880.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001105376252.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128470880.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001073057176.png b/en/device-dev/quick-start/figures/en-us_image_0000001128470900.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001073057176.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128470900.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001128470902.png b/en/device-dev/quick-start/figures/en-us_image_0000001128470902.png new file mode 100644 index 0000000000000000000000000000000000000000..43e43b52b677660cec4d049784b246aebe1a2434 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001128470902.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001160529355.png b/en/device-dev/quick-start/figures/en-us_image_0000001128470904.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001160529355.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128470904.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001128470906.png b/en/device-dev/quick-start/figures/en-us_image_0000001128470906.png new file mode 100644 index 0000000000000000000000000000000000000000..281958fe76a787acc5d0b98f5ea248fa5abf2405 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001128470906.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001078244328.png b/en/device-dev/quick-start/figures/en-us_image_0000001128470922.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001078244328.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128470922.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001096154076.png b/en/device-dev/quick-start/figures/en-us_image_0000001128471042.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001096154076.png rename to en/device-dev/quick-start/figures/en-us_image_0000001128471042.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001160528243.png b/en/device-dev/quick-start/figures/en-us_image_0000001160528243.png deleted file mode 100644 index 571af4fc8e53f59f246496ad670cc6b84f4473f3..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001160528243.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001160649345.png b/en/device-dev/quick-start/figures/en-us_image_0000001160649345.png deleted file mode 100644 index 1819a2816fa617fa6389646fd6a4b1ab0d97272d..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/en-us_image_0000001160649345.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001152056191.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270699.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001152056191.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270699.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001105216296.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270713.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001105216296.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270713.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001105056492.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270715.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001105056492.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270715.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001174270727.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270727.png new file mode 100644 index 0000000000000000000000000000000000000000..2609aa029260a137c76c299fead396c07b8c8e45 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001174270727.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001116405268.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270729.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001116405268.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270729.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001163529159.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270731.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001163529159.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270731.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001174270733.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270733.png new file mode 100644 index 0000000000000000000000000000000000000000..72dd05e3ae1eb91156df98cb1915b6264b3bbe5a Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001174270733.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001100641602.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270735.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001100641602.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270735.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001152256221.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270737.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001152256221.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270737.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001151976069.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270739.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001151976069.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270739.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001105376260.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270743.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001105376260.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270743.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001163569275.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270749.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001163569275.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270749.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001074285712.png b/en/device-dev/quick-start/figures/en-us_image_0000001174270751.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001074285712.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174270751.png diff --git "a/en/device-dev/quick-start/figures/3861\350\203\214\351\235\242.png" b/en/device-dev/quick-start/figures/en-us_image_0000001174350615.png similarity index 100% rename from "en/device-dev/quick-start/figures/3861\350\203\214\351\235\242.png" rename to en/device-dev/quick-start/figures/en-us_image_0000001174350615.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001152176139.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350623.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001152176139.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350623.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001073388838.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350633.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001073388838.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350633.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001163568181.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350641.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001163568181.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350641.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001073242197.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350643.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001073242197.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350643.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001160529359.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350647.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001160529359.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350647.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001077956808.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350649.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001077956808.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350649.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001174350651.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350651.png new file mode 100644 index 0000000000000000000000000000000000000000..686385e096a24ec1906169d2b11f75030c386b9f Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001174350651.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001174350653.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350653.png new file mode 100644 index 0000000000000000000000000000000000000000..e0dc22d338e23ca54b973597bf9f94ae4fd08a42 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001174350653.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001105536118.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350659.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001105536118.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350659.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001152256235.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350661.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001152256235.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350661.png diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001074445364.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350669.png similarity index 100% rename from en/device-dev/quick-start/figures/en-us_image_0000001074445364.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350669.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001143154485.png b/en/device-dev/quick-start/figures/en-us_image_0000001174350781.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001143154485.png rename to en/device-dev/quick-start/figures/en-us_image_0000001174350781.png diff --git a/en/device-dev/quick-start/figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-13.png b/en/device-dev/quick-start/figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-13.png deleted file mode 100644 index 548e03da4b76123cb67d41cbd1de4a0f33f5ef4b..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-13.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/failed-to-open-the-serial-port-9.png b/en/device-dev/quick-start/figures/failed-to-open-the-serial-port-9.png deleted file mode 100644 index 25308b9cab52a166955e70ada35c3191d90dd64c..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/failed-to-open-the-serial-port-9.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/firewall-and-network-protection-15.png b/en/device-dev/quick-start/figures/firewall-and-network-protection-15.png deleted file mode 100644 index 82faf7d05d2a40e9deae2649a1f59fccea67bdc2..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/firewall-and-network-protection-15.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/getting-started-for-the-standard-system.png b/en/device-dev/quick-start/figures/getting-started-for-the-standard-system.png new file mode 100644 index 0000000000000000000000000000000000000000..216265660cd0364189cd438da8b7e2600a7a5099 Binary files /dev/null and b/en/device-dev/quick-start/figures/getting-started-for-the-standard-system.png differ diff --git a/en/device-dev/quick-start/figures/network-and-firewall-setting-14.png b/en/device-dev/quick-start/figures/network-and-firewall-setting-14.png deleted file mode 100644 index 9487849c5f8a860e9680016ff3657404b2c0ad6e..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/network-and-firewall-setting-14.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/selecting-the-visual-studio-code-application-16.png b/en/device-dev/quick-start/figures/selecting-the-visual-studio-code-application-16.png deleted file mode 100644 index 81812f492838b439ea507d4afb763ff751c0a467..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/selecting-the-visual-studio-code-application-16.png and /dev/null differ diff --git a/en/device-dev/quick-start/figures/successful-system-startup-and-program-execution-8.png b/en/device-dev/quick-start/figures/successful-system-startup-and-program-execution-8.png deleted file mode 100644 index 6a85551cd30c8c0576c138d86dc66ddf73dccb44..0000000000000000000000000000000000000000 Binary files a/en/device-dev/quick-start/figures/successful-system-startup-and-program-execution-8.png and /dev/null differ diff --git a/en/device-dev/quick-start/hi3516-development-board.md b/en/device-dev/quick-start/hi3516-development-board.md index 39c132f0a8319e74b4bdb0e5cad6c6d6beef3993..53148cbe9a1fba7264055edc9fdad8eb193c00ad 100644 --- a/en/device-dev/quick-start/hi3516-development-board.md +++ b/en/device-dev/quick-start/hi3516-development-board.md @@ -1,4 +1,4 @@ -# Hi3516 Development Board +# Hi3516 Development Board - [Introduction](#section26131214194212) - [Development Board Specifications](#section15192203316533) diff --git a/en/device-dev/quick-start/hi3516.md b/en/device-dev/quick-start/hi3516.md index 17987269923620c2ceb55de66d076c128da4da15..e33aa899315932687a01de028a7f0fccba0a91b2 100644 --- a/en/device-dev/quick-start/hi3516.md +++ b/en/device-dev/quick-start/hi3516.md @@ -1,4 +1,4 @@ -# Hi3516 +# Hi3516 - **[Setting Up the Environment](setting-up-the-environment-2.md)** diff --git a/en/device-dev/quick-start/hi3518-development-board.md b/en/device-dev/quick-start/hi3518-development-board.md index 1ba46e856f9b491ab4e240ab888ea3fe5a2fc803..262d456b50b47d8c91593999dd5a8f2d5a935d66 100644 --- a/en/device-dev/quick-start/hi3518-development-board.md +++ b/en/device-dev/quick-start/hi3518-development-board.md @@ -1,4 +1,4 @@ -# Hi3518 Development Board +# Hi3518 Development Board - [Introduction](#section14815247616) - [Development Board Specifications](#section765112478446) diff --git a/en/device-dev/quick-start/hi3518.md b/en/device-dev/quick-start/hi3518.md index 3f7e2e5dcd0bddac839cd3184a3a27920df556e6..817d4c826164210f795e36503f49dded0c49529e 100644 --- a/en/device-dev/quick-start/hi3518.md +++ b/en/device-dev/quick-start/hi3518.md @@ -1,4 +1,4 @@ -# Hi3518 +# Hi3518 - **[Setting Up the Environment](setting-up-the-environment-4.md)** diff --git a/en/device-dev/quick-start/hi3861-development-board.md b/en/device-dev/quick-start/hi3861-development-board.md index 4e9d3ce1665264cd57b814aaea67f1f5039c9cd8..6790ab0fe64db575950bef8225613438ccbad63a 100644 --- a/en/device-dev/quick-start/hi3861-development-board.md +++ b/en/device-dev/quick-start/hi3861-development-board.md @@ -1,4 +1,4 @@ -# Hi3861 Development Board +# Hi3861 Development Board - [Introduction](#section19352114194115) - [Resources and Constraints](#section82610215014) @@ -19,7 +19,7 @@ The Hi3861 WLAN module can also be connected to the Hi3861 mother board to expan **Figure 2** Appearance of the Hi3861 mother board -![](figures/en-us_image_0000001119945810.png) +![](figures/en-us_image_0000001174350615.png) - The RF circuit includes modules such as the power amplifier \(PA\), low noise amplifier \(LNA\), RF Balun, antenna switch, and power management. It supports a standard bandwidth of 20 MHz and a narrow bandwidth of 5 MHz or 10 MHz, and provides a maximum rate of 72.2 Mbit/s at the physical layer. - The Hi3861 WLAN baseband supports the orthogonal frequency division multiplexing \(OFDM\) technology and is backward compatible with the direct sequence spread spectrum \(DSSS\) and complementary code keying \(CCK\) technologies. In addition, the Hi3861 WLAN baseband supports various data rates specified in the IEEE 802.11 b/g/n protocol. @@ -29,7 +29,7 @@ The Hi3861 WLAN module can also be connected to the Hi3861 mother board to expan **Figure 3** Hi3861 functions - ![](figures/en-us_image_0000001105524466.png) + ![](figures/en-us_image_0000001128311066.png) ## Resources and Constraints diff --git a/en/device-dev/quick-start/hi3861.md b/en/device-dev/quick-start/hi3861.md index 8032fdd2ab4b2f7e0a23dcb8b127733d1c1900dc..100cdfcabc277a736ed2238f4b8cd93e345624a0 100644 --- a/en/device-dev/quick-start/hi3861.md +++ b/en/device-dev/quick-start/hi3861.md @@ -1,4 +1,4 @@ -# Hi3861 +# Hi3861 - **[Setting Up the Environment](setting-up-the-environment.md)** diff --git a/en/device-dev/quick-start/how-to-develop-12.md b/en/device-dev/quick-start/how-to-develop-12.md deleted file mode 100644 index f6fe9c7a06d672e94059bb92f907cf1e96311cc1..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/how-to-develop-12.md +++ /dev/null @@ -1,246 +0,0 @@ -# How to Develop - -- [Environment Setup](#section1246439101710) -- [Build](#section375234715135) -- [Burning](#section111671738101213) - - [Prerequisites](#section1458192114718) - - [Programming Flash Memory Through the USB Port](#section18423113662120) - -- [Development Example](#section5600113114323) - -## Environment Setup - -For details about setting up the standard OpenHarmony environment, see [Setting Up the Environment](overview-9.md). - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->For details about the environment requirements of the third-party development board, refer to the official guide of the development board. - -## Build - -If you are using the Docker environment, refer to the Docker usage guide to build the system. If you are using the installation package, 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 Hi3516DV300 - ``` - - **product\_name** indicates the platform supported by the current distribution, - -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/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. - - >![](public_sys-resources/icon-note.gif) **NOTE:** - >For details about module-specific build operations, see [Compilation and Building Overview](../subsystems/building-guidelines-for-the-standard-system.md). - - -## Burning - -Programming flash memory of a regular system requires DevEco Device Tool v2.2 Beta1 or later. - -The Hi3516DV300 of the Hi3516 series development boards supports programming flash memory of a regular system through the USB port, network port, or serial port, where: - -- **Windows system: Supports programming through the USB port, serial port, or network port** -- **Linux system: Supports programming through the serial port or network port \(Linux+Windows dual system: Also supports programming through the USB port\)** - -Except for environment setup, the burning operations are the same for Windows and Linux. - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->Currently, the Hi3516D V300 development board supports system burning over the USB port, network port, or serial port. This document uses the USB port as an example. For details about system burning over other ports, see [Programming Flash Memory on the Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681). - -### Prerequisites - -[Open a project](https://device.harmonyos.com/en/docs/ide/user-guides/open_project-0000001071680043) in DevEco Device Tool and select the folder where the file to be programmed is located. Select **Hi3516DV300** for the development board type and **Hb** for **Framework**. - -### Programming Flash Memory Through the USB Port - -The Hi3516DV300 supports programming through the USB port in Windows or Linux+Windows environment. - -1. Connect the PC and the target development board through the serial port and USB port. In this section, the Hi3516DV300 is used as an example. For details, please refer to [Introduction to the Hi3516 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_camera_start_3516-0000001052670587). -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/en-us_image_0000001160529359.png) - -3. Open DevEco Device Tool and go to **Projects** \> **Settings**. - - ![](figures/2021-01-27_170334-17.png) - -4. On the **Partition Configuration** tab page, enter the information about the files to be programmed, including the following. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Binary

-

Memory

-

System

-

Address

-

Length

-

Board

-

Type

-

fastboot

-

Select u-boot-hi3516dv300_emmc.bin.

-

emmc

-

none

-

0x000000

-

0x100000

-

Select hi3516dv300.

-

NA

-

boot

-

Select uImage.

-

emmc

-

none

-

0x100000

-

0xf00000

-

NA

-

updater

-

Select updater.img.

-

emmc

-

ext3/4

-

0x1000000

-

0x1400000

-

NA

-

misc

-

Leave it blank.

-

emmc

-

none

-

0x2400000

-

0x100000

-

NA

-

system

-

Select system.img.

-

emmc

-

ext3/4

-

0x2500000

-

0xceb00000

-

NA

-

vendor

-

Select vendor.img.

-

emmc

-

ext3/4

-

0xd1000000

-

0x10000000

-

NA

-

userdata

-

Select userdata.img.

-

emmc

-

ext3/4

-

0xe1000000

-

0x5b800000

-

NA

-
- - ![](figures/en-us_image_0000001160527611.png) - -5. On the **hi3516dv300** tab page, configure the programming options. - - - **upload\_port**: Select the serial port number obtained in step 2. - - **upload\_protocol**: Select the programming protocol **hiburn-usb**. - - **upload\_partitions**: Select the file to be programmed, including the following: fastboot, boot, updater, misc, system, vendor, and userdata. - - ![](figures/en-us_image_0000001160528243.png) - -6. When you finish modifying, click **Save** in the upper right corner. -7. Open the project file, go to ![](figures/2021-01-27_170334-18.png) \> **PROJECT TASKS** \> **fastboot** \> **Erase** to erase U-boot. - - ![](figures/en-us_image_0000001163045527.png) - -8. When the following message is displayed, power off the development board and then power it on. - - ![](figures/en-us_image_0000001114129426.png) - -9. If the following message is displayed, it indicates that U-Boot is erased successfully. - - ![](figures/en-us_image_0000001113969536.png) - -10. Go to **hi3516dv300** \> **Upload** to start programming. - - >![](public_sys-resources/icon-note.gif) **NOTE:** - >If this is the first time you program flash memory on the Hi3516 or Hi3518 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 programming again. - - ![](figures/1-19.png) - -11. If the following message is displayed, it indicates that the programming is successful. - - ![](figures/en-us_image_0000001160649343.png) - - -## Development Example - -You have completed the quick start for the standard system. Get yourself familiar with OpenHarmony by a [Development Example for Platform Drivers](../guide/overview-10.md). - diff --git a/en/device-dev/quick-start/how-to-develop.md b/en/device-dev/quick-start/how-to-develop.md index 1d961ebf4b57ac2a26aa4e377987a6bddd50c2d2..3e5f705cb569a6d3c7f9543dd24a75159e1682aa 100644 --- a/en/device-dev/quick-start/how-to-develop.md +++ b/en/device-dev/quick-start/how-to-develop.md @@ -1,4 +1,4 @@ -# How to Develop +# How to Develop - **[Hi3861](hi3861.md)** diff --git a/en/device-dev/quick-start/introduction-to-the-development-boards.md b/en/device-dev/quick-start/introduction-to-the-development-boards.md index 6703a78fe6d3e877145d5198435d3c2f99c971c4..3848dad5841c053f27b1b5f6280a8a34cb6b41c4 100644 --- a/en/device-dev/quick-start/introduction-to-the-development-boards.md +++ b/en/device-dev/quick-start/introduction-to-the-development-boards.md @@ -1,4 +1,4 @@ -# Introduction to the Development Boards +# Introduction to the Development Boards - **[Hi3861 Development Board](hi3861-development-board.md)** diff --git a/en/device-dev/quick-start/introduction.md b/en/device-dev/quick-start/introduction.md new file mode 100644 index 0000000000000000000000000000000000000000..7209c5c0f18b55e253bca942025b9d0682e390b3 --- /dev/null +++ b/en/device-dev/quick-start/introduction.md @@ -0,0 +1,54 @@ +# Introduction + +- [Quick Start Process](#section7825218111517) +- [Introduction to the Development Board](#en-us_topic_0000001053666242_section047719215429) +- [Development Board Specifications](#en-us_topic_0000001053666242_section15192203316533) + +This document helps you quickly understand how to set up a standard OpenHarmony system, and how to build, burn, and start the system. You can develop the standard system in Windows and build source code in Linux. + +This document uses the recommended Hi3516D V300 development board as an example. + +## Quick Start Process + +The following figure shows the process of getting started for the standard system, during which, you can set up the Ubuntu development environment in Docker mode or by using the installation package. + +**Figure 1** Getting started for the standard system +![](figures/getting-started-for-the-standard-system.png "getting-started-for-the-standard-system") + +## Introduction to the Development Board + +Hi3516D 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 a high-performance NNIE engine, leading the industry in terms of low bit rate, high image quality, intelligent processing and analysis, and low power consumption. + +**Figure 2** Hi3516D V300 front view + + +![](figures/3516正面-17.png) + +## Development Board Specifications + +**Table 1** Specifications of the Hi3516 development board + + + + + + + + + + + + + +

Item

+

Description

+

Processor and internal memory

+
  • Hi3516D V300
  • 1 GB DDR3
  • 8 GB eMMC4.5
+

External components

+
  • Ethernet port
  • Audio and video
    • One voice input
    • One mono (AC_L) output, connected to a 3 W power amplifier (LM4871)
    • Micro-HDMI (one HDMI 1.4)
    +
  • Cameras
    • Sensor IMX335
    • M12 lens with a focal length of 4 mm and an aperture of 1.8
    +
  • Display
    • 2.35-inch LCD connector
    • 5.5-inch LCD connector
    +
  • External components and interfaces
    • microSD card interface
    • JTAG/I2S interface
    • ADC interface
    • Steer gear interface
    • Grove connector
    • USB 2.0 (Type C)
    • Three function keys: two custom keys and one update key
    • LED indicator (including green and red)
    +
+
+ diff --git a/en/device-dev/quick-start/overview-0.md b/en/device-dev/quick-start/overview-0.md index 9a73241369434d4ec249a00b0f9231c5a9d83a3a..8a7a6ba8fdb2b61d099ce7b399c04efe6056f5d6 100644 --- a/en/device-dev/quick-start/overview-0.md +++ b/en/device-dev/quick-start/overview-0.md @@ -1,4 +1,4 @@ -# Overview +# Overview The mini and small OpenHarmony systems are suitable for IoT devices with limited memory. This document describes the system development with three typical development boards: Hi3861 WLAN module, Hi3516D V300, and Hi3518E V300. diff --git a/en/device-dev/quick-start/overview-1.md b/en/device-dev/quick-start/overview-1.md index d490f51d2ebc128dda830e011b63b20e637b1136..5b5feef48c5ae0f1668069c6cb4fce756fe4b2b6 100644 --- a/en/device-dev/quick-start/overview-1.md +++ b/en/device-dev/quick-start/overview-1.md @@ -1,4 +1,4 @@ -# Overview +# Overview Use the DevEco Device Tool for development, build, burning, and debugging of OpenHarmony. diff --git a/en/device-dev/quick-start/overview-6.md b/en/device-dev/quick-start/overview-6.md deleted file mode 100644 index c4f01181922cdde3dd4924e6ef8978c03f260a1c..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/overview-6.md +++ /dev/null @@ -1,4 +0,0 @@ -# Overview - -This document helps you quickly understand how to set up a standard OpenHarmony system, and how to build, burn, and start the system. This document uses the recommended Hi3516D V300 development board as an example. - diff --git a/en/device-dev/quick-start/overview-7.md b/en/device-dev/quick-start/overview-7.md deleted file mode 100644 index c4f01181922cdde3dd4924e6ef8978c03f260a1c..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/overview-7.md +++ /dev/null @@ -1,4 +0,0 @@ -# Overview - -This document helps you quickly understand how to set up a standard OpenHarmony system, and how to build, burn, and start the system. This document uses the recommended Hi3516D V300 development board as an example. - diff --git a/en/device-dev/quick-start/overview-8.md b/en/device-dev/quick-start/overview-8.md deleted file mode 100644 index 050e338e9d4009463c20bb282f0c8b9bd9f69370..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/overview-8.md +++ /dev/null @@ -1,58 +0,0 @@ -# Overview - -- [Introduction](#section18217135811916) -- [Environment Requirements](#section466851916410) - - [Hardware](#section19682305453) - - [Software](#section1595725202314) - - -## Introduction - -In a standard system, you can use the DevEco Device Tool for development and burning in Windows, and for build in Linux. This document describes how to set up the environment. - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->The procedure for setting up a Windows standard-system environment is basically the same as that for setting up a Windows mini- or small-system environment. Therefore, you can skip section [Windows Development Environment](windows-development-environment-9.md) if you have set up a Windows mini- or small-system environment. - -## Environment Requirements - -### Hardware - -- Linux compile server -- Windows workstation \(host computer\) - -### Software - -**Table 1** Development platform requirements - - - - - - - - - - - - - - - - - - -

Platform

-

Software

-

Description

-

Remarks

-

Linux compile server

-

Operating system

-

Ubuntu 18.04 64-bit or later is used for the Linux OS, and bash is used as the shell. The server hardware specifications are as follows:

-
  • Hard disk: at least 400 GB
  • CPU: at least 8 cores
  • Memory: at least 32 GB
-

Common software such as samba and vim is installed in the OS by default. Adaptation is required to support Linux file sharing.

-

You can develop programs on the Windows workstation or Linux server via a remote login.

-

Windows workstation

-

Operating system

-

Windows XP/Windows7/Windows10

-
- diff --git a/en/device-dev/quick-start/overview-9.md b/en/device-dev/quick-start/overview-9.md deleted file mode 100644 index 2afccc92c3ac98b0d6f181c1ba69f706364a0562..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/overview-9.md +++ /dev/null @@ -1,58 +0,0 @@ -# Overview - -- [Introduction](#section18217135811916) -- [Environment Requirements](#section466851916410) - - [Hardware](#section19682305453) - - [Software](#section1595725202314) - - -## Introduction - -In a standard OpenHarmony system, you can use the DevEco Device Tool for development and burning in Windows, and for build in Linux. This document describes how to set up the environment. - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->The procedure for setting up a Windows standard-system environment is basically the same as that for setting up a Windows mini- or small-system environment. Therefore, you can skip section [Windows Development Environment](windows-development-environment-10.md) if you have set up a Windows mini- or small-system environment. - -## Environment Requirements - -### Hardware - -- Linux compile server -- Windows workstation \(host computer\) - -### Software - -**Table 1** Development platform requirements - - - - - - - - - - - - - - - - - - -

Platform

-

Software

-

Description

-

Remarks

-

Linux compile server

-

Operating system

-

Ubuntu 18.04 64-bit or later is used for the Linux OS, and bash is used as the shell. The server hardware specifications are as follows:

-
  • Hard disk: at least 400 GB
  • CPU: at least 8 cores
  • Memory: at least 32 GB
-

Common software such as samba and vim is installed in the OS by default. Adaptation is required to support Linux file sharing.

-

You can develop programs on the Windows workstation or Linux server via a remote login.

-

Windows workstation

-

Operating system

-

Windows XP/Windows7/Windows10

-
- diff --git a/en/device-dev/quick-start/overview.md b/en/device-dev/quick-start/overview.md index 63cb2b8be145243d7324f5d29d28b303cad6d6aa..4a5832db5a9e81baccd6d4cbb4bf500c0f5a06a3 100644 --- a/en/device-dev/quick-start/overview.md +++ b/en/device-dev/quick-start/overview.md @@ -30,6 +30,9 @@ In addition, OpenHarmony provides a series of optional system components that ca ## Document Outline +- [Mini and Small System Development Guidelines](#table3762949121211) +- [Standard System Development Guidelines](#table17667535516) + **Table 1** Mini and small system development guidelines \(reference memory < 128 MB\) @@ -45,49 +48,49 @@ In addition, OpenHarmony provides a series of optional system components that ca

Getting familiar with OpenHarmony

- +

Development resources

Preparing for your development

- +

Quick start

Getting started with setup, build, burning, debugging, and running of OpenHarmony

-

Getting Started for Mini and Small Systems

+

Getting Started for Mini and Small Systems

Basic capabilities

Using basic capabilities of OpenHarmony

- +

Advanced development

Developing smart devices based on system capabilities

- +

Porting and adaptation

- +

Contributing components

Contributing components to OpenHarmony

- +

Reference

@@ -111,53 +114,53 @@ In addition, OpenHarmony provides a series of optional system components that ca -

About OpenHarmony

+

About OpenHarmony

-

Getting familiar with OpenHarmony

+

Getting familiar with OpenHarmony

- +

Development resources

Preparing for your development

- +

Quick start

Getting started with setup, build, burning, debugging, and running of OpenHarmony

-

Getting Started for Standard System

+

Getting Started for Standard System

Basic capabilities

-

Using basic capabilities of OpenHarmony

+

Using basic capabilities of OpenHarmony

- +

Advanced development

Developing smart devices based on system capabilities

- +

Porting and adaptation

Porting and adapting the OpenHarmony to a third-party library

-

Third-Party Library Porting Guide

+

Third-Party Library Porting Guide

Contributing components

-

Contributing components to OpenHarmony

+

Contributing components to OpenHarmony

- +

Reference

diff --git a/en/device-dev/quick-start/preparing-the-ubuntu-build-environment.md b/en/device-dev/quick-start/preparing-the-ubuntu-build-environment.md deleted file mode 100644 index e1f0774daadb6d6f807a95c16affac8e8a630b27..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/preparing-the-ubuntu-build-environment.md +++ /dev/null @@ -1,69 +0,0 @@ -# Preparing the Ubuntu Build Environment - -- [Method 1: Setting up an Ubuntu Build Environment Using a Docker Environment](#section1643363843714) - - [Obtaining Standard-System Source Code](#section58448331029) - - [Installing and Using the Docker Environment](#section22916211916) - -- [Method 2: Setting up an Ubuntu Build Environment Using an Installation Package](#section25961010189) - - [Installing Dependent Tools](#section109262032104819) - - [Obtaining Standard-System Source Code](#section6325556113718) - - [Obtaining prebuilts](#section16453104219209) - - -You can use either the Docker environment or installation package provided by OpenHarmony to set up an Ubuntu build environment. This section describes the two methods. - -## Method 1: Setting up an Ubuntu Build Environment Using a Docker Environment - -The standard OpenHarmony system provides a Docker environment which encapsulates build tools. To use the Docker environment, perform the following steps: - -1. Obtain the standard-system source code. -2. Install and use the Docker environment. - -### Obtaining Standard-System Source Code - -Obtain the [standard-system source code](https://repo.huaweicloud.com/harmonyos/os/2.0/code-2.0-canary.tar.gz). The obtained source code is the static code. If you want to obtain the latest source code from Gitee, use [repo](../get-code/source-code-acquisition.md). - -### Installing and Using the Docker Environment - -For details, see [Installing and Using Docker](../get-code/tool-acquisition.md). - -## Method 2: Setting up an Ubuntu Build Environment Using an Installation Package - -The procedure is as follows: - -1. Install dependent tools. -2. Obtain the standard-system source code. -3. Obtain prebuilts. - -### Installing Dependent Tools - -The installation command is as follows: - -``` -sudo apt-get install binutils git-core 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 lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 -``` - ->![](public_sys-resources/icon-caution.gif) **CAUTION:** ->The preceding command is applicable to Ubuntu 18.04. For other Ubuntu versions, use the corresponding installation commands based on the installation package name. If the Ubuntu version is later than 18.04, Python 2.7 and python-minimal must be installed. - -### Obtaining Standard-System Source Code - -Obtain the [standard-system source code](https://repo.huaweicloud.com/harmonyos/os/2.0/code-2.0-canary.tar.gz). The obtained source code is the static code. If you want to obtain the latest source code from Gitee, use [repo](../get-code/source-code-acquisition.md). - -### Obtaining prebuilts - -1. Go to the OpenHarmony working directory. - - ``` - cd OpenHarmony - ``` - -2. Execute the following script: - - ``` - 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**\). - - diff --git a/en/device-dev/quick-start/running-a-hello-ohos-program-4.md b/en/device-dev/quick-start/running-a-hello-ohos-program-4.md deleted file mode 100644 index 62c151696188113379a554af194eae697f0f22b4..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/running-a-hello-ohos-program-4.md +++ /dev/null @@ -1,268 +0,0 @@ -# Running a Hello OHOS Program - -- [Creating a Program](#section1550972416485) -- [Building](#section234175193114) -- [Burning](#section7609155824819) -- [Running an Image](#section17612105814480) -- [Follow-up Learning](#section9712145420182) - -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 new 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 compilation by referring to [Using Docker to Prepare the Build Environment](../get-code/tool-acquisition.md). If the Linux compilation environment is installed using a software package, execute the following commands to compile source code in the root directory of the source code package. - -``` -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** Settings -![](figures/settings-4.png "settings-4") - ->![](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 - -The USB port is the only burning mode supported by the Hi3518 development board. - -1. Connect the PC and the target development board through the serial port and USB port. In this section, the Hi3518EV300 is used as an example. For details, please refer to [Introduction to the Hi3518 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_camera_start_hi3518-0000001050170473). -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/en-us_image_0000001073057176.png) - -3. Open DevEco Device Tool and go to **Projects** \> **Settings**. - - ![](figures/en-us_image_0000001077956808.png) - -4. On the **hi3518ev300** tab page, set the programming options. - - - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001057313128_li46411811196). - - **upload\_protocol**: Select the programming protocol **hiburn-usb**. - - **upload\_partitions**: Select the file to be programmed. By default, the **fastboot**, **kernel**, **rootfs**, and **userfs** files are programmed at the same time. - - ![](figures/en-us_image_0000001096963405.png) - -5. Switch between the **hi3518ev300\_fastboot**, **hi3518ev300\_kernel**, **hi3518ev300\_rootfs**, and **hi3518ev300\_userfs** tab pages, and modify the settings. In general cases, you can leave the fields at their default settings. To change the default settings, select the target item in the **New Option** field first. - - ![](figures/2021-01-28_112953.png) - -6. When you finish modifying, click **Save** in the upper right corner. - - ![](figures/2021-01-27_170334-5.png) - -7. Open the project file, go to ![](figures/2021-01-27_170334-6.png) \> **PROJECT TASKS** \> **partition:hi3518ev300\_fastboot** \> **Erase** to erase U-boot. - - ![](figures/2021-01-27_181047.png) - -8. When the following message is displayed, power off the development board and then power it on. - - ![](figures/en-us_image_0000001078089378.png) - -9. If the following message is displayed, it indicates that U-Boot is erased successfully. - - ![](figures/en-us_image_0000001073835952.png) - -10. Go to **env:hi3518ev300** \> **Upload** to start programming. - - ![](figures/en-us_image_0000001121061169.png) - -11. If the following message is displayed, it indicates that the programming is successful. - - ![](figures/en-us_image_0000001073242197.png) - - -## 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](../quick-start/faqs-2.md). - - **Figure 2** Serial port connection - - - ![](figures/chuankou1-7.png) - - 1. Click **Monitor** to enable the serial port. The **TERMINAL** window is displayed. - 2. Press **Enter** repeatedly until **hisilicon** displays. - 3. Go to [step 2](#li9441185382314) if the board is started for the first time or the startup parameters need to be modified; go to [step 3](#li6442853122312) otherwise. - -2. \(Mandatory for the first burning\) Modify the **bootcmd** and **bootargs** parameters of U-boot. This step is a fixed operation and the result can be saved. However, you need to perform the following steps again if U-boot needs to be reburnt. - - **Table 1** Parameters of the U-boot - - - - - - - - - - - - - - - - - - - - - - -

Command

-

Description

-

setenv bootcmd "sf probe 0;sf read 0x40000000 0x100000 0x600000;go 0x40000000";

-

Run this command to set the content of bootcmd. Select the flash whose number is 0, and read content that has a size of 0x600000 (6 MB) and a start address of 0x100000 to memory address 0x40000000. The size must be the same as that of the OHOS_Image.bin file in the IDE.

-

setenv bootargs "console=ttyAMA0,115200n8 root=flash fstype=jffs2 rw rootaddr=7 M rootsize=8 M";

-

In this command, bootargs is set to the serial port output, the baud rate is 115200, the data bit is 8, and the rootfs is mounted to the flash memory. The file system type is set to jffs2 rw, which provides the read-write attribute for the JFFS2 file system. rootaddr=7 M rootsize=8 M indicates the actual start address and length 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.

-

pri

-

pri means to view the displayed parameters.

-
- - >![](public_sys-resources/icon-notice.gif) **NOTICE:** - >**go 0x40000000** \(optional\) 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. If **hisilicon \#** is displayed during the startup, run the **reset** command. After the system automatically starts and **OHOS** is displayed, run the **./bin/helloworld** command and then press **Enter**. The system is started successfully if information shown in the following figure is displayed. - - **Figure 3** Successful system startup and program execution - ![](figures/successful-system-startup-and-program-execution-8.png "successful-system-startup-and-program-execution-8") - - -## Follow-up Learning - -Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/cameras-with-a-screen.md). - diff --git a/en/device-dev/quick-start/running-a-hello-ohos-program-5.md b/en/device-dev/quick-start/running-a-hello-ohos-program-5.md index 713bd45a6bda1acfa95c9b2061669fd5475ebb1a..e3f5d5e2955b1b44c9999d567a171ca426f5104b 100644 --- a/en/device-dev/quick-start/running-a-hello-ohos-program-5.md +++ b/en/device-dev/quick-start/running-a-hello-ohos-program-5.md @@ -1,4 +1,4 @@ -# Running a Hello OHOS Program +# Running a Hello OHOS Program - [Creating a Program](#section1550972416485) - [Building](#section234175193114) @@ -46,9 +46,9 @@ This section describes how to create, compile, burn, and run the first program, } ``` -3. Add a new component. +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.\) + 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.\) ``` { @@ -128,7 +128,7 @@ This section describes how to create, compile, burn, and run the first program, ## Building -If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/tool-acquisition.md). 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: +If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/docker-environment.md). 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.) @@ -143,53 +143,53 @@ The result files are generated in the **out/hispark\_aries/ipcamera\_hispark\_a ![](figures/settings-4.png "settings-4") >![](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 +>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 The USB port is the only burning mode supported by the Hi3518 development board. -1. Connect the PC and the target development board through the serial port and USB port. In this section, the Hi3518EV300 is used as an example. For details, please refer to [Introduction to the Hi3518 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_camera_start_hi3518-0000001050170473). +1. Connect the PC and the target development board through the serial port and USB port. In this section, the Hi3518EV300 is used as an example. 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/en-us_image_0000001073057176.png) + ![](figures/en-us_image_0000001128470900.png) 3. Open DevEco Device Tool and go to **Projects** \> **Settings**. - ![](figures/en-us_image_0000001077956808.png) + ![](figures/en-us_image_0000001174350649.png) 4. On the **Partition Configuration** tab page, modify the settings. In general cases, you can leave the fields at their default settings. 5. On the **hi3518ev300** tab page, set the programming options. - - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001057313128_li46411811196). + - **upload\_port**: Select the serial port number obtained in [2](#en-us_topic_0000001057313128_li46411811196). - **upload\_protocol**: Select the programming protocol **hiburn-usb**. - **upload\_partitions**: Select the file to be programmed. By default, the **fastboot**, **kernel**, **rootfs**, and **userfs** files are programmed at the same time. - ![](figures/en-us_image_0000001096963405.png) + ![](figures/en-us_image_0000001128311090.png) 6. When you finish modifying, click **Save** in the upper right corner. -7. Open the project file, go to ![](figures/2021-01-27_170334-5.png) \> **PROJECT TASKS** \> **hi3518ev300\_fastboot** \> **Erase** to erase U-boot. +7. Open the project file and click ![](figures/2021-01-27_170334-5.png). In the DevEco Device Tool window, choose **PROJECT TASKS** \> **hi3518ev300\_fastboot** \> **Erase** to erase U-Boot. - ![](figures/en-us_image_0000001163529159.png) + ![](figures/en-us_image_0000001174270731.png) 8. When the following message is displayed, power off the development board and then power it on. - ![](figures/en-us_image_0000001078089378.png) + ![](figures/en-us_image_0000001128311092.png) 9. If the following message is displayed, it indicates that U-Boot is erased successfully. - ![](figures/en-us_image_0000001073835952.png) + ![](figures/en-us_image_0000001128311094.png) 10. Go to **hi3518ev300** \> **Upload** to start programming. - ![](figures/en-us_image_0000001163568181.png) + ![](figures/en-us_image_0000001174350641.png) 11. If the following message is displayed, it indicates that the programming is successful. - ![](figures/en-us_image_0000001073242197.png) + ![](figures/en-us_image_0000001174350643.png) ## Running an Image @@ -208,9 +208,9 @@ The USB port is the only burning mode supported by the Hi3518 development board. 2. Press **Enter** repeatedly until **hisilicon** displays. 3. Go to [step 2](#li9441185382314) if the board is started for the first time or the startup parameters need to be modified; go to [step 3](#li6442853122312) otherwise. -2. \(Mandatory for the first burning\) Modify the **bootcmd** and **bootargs** parameters of U-boot. This step is a fixed operation and the result can be saved. However, you need to perform the following steps again if U-boot needs to be reburnt. +2. \(Mandatory for first-time burning\) Modify the **bootcmd** and **bootargs** parameters of U-Boot. This step is a fixed operation and the result can be saved. However, you need to perform the following steps again if U-Boot needs to be reburnt. - **Table 1** Parameters of the U-boot + **Table 1** Parameters of the U-Boot

Command

@@ -248,7 +248,7 @@ The USB port is the only burning mode supported by the Hi3518 development board.
>![](public_sys-resources/icon-notice.gif) **NOTICE:** - >**go 0x40000000** \(optional\) 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. + >**go 0x40000000** \(optional\) 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. If **hisilicon \#** is displayed during the startup, run the **reset** command. After the system automatically starts and **OHOS** is displayed, run the **./bin/helloworld** command and then press **Enter**. The system is started successfully if information shown in the following figure is displayed. diff --git a/en/device-dev/quick-start/running-a-hello-ohos-program.md b/en/device-dev/quick-start/running-a-hello-ohos-program.md index 5f38a61c19e21dfa897231cf60086708b586ca67..1bc2f5daad267626fea4ccda977975597197e26e 100644 --- a/en/device-dev/quick-start/running-a-hello-ohos-program.md +++ b/en/device-dev/quick-start/running-a-hello-ohos-program.md @@ -1,4 +1,4 @@ -# Running a Hello OHOS Program +# Running a Hello OHOS Program - [Creating a Program](#section204672145202) - [Building](#section1077671315253) @@ -129,7 +129,7 @@ This section describes how to create, compile, burn, and run the first program, ## Building -If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/tool-acquisition.md). 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: +If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/docker-environment.md). 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.) @@ -144,55 +144,55 @@ hb build -f (Start building.) The result files are generated in the **out/hispark\_taurus/ipcamera\_hispark\_taurus** directory. >![](public_sys-resources/icon-notice.gif) **NOTICE:** ->The U-boot file of the Hi3516D V300 development board can be obtained from the following path: device/hisilicon/hispark\_taurus/sdk\_liteos/uboot/out/boot/u-boot-hi3516dv300.bin +>The U-Boot file of the Hi3516D V300 development board can be obtained from the following path: device/hisilicon/hispark\_taurus/sdk\_liteos/uboot/out/boot/u-boot-hi3516dv300.bin ## Burning The Hi3516 development board allows you to burn flash memory over the USB port, serial port, or network port. The following uses the network port burning as an example. -1. Connect the PC and the target development board through the power port, serial port, and network port. In this section, the Hi3516DV300 is used as an example. For details, please refer to [Introduction to the Hi3516 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_camera_start_3516-0000001052670587). +1. Connect the PC and the target development board through the power port, serial port, and network port. In this section, the Hi3516DV300 is used as an example. For details, please refer to [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/en-us_image_0000001114129428.png) + ![](figures/en-us_image_0000001174350647.png) 3. Open DevEco Device Tool and go to **Projects** \> **Settings**. ![](figures/2021-01-27_170334.png) 4. On the **Partition Configuration** tab page, modify the settings. In general cases, you can leave the fields at their default settings. -5. On the **hi3516dv300** tab page, configure the programming options. +5. On the **hi3516dv300** tab page, set the programming options. - - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001056443961_li142386399535). + - **upload\_port**: Select the serial port number obtained in [2](#en-us_topic_0000001056443961_li142386399535). - **upload\_protocol**: Select the programming protocol **hiburn-net**. - **upload\_partitions**: Select the file to be programmed. By default, the **fastboot**, **kernel**, **rootfs**, and **userfs** files are programmed at the same time. - ![](figures/en-us_image_0000001160529355.png) + ![](figures/en-us_image_0000001128470904.png) 6. 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 Programming on Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/set_ipaddress-0000001141825075). 7. Set the IP address of the network port for programming: - - **upload\_net\_server\_ip**: Select the IP address set in [6](#en-us_topic_0000001056443961_li1558813168234), 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. - - **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. - - **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. + - **upload\_net\_server\_ip**: Select the IP address set in [6](#en-us_topic_0000001056443961_li1558813168234). Example: 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/en-us_image_0000001117463460.png) + ![](figures/en-us_image_0000001174270733.png) 8. When you finish modifying, click **Save** in the upper right corner. -9. Open the project file and go to ![](figures/2021-01-27_170334-2.png) \> **PROJECT TASKS** \> **hi3516dv300** \> **Upload** to start programming. +9. Open the project file and click ![](figures/2021-01-27_170334-2.png). In the DevEco Device Tool window, choose **PROJECT TASKS** \> **hi3516dv300** \> **Upload** to start programming. - ![](figures/en-us_image_0000001116405268.png) + ![](figures/en-us_image_0000001174270729.png) 10. When the following message is displayed, power off the development board and then power it on. - ![](figures/en-us_image_0000001114129432.png) + ![](figures/en-us_image_0000001128470906.png) -11. Start programming. When the following message is displayed, it indicates that the programming is successful. +11. Start burning. When the following message is displayed, the burning is successful. - ![](figures/en-us_image_0000001113969542.png) + ![](figures/en-us_image_0000001128311098.png) ## Running an Image @@ -211,12 +211,12 @@ The Hi3516 development board allows you to burn flash memory over the USB port, 2. Press **Enter** repeatedly until **hisilicon** displays. 3. Go to step [2](#l5b42e79a33ea4d35982b78a22913b0b1) if the board is started for the first time or the startup parameters need to be modified; go to step [3](#ld26f18828aa44c36bfa36be150e60e49) 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. +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. + >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 + **Table 1** Parameters of the U-Boot

Command

@@ -250,7 +250,7 @@ The Hi3516 development board allows you to burn flash memory over the USB port,
>![](public_sys-resources/icon-notice.gif) **NOTICE:** - >**go 0x80000000** \(optional\) 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. + >**go 0x80000000** \(optional\) 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**. diff --git a/en/device-dev/quick-start/running-a-hello-world-program.md b/en/device-dev/quick-start/running-a-hello-world-program.md index 8cb794b97c38fb0ae33cc2c32b80370bb9245584..033f919351f898df2b656b5512bedf524a613adb 100644 --- a/en/device-dev/quick-start/running-a-hello-world-program.md +++ b/en/device-dev/quick-start/running-a-hello-world-program.md @@ -1,4 +1,4 @@ -# Running a Hello World Program +# Running a Hello World Program - [Modifying Source Code](#section79601457101015) - [Debugging and Verification](#section1621064881419) @@ -135,7 +135,7 @@ To parse the call stack information, the **Hi3861\_wifiiot\_app.asm** file is 3. Determine that an exception occurs in the **WadRecvCB** function based on the call stack information. - ![](figures/en-us_image_0000001152256221.png) + ![](figures/en-us_image_0000001174270737.png) 4. Check and modify the code. diff --git a/en/device-dev/quick-start/setting-up-the-environment-1.md b/en/device-dev/quick-start/setting-up-the-environment-1.md deleted file mode 100644 index 49586bc1993e592982cc191d1e38c96a1eaa8b89..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/setting-up-the-environment-1.md +++ /dev/null @@ -1,151 +0,0 @@ -# Setting Up the Environment - -- [Environment Requirements](#section179175261196) - - [Hardware](#section5840424125014) - - [Software](#section965634210501) - -- [Installing Linux Build Tools](#section182916865219) - - [Changing Linux Shell to Bash](#section1715027152617) - - [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251) - - [Installing a File Packing Tool](#section1969111820270) - - [Installing the JVM](#section1692618112713) - - -## Environment Requirements - -### Hardware - -- Hi3516D V300 IoT camera development board -- USB-to-serial cable and network cable \(The Windows workstation is connected to the Hi3516D V300 development board through the USB-to-serial cable and network cable.\) - -The following figure shows the hardware connections. - -**Figure 1** Hardware connections - - -![](figures/矩形备份-292.png) - -### 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](#section182916865219). - -The following table describes the tools required for setting up the general environment for a Linux server of the Hi3516 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

-

Java virtual machine (JVM)

-

Compiles, debugs, and runs Java programs.

-

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 compilation tools like **LLVM** and **hc-gen**. ->- \(Recommended\) If you obtain the source code through an image site or a code repository, you should 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 && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev -``` - -### Installing a File Packing Tool - -1. Start a Linux server. -2. Install **dosfstools**. - - ``` - sudo apt-get install dosfstools - ``` - -3. Install **mtools**. - - ``` - sudo apt-get install mtools - ``` - -4. Install **mtd-utils**. - - ``` - sudo apt-get install mtd-utils - ``` - - -### Installing the JVM - -1. Start a Linux server. -2. Install the Java Runtime Environment \(JRE\). - - ``` - sudo apt-get install default-jre - ``` - -3. Install the Java Development Kit \(JDK\). - - ``` - sudo apt-get install default-jdk - ``` - - diff --git a/en/device-dev/quick-start/setting-up-the-environment-2.md b/en/device-dev/quick-start/setting-up-the-environment-2.md index 1c3604b02e1ab335b5ae9d4480b59826bccbe253..0e8430d75a7fa0bfe54420a0fcb8638108732710 100644 --- a/en/device-dev/quick-start/setting-up-the-environment-2.md +++ b/en/device-dev/quick-start/setting-up-the-environment-2.md @@ -1,4 +1,4 @@ -# Setting Up the Environment +# Setting Up the Environment - [Environment Requirements](#section179175261196) - [Hardware](#section5840424125014) diff --git a/en/device-dev/quick-start/setting-up-the-environment-3.md b/en/device-dev/quick-start/setting-up-the-environment-3.md deleted file mode 100644 index 7f27e367398083b4f12aa2f2346b449b73d56109..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/setting-up-the-environment-3.md +++ /dev/null @@ -1,156 +0,0 @@ -# Setting Up the Environment - -- [Environment Requirements](#section1724111409282) - - [Hardware](#section487353718276) - - [Software Requirements](#section17315193935817) - -- [Installing Linux Build Tools](#section8831868501) - - [Changing Linux Shell to Bash](#section1715027152617) - - [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251) - - [Installing a File Packing Tool](#section1686964015274) - - [Installing hc-gen](#section18706403274) - - -## 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** Hardware connections -![](figures/hardware-connections-3.png "hardware-connections-3") - -### Software Requirements - ->![](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 through an image site or a code repository, you should install the compilation tool **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 && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev -``` - -### Installing a File Packing Tool - -1. Start a Linux server. -2. Install **dosfstools**. - - ``` - sudo apt-get install dosfstools - ``` - -3. Install **mtools**. - - ``` - sudo apt-get install mtools - ``` - -4. Install **mtd-utils**. - - ``` - sudo apt-get install mtd-utils - ``` - - -### Installing hc-gen - -1. Start a Linux server. -2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar). -3. Decompress the hc-gen installation package to **\~/hc-gen** on the Linux server. - - ``` - tar -xvf hc-gen-0.65-linux.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=~/hc-gen:$PATH - ``` - -5. Validate the environment variable. - - ``` - source ~/.bashrc - ``` - - diff --git a/en/device-dev/quick-start/setting-up-the-environment-4.md b/en/device-dev/quick-start/setting-up-the-environment-4.md index e8938baf915d5fc9fad719a6c46684307c607d56..606871622b0805662544e092fd9c1e64e4f1cb27 100644 --- a/en/device-dev/quick-start/setting-up-the-environment-4.md +++ b/en/device-dev/quick-start/setting-up-the-environment-4.md @@ -1,4 +1,4 @@ -# Setting Up the Environment +# Setting Up the Environment - [Environment Requirements](#section1724111409282) - [Hardware](#section487353718276) diff --git a/en/device-dev/quick-start/setting-up-the-environment.md b/en/device-dev/quick-start/setting-up-the-environment.md index 382dc5ac66d2cd78bfb6bd1e307b9a362b1aafee..9eb8b040c6320fb44813778e45d0cfe647623a74 100644 --- a/en/device-dev/quick-start/setting-up-the-environment.md +++ b/en/device-dev/quick-start/setting-up-the-environment.md @@ -1,4 +1,4 @@ -# Setting Up the Environment +# Setting Up the Environment - [Environment Requirements](#section466851916410) - [Hardware](#section19202111020215) @@ -362,6 +362,6 @@ Perform the following operations on the Windows station. 2. Install the driver. 3. After the driver is installed, remove and then insert the USB cable. The serial port entry should be displayed as shown in the following figure. - ![](figures/en-us_image_0000001057235392.png) + ![](figures/en-us_image_0000001174350633.png) diff --git a/en/device-dev/quick-start/setting-up-ubuntu-development-environment-in-docker-mode-and-building-source-code.md b/en/device-dev/quick-start/setting-up-ubuntu-development-environment-in-docker-mode-and-building-source-code.md new file mode 100644 index 0000000000000000000000000000000000000000..0a3ca86c3294e3af31e06cd636d3c886c897ce94 --- /dev/null +++ b/en/device-dev/quick-start/setting-up-ubuntu-development-environment-in-docker-mode-and-building-source-code.md @@ -0,0 +1,118 @@ +# Setting Up Ubuntu Development Environment in Docker Mode and Building Source Code + +- [Obtaining Standard-System Source Code](#section8761819202511) + - [Prerequisites](#section102871547153314) + - [Procedure](#section429012478331) + +- [Obtaining the Docker Environment](#section181431248132513) +- [Building Source Code](#section92391739152318) + +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](setting-up-ubuntu-development-environment-with-installation-package-and-building-source-code.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](http://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 + +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 the Docker Environment + +**Method 1: Obtaining the Docker image from HUAWEI CLOUD SWR** + +1. Obtain the Docker image. + + ``` + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 + ``` + +2. Go to the root directory of OpenHarmony 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-standard:0.0.1 + ``` + + +**Method 2: Using the Dockerfile to build a local docker image** + +1. Obtain the Dockerfile script for a local Docker image. + + ``` + git clone https://gitee.com/openharmony/docs.git + ``` + +2. Go to the directory of the Dockerfile code and run the following command to build the Docker image: + + ``` + cd docs/docker/standard + ./build.sh + ``` + +3. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: + + ``` + docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.1 + ``` + + +## Building Source Code + +1. Run the preprocessing script in the root directory of the source code. + + ``` + ../scripts/prepare.sh + ``` + +2. Run the following script to start building for Standard-System Devices \(reference memory ≥ 128 MB\): + + ``` + ./build.sh --product-name {product_name} + ``` + + **product\_name** indicates the product supported by the current distribution, for example, **Hi3516DV300**. + + Files generated during the build are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. + +3. Burn the image. For details, see [Burning Images](burning-images.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/setting-up-ubuntu-development-environment-with-installation-package-and-building-source-code.md b/en/device-dev/quick-start/setting-up-ubuntu-development-environment-with-installation-package-and-building-source-code.md new file mode 100644 index 0000000000000000000000000000000000000000..0aaa9188a038d1279efdb270e4ffc2ac04ea2273 --- /dev/null +++ b/en/device-dev/quick-start/setting-up-ubuntu-development-environment-with-installation-package-and-building-source-code.md @@ -0,0 +1,98 @@ +# Setting Up Ubuntu Development Environment with Installation Package and Building Source Code + +- [Installing Dependent Tools](#section18431165519244) +- [Obtaining Standard-System Source Code](#section113751052102517) + - [Prerequisites](#section102871547153314) + - [Procedure](#section429012478331) + +- [Running prebuilts](#section0495320152619) +- [Building Source Code](#section1664835963517) + +## 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 +``` + +>![](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. + +## 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](http://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 + +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/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >For details about module-specific build operations, see [Compilation and Building Overview](../subsystems/building-guidelines-for-the-standard-system.md). + +3. Burn the image. For details, see [Burning Images](burning-images.md). + diff --git a/en/device-dev/quick-start/windows-development-environment-9.md b/en/device-dev/quick-start/setting-up-windows-development-environment.md similarity index 99% rename from en/device-dev/quick-start/windows-development-environment-9.md rename to en/device-dev/quick-start/setting-up-windows-development-environment.md index 91c42c4f088d5f467479bb40cd1819e67277cfe4..4308389e169c415c5a502738359d0eed094fd3fc 100644 --- a/en/device-dev/quick-start/windows-development-environment-9.md +++ b/en/device-dev/quick-start/setting-up-windows-development-environment.md @@ -1,4 +1,4 @@ -# Windows Development Environment +# Setting Up Windows Development Environment - [Obtaining the Software](#en-us_topic_0000001058091994_section1483143015558) - [Installing Visual Studio Code](#en-us_topic_0000001058091994_section71401018163318) diff --git a/en/device-dev/quick-start/standard-system.md b/en/device-dev/quick-start/standard-system.md index 33f6ed2a876d5ef8f93d7ee22c0546ea37ba9c67..f0aa95fdac24012324baa361c8958305bcfd436f 100644 --- a/en/device-dev/quick-start/standard-system.md +++ b/en/device-dev/quick-start/standard-system.md @@ -1,9 +1,15 @@ # Standard System -- **[Overview](overview-7.md)** +- **[Introduction](introduction.md)** -- **[Environment Setup](environment-setup-8.md)** +- **[Setting Up Windows Development Environment](setting-up-windows-development-environment.md)** -- **[How to Develop](how-to-develop-12.md)** +- **[Setting Up Ubuntu Development Environment in Docker Mode and Building Source Code](setting-up-ubuntu-development-environment-in-docker-mode-and-building-source-code.md)** + +- **[Setting Up Ubuntu Development Environment with Installation Package and Building Source Code](setting-up-ubuntu-development-environment-with-installation-package-and-building-source-code.md)** + +- **[Burning Images](burning-images.md)** + +- **[FAQs](faqs-7.md)** diff --git a/en/device-dev/quick-start/ubuntu-build-environment-10.md b/en/device-dev/quick-start/ubuntu-build-environment-10.md deleted file mode 100644 index 6b44c27dfc7b0a91a0564f60fd486865db8b242b..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/ubuntu-build-environment-10.md +++ /dev/null @@ -1,149 +0,0 @@ -# Ubuntu Build Environment - -- [Setting up a Ubuntu Build Environment Using a Docker Environment](#section1643363843714) - - [Obtaining System Source Code](#section58448331029) - - [Installing and Using the Docker Environment](#section22916211916) - -- [Setting up a Ubuntu Build Environment Using an Installation Package](#section25961010189) - - [Obtaining Standard-System Source Code](#section15424183111912) - - [Installing Dependent Tools](#section109262032104819) - - [Obtaining prebuilts](#section16453104219209) - - [Configuring the Node.js Environment and Obtaining the Node\_modules Dependency Package](#section133741330192119) - - [Installing the hc-gen Tool](#section149281248182116) - - -You can use either the Docker environment or installation package provided by OpenHarmony to set up a Ubuntu build environment. This section describes the two methods. - -## Setting up a Ubuntu Build Environment Using a Docker Environment - -The standard OpenHarmony system provides a Docker environment which encapsulates build tools. To use the Docker environment, perform the following steps: - -1. Obtain the system source code. -2. Install and use the Docker environment. - -### Obtaining System Source Code - -For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md). - -### Installing and Using the Docker Environment - -For details, see [Installing and Using Docker](../get-code/tool-acquisition.md). - -## Setting up a Ubuntu Build Environment Using an Installation Package - -The procedure is as follows: - -1. Obtain the system source code. -2. Install dependent tools. -3. Obtain prebuilts. -4. Configure the Node.js environment and obtain the Node\_modules dependency package. -5. Install the hc-gen tool. - -### Obtaining Standard-System Source Code - -For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md). - -### Installing Dependent Tools - -The installation command is as follows: - -``` -sudo apt-get install binutils git-core 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 lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 python2.7 python-minimal -``` - -### Obtaining prebuilts - -1. Go to the OpenHarmony working directory. - - ``` - cd OpenHarmony - ``` - -2. Download the script. - - ``` - curl https://gitee.com/landwind/script-tools/raw/master/Shell/OpenHarmony/OpenHarmony_2.0_canary_prebuilts_download.sh >./prebuilts_download.sh - ``` - -3. Download and decompress the prebuilts package in a specified directory. - - ``` - bash ./prebuilts_download.sh - ``` - - By default, binary files are stored in the **OpenHarmony\_2.0\_canary\_prebuilts** directory, which is in the same directory as **OpenHarmony**. To change the storage path, change the value of **bin\_dir** in **prebuilts\_download.sh**. - -4. Return to the previous directory. - - ``` - cd - - ``` - - -### Configuring the Node.js Environment and Obtaining the Node\_modules Dependency Package - -To build the JS framework, you need to download and configure Node.js on a Linux server. The procedure is as follows: - -1. Download Node.js on a Linux server. - - ``` - mkdir -p OpenHarmony/prebuilts/build-tools/common/nodejs # Create the nodejs directory. - cd OpenHarmony/prebuilts/build-tools/common/nodejs # Go to the nodejs directory. - wget --no-check-certificate https://nodejs.org/download/release/v12.18.4/node-v12.18.4-linux-x64.tar.gz # Download the Node.js package. - ``` - -2. Decompress the Node.js package and configure the Node.js environment. - - ``` - tar -zxvf node-v12.18.4-linux-x64.tar.gz # Decompress the Node.js package. - echo "export PATH=`pwd`/node-v12.18.4-linux-x64/bin:${PATH}" >> ~/.bashrc;source ~/.bashrc # Set a Node.js environment variable. - cd - # Return to the previous directory. - ``` - -3. Go to the **third\_party/jsframework** directory of the OpenHarmony code and download the **node\_modules** package. - - ``` - cd OpenHarmony/third_party/jsframework # Go to the jsframework directory. - npm install # Download the node_modules package. - cd - # Return to the previous directory. - ``` - -4. Store the **node\_modules** package in the **prebuilts/build-tools/common/js-framework** directory of the OpenHarmony code. - - ``` - mkdir -p OpenHarmony/prebuilts/build-tools/common/js-framework # Create the js-framework directory. - cp -rp OpenHarmony/third_party/jsframework/node_modules OpenHarmony/prebuilts/build-tools/common/js-framework/ - ``` - - -### Installing the hc-gen Tool - -hc-gen is used to compile the driver. To install hc-gen, perform the following steps: - -1. Start a Linux server. -2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar). -3. Decompress the hc-gen installation package to **\~/hc-gen** on the Linux server. - - ``` - tar -xvf hc-gen-0.65-linux.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=~/hc-gen:$PATH - ``` - -5. Validate the environment variable. - - ``` - source ~/.bashrc - ``` - - diff --git a/en/device-dev/quick-start/ubuntu-build-environment.md b/en/device-dev/quick-start/ubuntu-build-environment.md index 918845d214738226770103a3581133f66d557cc1..50c25fe1ea26c3f94dae8ce906c188d01e604850 100644 --- a/en/device-dev/quick-start/ubuntu-build-environment.md +++ b/en/device-dev/quick-start/ubuntu-build-environment.md @@ -1,4 +1,4 @@ -# Ubuntu Build Environment +# Ubuntu Build Environment - [Obtaining Source Code and Tools](#section1897711811517) - [Obtaining Source Code](#section1545225464016) @@ -11,6 +11,9 @@ - [Installation Procedure](#section11518484814) - [Uninstalling hb](#section3512551574) +- [Installing Other Tools](#section830511218494) + - [Installation Procedure](#section54409586499) + Operating system: 64-bit version of Ubuntu 16.04 or later. @@ -24,9 +27,9 @@ Perform the following steps to set up the build environment: 6. 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. Instead, refer to [Using Docker to Prepare the Build Environment](../get-code/tool-acquisition.md). +>- 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. Instead, refer to [Using Docker to Prepare the Build Environment](../get-code/docker-environment.md). >- 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 the [Compilation and Building Overview](../subsystems/compilation-and-building-overview.md). +>- For details about the compilation and building subsystem of OpenHarmony, see the [Compilation and Building Overview](../subsystems/building-guidelines-for-mini-and-small-systems.md). ## Obtaining Source Code and Tools @@ -79,10 +82,11 @@ The following table describes the tools and source code required for setting up

Functions as the compiler toolchain.

-

For master and OpenHarmony_2.x branch/tag, please use v10.0.1 from the following link:

https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz

+

For the master and OpenHarmony_v2.x branches and tags, use version 10.0.1:

+

https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz

-

For OpenHarmony_1.x branch/tag, please use v9.0.0 from the following link:

+

For the OpenHarmony_v1.x branches and tags, use version 9.0.0:

https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar

@@ -93,6 +97,13 @@ The following table describes the tools and source code required for setting up

Internet

+

Other tools

+ +

Provide functions required in compilation and building, such as packaging and creating images.

+ +

Internet

+ + @@ -244,7 +255,7 @@ You need to acquire [source code](../get-code/source-code-acquisition.md), down 2. [Download LLVM](https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz). >![](public_sys-resources/icon-note.gif) **NOTE:** - >For OpenHarmony\_1.x branch/tag, click [here](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar) to download LLVM. + >For the OpenHarmony\_v1.x branches and tags, click [here](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar) to download LLVM. 3. Decompress the LLVM installation package to **\~/llvm**. @@ -253,7 +264,7 @@ You need to acquire [source code](../get-code/source-code-acquisition.md), down ``` >![](public_sys-resources/icon-note.gif) **NOTE:** - >For OpenHarmony\_1.x branch/tag, run the following command to decompress the LLVM installation package: + >For the OpenHarmony\_v1.x branches and tags, run the following command to decompress the LLVM installation package: >``` >tar -xvf llvm-linux-9.0.0-36191.tar -C ~/ >``` @@ -337,3 +348,14 @@ python3 -m pip uninstall ohos-build >![](public_sys-resources/icon-notice.gif) **NOTICE:** >If you encounter any problem during the installation, resort to the [FAQ](faq.md). +## Installing Other Tools + +### Installation Procedure + +1. Use **apt-get** to install dependent tools. + + ``` + 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 + ``` + + diff --git a/en/device-dev/quick-start/windows-development-environment-10.md b/en/device-dev/quick-start/windows-development-environment-10.md deleted file mode 100644 index 91c42c4f088d5f467479bb40cd1819e67277cfe4..0000000000000000000000000000000000000000 --- a/en/device-dev/quick-start/windows-development-environment-10.md +++ /dev/null @@ -1,183 +0,0 @@ -# Windows Development Environment - -- [Obtaining the Software](#en-us_topic_0000001058091994_section1483143015558) -- [Installing Visual Studio Code](#en-us_topic_0000001058091994_section71401018163318) -- [Installing Python](#en-us_topic_0000001058091994_section16266553175320) -- [Installing Node.js](#en-us_topic_0000001058091994_section5353233124511) -- [Installing hpm](#en-us_topic_0000001058091994_section173054793610) -- [Installing the DevEco Device Tool Plug-in](#en-us_topic_0000001058091994_section4336315185716) - -Operating system: 64-bit version of Windows 10. - -DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedure includes five parts: - -1. Installing Visual Studio Code -2. Installing Python -3. Installing Node.js -4. Installing hpm -5. Installing the DevEco Device Tool Plug-in - -## Obtaining the Software - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Tool

-

Description

-

Version

-

Obtaining Channel

-

Visual Studio Code

-

Code editing tool

-

V1.53 or later (64-bit)

-

https://code.visualstudio.com/Download

-

Python

-

Programming tool

-

v3.7.4–3.8.x (64-bit)

-

https://www.python.org/downloads/

-

Node.js

-

The npm environment provider

-

v12.0.0 or later (64-bit)

-

https://nodejs.org/en/download/

-

hpm

-

Package manager

-

Latest version

-

Run the following command:

-
npm install -g @ohos/hpm-cli
-

DevEco Device Tool

-

Plug-in for the OpenHarmony source code compilation, programming, and debugging

-

v2.2 Beta1

-

https://device.harmonyos.com/en/ide#download

-

Log in with your HUAWEI ID to download it. You can register an account here.

-
- -## Installing Visual Studio Code - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->If you have installed Visual Studio Code, open the CLT and run **code --version** to check whether the version is 1.53 or later. If the version number is returned, it indicates that the environment variables are set correctly. - -1. Double-click the Visual Studio Code package to install it. During the installation, select **Add to PATH \(requires shell restart\)**. - - ![](figures/en-us_image_0000001057335403.png) - -2. After the installation is complete, restart the computer for the environment variables of Visual Studio Code to take effect. -3. Open the CLT and run **code --version**. If the version number can be displayed, it indicates that the installation is successful. - -## Installing Python - -1. Double-click the Python software package, select **Add Python xx to PATH**, and click **Install Now**. - - ![](figures/en-us_image_0000001096154076.png) - -2. After the installation is complete, click **Close**. - - ![](figures/en-us_image_0000001142794291.png) - -3. Open the CLT, and run **python --version** to check the installation result. - - ![](figures/en-us_image_0000001143154485.png) - -4. In the CLT, run the following commands to set the pip source for downloading the dependencies required for later installation: - - ``` - pip config set global.trusted-host repo.huaweicloud.com - pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple - pip config set global.timeout 120 - ``` - - -## Installing Node.js - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->If you have installed Node.js, open the CLT and run **node -v** to check whether the version is 12.0.0 or later. - -1. Run the downloaded software package to install. Use the default settings when following the installation wizard, 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**. -2. Open the CLT and run **node -v**. If the version number of Node.js is displayed, it indicates that Node.js has been successfully installed. - - ![](figures/en-us_image_0000001056814287.png) - - -## Installing hpm - -Before installing hpm, ensure that Node.js has been installed - -and that your network can access the Internet. If your network requires a proxy to access the Internet, [set up the npm proxy](https://device.harmonyos.com/cn/docs/ide/user-guides/npm_proxy-0000001054491032) first. - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->If hpm has been installed, run **npm update -g @ohos/hpm-cli** to update it to the latest version. - -1. You are advised to set the npm source to an image in China, for example, a HUAWEI CLOUD image source. - - ``` - npm config set registry https://repo.huaweicloud.com/repository/npm/ - ``` - -2. Open the CLT and run the following command to install the latest version of hpm: - - ``` - npm install -g @ohos/hpm-cli - ``` - - ![](figures/en-us_image_0000001073840162.png) - -3. After the installation is complete, run the following command to obtain the installation result: - - ``` - hpm -V - ``` - - ![](figures/en-us_image_0000001100641602.png) - - -## Installing the DevEco Device Tool Plug-in - -To install the DevEco Device Tool plug-in, ensure that the **user name of the host cannot contain Chinese characters**; otherwise, the plug-in may fail to run. - -DevEco Device Tool will automatically download and install the C/C++ and CodeLLDB plug-ins from the Visual Studio Code Marketplace during the installation process. Therefore, make sure Visual Studio Code can access the Internet. If your network requires a proxy to access the Internet, [set up the Visual Studio Code proxy](https://device.harmonyos.com/cn/docs/ide/user-guides/vscode_proxy-0000001074231144) first. - ->![](public_sys-resources/icon-note.gif) **NOTE:** ->Before installing DevEco Device Tool, ensure that Visual Studio Code is closed. - -1. Decompress the DevEco Device Tool plug-in package and double-click the installer to install. -2. During the installation, the dependency files \(such as C/C++ and CodeLLDB plug-ins\) and execution programs required by DevEco Device Tool are automatically installed. - - ![](figures/en-us_image_0000001072468991.png) - -3. After the installation is complete, the CLT is automatically closed. -4. Open Visual Studio Code, click the ![](figures/en-us_image_0000001072757874.png) button on the left, and check whether C/C++, CodeLLDB, and DevEco Device Tool are listed in **INSTALLED**. - - >![](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/en-us_image_0000001142802505.png) - - diff --git a/en/device-dev/quick-start/windows-development-environment.md b/en/device-dev/quick-start/windows-development-environment.md index 9480f387cd1291caf27824c9edacdadc3f78587d..d0824ce00ea9573806c2a4c75f1df00a2de9aa0e 100644 --- a/en/device-dev/quick-start/windows-development-environment.md +++ b/en/device-dev/quick-start/windows-development-environment.md @@ -1,4 +1,4 @@ -# Windows Development Environment +# Windows Development Environment - [Obtaining the Software](#en-us_topic_0000001058091994_section1483143015558) - [Installing Visual Studio Code](#en-us_topic_0000001058091994_section71401018163318) @@ -87,7 +87,7 @@ DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedu 1. Double-click the Visual Studio Code package to install it. During the installation, select **Add to PATH \(requires shell restart\)**. - ![](figures/en-us_image_0000001057335403.png) + ![](figures/en-us_image_0000001174350653.png) 2. After the installation is complete, restart the computer for the environment variables of Visual Studio Code to take effect. 3. Open the CLT and run **code --version**. If the version number can be displayed, it indicates that the installation is successful. @@ -96,15 +96,15 @@ DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedu 1. Double-click the Python software package, select **Add Python xx to PATH**, and click **Install Now**. - ![](figures/en-us_image_0000001096154076.png) + ![](figures/en-us_image_0000001128471042.png) 2. After the installation is complete, click **Close**. - ![](figures/en-us_image_0000001142794291.png) + ![](figures/en-us_image_0000001128311104.png) 3. Open the CLT, and run **python --version** to check the installation result. - ![](figures/en-us_image_0000001143154485.png) + ![](figures/en-us_image_0000001174350781.png) 4. In the CLT, run the following commands to set the pip source for downloading the dependencies required for later installation: @@ -123,7 +123,7 @@ DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedu 1. Run the downloaded software package to install. Use the default settings when following the installation wizard, 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**. 2. Open the CLT and run **node -v**. If the version number of Node.js is displayed, it indicates that Node.js has been successfully installed. - ![](figures/en-us_image_0000001056814287.png) + ![](figures/en-us_image_0000001128311096.png) ## Installing hpm @@ -147,7 +147,7 @@ and that your network can access the Internet. If your network requires a proxy npm install -g @ohos/hpm-cli ``` - ![](figures/en-us_image_0000001073840162.png) + ![](figures/en-us_image_0000001128311100.png) 3. After the installation is complete, run the following command to obtain the installation result: @@ -155,7 +155,7 @@ and that your network can access the Internet. If your network requires a proxy hpm -V ``` - ![](figures/en-us_image_0000001100641602.png) + ![](figures/en-us_image_0000001174270735.png) ## Installing the DevEco Device Tool Plug-in @@ -170,14 +170,14 @@ DevEco Device Tool will automatically download and install the C/C++ and CodeLLD 1. Decompress the DevEco Device Tool plug-in package and double-click the installer to install. 2. During the installation, the dependency files \(such as C/C++ and CodeLLDB plug-ins\) and execution programs required by DevEco Device Tool are automatically installed. - ![](figures/en-us_image_0000001072468991.png) + ![](figures/en-us_image_0000001128470902.png) 3. After the installation is complete, the CLT is automatically closed. -4. Open Visual Studio Code, click the ![](figures/en-us_image_0000001072757874.png) button on the left, and check whether C/C++, CodeLLDB, and DevEco Device Tool are listed in **INSTALLED**. +4. Open Visual Studio Code, click the ![](figures/en-us_image_0000001174350651.png) button on the left, and check whether C/C++, CodeLLDB, and DevEco Device Tool are listed in **INSTALLED**. >![](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/en-us_image_0000001142802505.png) + ![](figures/en-us_image_0000001174270727.png) diff --git a/en/device-dev/quick-start/wlan-connection.md b/en/device-dev/quick-start/wlan-connection.md index cc0192a6873b1b66a3224c224b63dab3aabb06ef..6869012b733851e1555efbf1cce23ea5c51f7317 100644 --- a/en/device-dev/quick-start/wlan-connection.md +++ b/en/device-dev/quick-start/wlan-connection.md @@ -1,4 +1,4 @@ -# WLAN Connection +# WLAN Connection - [Building](#section191121332125319) - [Burning Images](#section19458165166) @@ -10,7 +10,7 @@ This example shows how to connect the WLAN module to the gateway using attention 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/tool-acquisition.md). If the Linux environment is installed using a software package, perform the following steps: +If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/docker-environment.md). 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**. @@ -63,39 +63,39 @@ If the Linux environment is installed using Docker, perform the building by refe You can use the DevEco tool to perform the image burning of the Hi3861 WLAN module. For details about how to use the tool, see [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). -1. Connect the PC and the target development board through the USB port. For details, please refer to [Introduction to the Hi3861 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_wifi_start_des-0000001050168548). +1. Connect the PC and the target development board through the USB port. For details, please refer to [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 Boards](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3861-drivers-0000001058153433). + >If the serial port number is not displayed correctly, follow the steps described in [Installing the Serial Port Driver on the Hi3861 Series Development Boards](https://device.harmonyos.com/en/docs/ide/user-guides/hi3861-drivers-0000001058153433). - ![](figures/en-us_image_0000001073388838.png) + ![](figures/en-us_image_0000001128311118.png) 3. Open DevEco Device Tool and go to **Projects** \> **Settings**. - ![](figures/en-us_image_0000001078404538.png) + ![](figures/en-us_image_0000001128311116.png) 4. On the **Partition Configuration** tab page, modify the settings. In general cases, you can leave the fields at their default settings. 5. On the **hi3861** tab page, set the programming options. - - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001056563976_li848662117291). - - **upload\_protocol**: Select the programming protocol **burn-serial**. - - **upload\_partitions**: Select the file to be programmed. **hi3861\_app** is selected by default. + - **upload\_port**: Select the serial port number obtained in [2](#en-us_topic_0000001056563976_li848662117291). + - **upload\_protocol**: Select the burning protocol **burn-serial**. + - **upload\_partitions**: Select the file to be burned. **hi3861\_app** is selected by default. - ![](figures/en-us_image_0000001078244328.png) + ![](figures/en-us_image_0000001128470922.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 programming. - ![](figures/en-us_image_0000001163569275.png) + ![](figures/en-us_image_0000001174270749.png) 8. When the following information is displayed, press the RST button on the development board to restart it. - ![](figures/en-us_image_0000001074285712.png) + ![](figures/en-us_image_0000001174270751.png) -9. Start programming. When the following message is displayed, it indicates that the programming is successful. +9. Start burning. When the following message is displayed, the burning is successful. - ![](figures/en-us_image_0000001074445364.png) + ![](figures/en-us_image_0000001174350669.png) ## Connecting WLAN Module to the Internet. diff --git a/en/device-dev/subsystems/Readme-EN.md b/en/device-dev/subsystems/Readme-EN.md index 9c21a040f361f15efc66c5fb965c8fff8de6532b..4af4610ea81173dbfb4ee9b937151a95834b5575 100644 --- a/en/device-dev/subsystems/Readme-EN.md +++ b/en/device-dev/subsystems/Readme-EN.md @@ -70,7 +70,6 @@ - [Development Guidelines on Application Signature Verification](development-guidelines-on-application-signature-verification.md) - [Development Guidelines on Application Permission Management](development-guidelines-on-application-permission-management.md) - [Development Guidelines on IPC Authentication](development-guidelines-on-ipc-authentication.md) - - [Development Guidelines on Trusted Device Group Management](development-guidelines-on-trusted-device-group-management.md) - [Startup](startup.md) - [Startup](startup-10.md) diff --git "a/zh-cn/device-dev/get-code/Docker\347\274\226\350\257\221\347\216\257\345\242\203.md" "b/zh-cn/device-dev/get-code/Docker\347\274\226\350\257\221\347\216\257\345\242\203.md" new file mode 100644 index 0000000000000000000000000000000000000000..c15f1861f152e8616fc86c629472fdef6a0df991 --- /dev/null +++ "b/zh-cn/device-dev/get-code/Docker\347\274\226\350\257\221\347\216\257\345\242\203.md" @@ -0,0 +1,313 @@ +# Docker编译环境 + +- [Docker环境介绍](#section107932281315) +- [环境准备](#section7337134183512) +- [独立Docker环境](#section2858536103611) + - [搭建Docker环境-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)](#section319412277287) + - [编译源码-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)](#section631485163615) + - [搭建Docker环境-标准系统类设备(参考内存≥128MB)](#section13585262391) + - [编译源码-标准系统类设备(参考内存≥128MB)](#section193711513406) + +- [基于HPM的Docker环境](#section485713518337) + - [搭建Docker环境](#section3295842510) + - [获取及编译源码](#section69141039143518) + + +## Docker环境介绍 + +OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完成复杂的开发环境准备工作。两种Docker环境及适用场景如下: + +- 独立Docker环境:适用于直接基于Ubuntu、Windows操作系统平台进行版本编译的场景。 +- 基于HPM的Docker环境:适用于使用HPM工具进行发行版编译的场景。 + +**表 1** Docker镜像介绍 + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Docker环境

+

系统类型

+

运行平台

+

Docker镜像仓库

+

标签

+

独立 Docker环境

+

轻量和小型系统

+

Ubuntu/Windows

+

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

+

0.0.5

+

标准系统

+

Ubuntu

+

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard

+

0.0.1

+

HPM Docker环境

+

轻量和小型系统

+

Ubuntu/Windows

+

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

+

0.0.3

+
+ +## 环境准备 + +在使用docker环境前需要先完成以下操作: + +1. 安装Docker,Docker安装请参考[官方指导](https://docs.docker.com/engine/install/)。 +2. 获取OpenHarmony源码,请参考[获取源码](源码获取.md)。 + + >![](public_sys-resources/icon-note.gif) **说明:** + >HPM Docker环境无需单独获取源码。 + + +## 独立Docker环境 + +OpenHarmony的Docker镜像托管在[HuaweiCloud SWR](https://console.huaweicloud.com/swr/?region=cn-south-1#/app/warehouse/warehouseMangeDetail/goldensir/openharmony-docker/openharmony-docker?type=ownImage)上。开发者可以通过该镜像在很大程度上简化编译前的环境配置。下文将介绍具体使用步骤。 + +### 搭建Docker环境-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB) + +**方式一:从HuaweiCloud SWR上直接获取Docker镜像进行构建:** + +1. 获取Docker镜像。 + + ``` + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + +2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 + + ubuntu下执行: + + ``` + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + windows下执行(假设源码目录为D:\\OpenHarmony): + + ``` + docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + +**方式二:通过Dockerfile 构建本地Docker镜像进行构建** + +1. 获取Dockerfile脚本文件,用来构建本地Docker镜像。 + + ``` + git clone https://gitee.com/openharmony/docs.git + ``` + +2. 进入Dockerfile代码目录路径执行Docker镜像构建命令。 + + ``` + cd docs/docker + ./build.sh + ``` + +3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 + + ubuntu下执行: + + ``` + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + windows下执行(假设源码目录为D:\\OpenHarmony): + + ``` + docker run -it -v D:\OpenHarmony:/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 + ``` + + +### 编译源码-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB) + +通过如下编译脚本启动轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)的编译。下文以Hi3516平台为例说明具体编译步骤。 + +设置编译路径,选择当前路径。 + +``` +hb set + . +``` + +**图 1** 设置编译界面 + + +![](figures/zh-cn_image_0000001101413884.png) + +>![](public_sys-resources/icon-note.gif) **说明:** +>当前开发板平台和编译界面的对应关系如下: +>- Hi3861:wifiiot\_hispark\_pegasus@hisilicon +>- Hi3516:ipcamera\_hispark\_taurus@hisilicon +>- Hi3518:ipcamera\_hispark\_aries@hisilicon + +1. 选择ipcamera\_hispark\_taurus@hisilicon并回车。 +2. 执行编译。 + + ``` + hb build -f + ``` + +3. 查看编译结果。 + + 编译结果文件生成在out/hispark\_taurus/ipcamera\_hispark\_taurus目录下。 + + +### 搭建Docker环境-标准系统类设备(参考内存≥128MB) + +**方式一:从HuaweiCloud SWR上直接获取Docker镜像进行构建:** + +1. 获取Docker镜像。 + + ``` + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 + ``` + +2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 + + ``` + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 + ``` + + +**方式二:通过Dockerfile 构建本地Docker镜像进行构建** + +1. 获取Dockerfile脚本文件,用来构建本地Docker镜像。 + + ``` + git clone https://gitee.com/openharmony/docs.git + ``` + +2. 进入Dockerfile代码目录路径执行Docker镜像构建命令。 + + ``` + cd docs/docker/standard + ./build.sh + ``` + +3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 + + ``` + docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.1 + ``` + + +### 编译源码-标准系统类设备(参考内存≥128MB) + +1. 在源码的根目录执行预处理脚本。 + + ``` + ../scripts/prepare.sh + ``` + +2. 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。 + + ``` + ./build.sh --product-name {product_name} + ``` + + \{product\_name\}为当前版本支持的平台。比如:Hi3516DV300等。 + + 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 + + +>![](public_sys-resources/icon-note.gif) **说明:** +>退出Docker执行exit命令即可。 + +## 基于HPM的Docker环境 + +docker\_dist是一个[HPM](https://hpm.harmonyos.com/)系统中的模板组件,能够帮助用户快速初始化HPM工程,利用docker镜像来快速编译OpenHarmony发行版,在很大程度上简化了编译前的环境配置。开发者在配置好Ubuntu和[hpm-cli](https://device.harmonyos.com/cn/docs/develop/bundles/oem_bundle_guide_prepare-0000001050129846)开发环境后,可以通过以下步骤来使用我们提供的Docker环境。 + +### 搭建Docker环境 + +1. 初始化安装模板。在任意工作目录中执行以下命令。 + + ``` + hpm init -t @ohos/docker_dist + ``` + +2. 修改publishAs。 + + 因为获取到的是模板类型的包,要把包的类型改为需要的类型。 在当前目录下打开bundle.json文件,把"publishAs"字段的值由"template"改为"distribution"。 + + +### 获取及编译源码 + +执行编译。自动安装docker只能在Ubuntu环境下执行,如果其他环境,需要用户自行安装docker,然后拉取镜像,执行编译。 + +- **自动安装docker(Ubuntu环境)** + + 以下命令可以帮助用户自动安装docker, 拉取镜像,并且在容器中开始运行对应解决方案的拉取和编译。 + + **方式一:** + + 命令后接参数指定解决方案,格式如下: + + ``` + hpm run docker solution={product} + ``` + + \{product\}为需编译的解决方案,如:@ohos/hispark\_taurus、@ohos/hispark\_aries、@ohos/hispark\_pegasus。 + + **方式二:** + + 设置环境变量来选择解决方案,再执行编译命令。 + + 1. 选择解决方案。 + + ``` + export solution={product} + ``` + + \{product\}为需编译的解决方案,如:@ohos/hispark\_taurus、@ohos/hispark\_aries、@ohos/hispark\_pegasus。 + + 2. 获取源码及执行编译。 + + ``` + hpm run docker + ``` + + + 以上两种方式以@ohos/hispark\_taurus为例,执行成功结果如下: + + ``` + ...... + ohos ipcamera_hispark_taurus build success! + @ohos/hispark_taurus: distribution building completed. + ``` + + +- **自行安装docker(非Ubuntu环境)** + + 自行安装docker相关操作如下: + + ``` + # 拉取镜像 + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.3# linux环境下的编译 + hpm run distWithDocker solution={product} + # windows下的编译,需要配置gitbash + hpm config set shellPath "gitbash路径" + hpm run distWithDocker solution={product} + ``` + + diff --git a/zh-cn/device-dev/get-code/IDE.md b/zh-cn/device-dev/get-code/IDE.md new file mode 100644 index 0000000000000000000000000000000000000000..144b67418be2f44e4a5854bdb799be24b4142b7a --- /dev/null +++ b/zh-cn/device-dev/get-code/IDE.md @@ -0,0 +1,17 @@ +# IDE + +- [获取设备开发工具(HUAWEI DevEco Device Tool)](#section2452141120244) +- [获取应用开发工具(HUAWEI DevEco Studio)](#section0904101019258) + +## 获取设备开发工具(HUAWEI DevEco Device Tool) + +HUAWEI DevEco Device Tool是OpenHarmony面向智能设备开发者提供的一站式集成开发环境,支持OpenHarmony的组件按需定制,支持代码编辑、编译、烧录、调试等功能,支持C/C++语言,以插件的形式部署在Visual Studio Code上。具体可参见[获取工具](https://device.harmonyos.com/cn/ide)和[工具使用指南](https://device.harmonyos.com/cn/docs/ide/user-guides/service_introduction-0000001050166905)**。** + +Huawei DevEco Device Tool支持 OpenHarmony设备开发的演进路标如下: + +![](figures/3.png) + +## 获取应用开发工具(HUAWEI DevEco Studio) + +HUAWEI DevEco Studio(以下简称DevEco Studio)是面向华为终端全场景多设备的一站式集成开发环境(IDE),为开发者提供工程模板创建、开发、编译、调试、发布等E2E的OpenHarmony应用开发服务。通过使用DevEco Studio,开发者可以更高效的开发具备OpenHarmony分布式能力的应用,进而提升创新效率。具体可参见[获取工具](https://developer.harmonyos.com/cn/develop/deveco-studio)和[工具使用指南](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/tools_overview-0000001053582387)。 + diff --git a/zh-cn/device-dev/get-code/Readme-CN.md b/zh-cn/device-dev/get-code/Readme-CN.md index c2c5315d396f419a71b74bc8d1747c7400eb820d..a2dbbc91bbebb45f6609d07ca87191ed509e3ab4 100755 --- a/zh-cn/device-dev/get-code/Readme-CN.md +++ b/zh-cn/device-dev/get-code/Readme-CN.md @@ -2,4 +2,6 @@ - [源码获取](源码获取.md) - [获取工具](获取工具.md) + - [Docker编译环境](Docker编译环境.md) + - [IDE](IDE.md) diff --git "a/zh-cn/device-dev/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" "b/zh-cn/device-dev/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" index 09e7507b50d1ef3666ac4f474475b9361e232259..3b2c0526b4ee8ef6ef2e967f4b5d8a011011906c 100755 --- "a/zh-cn/device-dev/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" +++ "b/zh-cn/device-dev/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" @@ -62,7 +62,7 @@ OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及 4. 安装码云repo工具,可以执行如下命令。 ``` - curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #如果没有权限,可下载至其他目录,并将其配置到环境变量中 + curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #如果没有权限,可下载至其他目录,并将其配置到环境变量中 chmod a+x /usr/local/bin/repo pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests ``` diff --git "a/zh-cn/device-dev/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" "b/zh-cn/device-dev/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" index 13556b48039b7b1149c2be8113f886d20729fb04..eeb55c7156473c57f088d2bce54464b13fd8ca92 100755 --- "a/zh-cn/device-dev/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" +++ "b/zh-cn/device-dev/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" @@ -1,283 +1,7 @@ -# 获取工具 +# 获取工具 -- [Docker环境获取方式](#section107932281315) -- [基于HPM的Docker环境](#section485713518337) - - [搭建Docker环境](#section18957202218355) - - [编译源码](#section69141039143518) +- **[Docker编译环境](Docker编译环境.md)** -- [独立Docker环境](#section2858536103611) - - [搭建Docker环境-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)](#section319412277287) - - [编译源码-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)](#section631485163615) - - [搭建Docker环境-标准系统类设备(参考内存≥128MB)](#section13585262391) - - [编译源码-标准系统类设备(参考内存≥128MB)](#section193711513406) +- **[IDE](IDE.md)** -- [获取设备开发工具(HUAWEI DevEco Device Tool)](#section2452141120244) -- [获取应用开发工具(HUAWEI DevEco Studio)](#section0904101019258) - -## Docker环境获取方式 - -OpenHarmony为开发者提供了两种Docker环境,以帮助开发者快速完成复杂的开发环境准备工作。两种Docker环境及适用场景如下: - -- 基于HPM的Docker环境:适用于使用HPM工具进行发行版编译的场景。 -- 独立Docker环境:适用于直接基于Ubuntu、Windows操作系统平台进行版本编译的场景。 - - 独立Docker环境目前容器化构建选项支持情况如下: - - **表 1** Docker镜像介绍 - - - - - - - - - - - - - - - - -

Docker镜像仓库

-

标签

-

说明

-

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker

-

0.0.5

-

已经预安装OpenHarmony版本的编译环境,支持轻量系统类设备(参考内存≥128KB)小型系统类设备(参考内存≥1MB)的版本构建。

-

swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard

-

0.0.1

-

已经预安装OpenHarmony版本的编译环境,支持标准系统类设备(参考内存≥128MB)的版本构建。

-
- - >![](public_sys-resources/icon-note.gif) **说明:** - >Docker安装请参考[官方指导](https://docs.docker.com/engine/install/ubuntu/)。 - - -## 基于HPM的Docker环境 - -docker\_dist是一个[HPM](https://hpm.harmonyos.com/)系统中的模板组件,能够帮助用户快速初始化HPM工程,利用docker镜像来快速编译OpenHarmony发行版,在很大程度上简化了编译前的环境配置。开发者在配置好Ubuntu和[hpm-cli](https://device.harmonyos.com/cn/docs/develop/bundles/oem_bundle_guide_prepare-0000001050129846)开发环境后,可以通过以下步骤来使用我们提供的Docker环境。 - -### 搭建Docker环境 - -1. 初始化安装模板。在任意工作目录中执行以下命令。 - - ``` - hpm init -t @ohos/docker_dist - ``` - -2. 修改publishAs。 - - 因为获取到的是模板类型的包,要把包的类型改为需要的类型。 在当前目录下打开bundle.json文件,把"publishAs"字段的值由"template"改为"distribution"。 - - -### 编译源码 - -执行编译。自动安装docker只能在Ubuntu环境下执行,如果其他环境,需要用户自行安装docker,然后拉取镜像,执行编译。 - -- **自动安装docker(Ubuntu环境)** - - 以下命令可以帮助用户自动安装docker, 拉取镜像,并且在容器中开始运行对应解决方案的拉取和编译。 - - 方式一: - - 命令后接参数指定解决方案,格式如下: - - ``` - hpm run docker solution={product} - ``` - - \{product\}为需编译的解决方案如:@ohos/hispark\_taurus、@ohos/hispark\_aries、@ohos/hispark\_pegasus - - 方式二: - - 设置环境变量来选择解决方案,再执行编译命令 - - 1、选择解决方案 - - ``` - export solution={product} - ``` - - \{product\}为需编译的解决方案如:@ohos/hispark\_taurus、@ohos/hispark\_aries、@ohos/hispark\_pegasus - - 2、执行编译 - - ``` - hpm run docker - ``` - - 以上两种方式以@ohos/hispark\_taurus为例,执行成功结果如下: - - ``` - ...... - ohos ipcamera_hispark_taurus build success! - @ohos/hispark_taurus: distribution building completed. - ``` - - -- **自行安装docker(非Ubuntu环境)** - - 自行安装docker相关操作如下: - - ``` - # 拉取镜像 - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.3# linux环境下的编译 - hpm run distWithDocker solution={product} - # windows下的编译,需要配置gitbash - hpm config set shellPath "gitbash路径" - hpm run distWithDocker solution={product} - ``` - - -## 独立Docker环境 - -OpenHarmony的Docker镜像托管在[HuaweiCloud SWR](https://console.huaweicloud.com/swr/?region=cn-south-1#/app/warehouse/warehouseMangeDetail/goldensir/openharmony-docker/openharmony-docker?type=ownImage)上。开发者可以通过该镜像在很大程度上简化编译前的环境配置。开发者在配置好开发环境后,通过以下步骤来使用Docker环境。本Docker支持Ubuntu/Windows平台,下文将以Ubuntu系统为例进行使用介绍。 - -### 搭建Docker环境-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB) - -**方式一:从HuaweiCloud SWR上直接获取Docker镜像进行构建:** - -1. 获取Docker镜像。 - - ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 - ``` - -2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 - - ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker:0.0.5 - ``` - - -**方式二:通过Dockerfile 构建本地Docker镜像进行构建** - -1. 获取Dockerfile脚本文件,用来构建本地Docker镜像。 - - ``` - git clone https://gitee.com/openharmony/docs.git - ``` - -2. 进入Dockerfile代码目录路径执行Docker镜像构建命令。 - - ``` - cd docs/docker - ./build.sh - ``` - -3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 - - ``` - docker run -it -v $(pwd):/home/openharmony openharmony-docker:0.0.5 - ``` - - -### 编译源码-轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB) - -通过如下编译脚本启动轻量系统类设备(参考内存≥128KB)和小型系统类设备(参考内存≥1MB)的编译。下文以Hi3516平台为例说明具体编译步骤。 - -设置编译路径,选择当前路径。 - -``` -hb set - . -``` - -**图 1** 设置编译界面 - - -![](figures/zh-cn_image_0000001101413884.png) - ->![](public_sys-resources/icon-note.gif) **说明:** ->当前开发板平台和编译界面的对应关系如下: ->- Hi3861:wifiiot\_hispark\_pegasus@hisilicon ->- Hi3516:ipcamera\_hispark\_taurus@hisilicon ->- Hi3518:ipcamera\_hispark\_aries@hisilicon - -1. 选择ipcamera\_hispark\_taurus@hisilicon并回车。 -2. 执行编译。 - - ``` - hb build -f - ``` - -3. 查看编译结果。 - - 编译结果文件生成在out/hispark\_taurus/ipcamera\_hispark\_taurus目录下。 - - -### 搭建Docker环境-标准系统类设备(参考内存≥128MB) - -**方式一:从HuaweiCloud SWR上直接获取Docker镜像进行构建:** - -1. 获取Docker镜像。 - - ``` - docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 - ``` - -2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 - - ``` - docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 - ``` - - -**方式二:通过Dockerfile 构建本地Docker镜像进行构建** - -1. 获取Dockerfile脚本文件,用来构建本地Docker镜像。 - - ``` - git clone https://gitee.com/openharmony/docs.git - ``` - -2. 进入Dockerfile代码目录路径执行Docker镜像构建命令。 - - ``` - cd docs/docker/standard - ./build.sh - ``` - -3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 - - ``` - docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.1 - ``` - - -### 编译源码-标准系统类设备(参考内存≥128MB) - -1. 在源码的根目录执行预处理脚本。 - - ``` - ../scripts/prepare.sh - ``` - -2. 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。 - - ``` - ./build.sh --product-name {product_name} - ``` - - \{product\_name\}为当前版本支持的平台。比如:Hi3516DV300等。 - - 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 - - ->![](public_sys-resources/icon-note.gif) **说明:** ->退出Docker执行exit命令即可。 - -## 获取设备开发工具(HUAWEI DevEco Device Tool) - -HUAWEI DevEco Device Tool是OpenHarmony面向智能设备开发者提供的一站式集成开发环境,支持OpenHarmony的组件按需定制,支持代码编辑、编译、烧录、调试等功能,支持C/C++语言,以插件的形式部署在Visual Studio Code上。具体可参见[获取工具](https://device.harmonyos.com/cn/ide)和[工具使用指南](https://device.harmonyos.com/cn/docs/ide/user-guides/service_introduction-0000001050166905)**。** - -Huawei DevEco Device Tool支持 OpenHarmony设备开发的演进路标如下: - -![](figures/3.png) - -## 获取应用开发工具(HUAWEI DevEco Studio) - -HUAWEI DevEco Studio(以下简称DevEco Studio)是面向华为终端全场景多设备的一站式集成开发环境(IDE),为开发者提供工程模板创建、开发、编译、调试、发布等E2E的OpenHarmony应用开发服务。通过使用DevEco Studio,开发者可以更高效的开发具备OpenHarmony分布式能力的应用,进而提升创新效率。具体可参见[获取工具](https://developer.harmonyos.com/cn/develop/deveco-studio)和[工具使用指南](https://developer.harmonyos.com/cn/docs/documentation/doc-guides/tools_overview-0000001053582387)。 diff --git "a/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277.md" "b/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277.md" index 28c01f99cccb6b99b4d9673b691af7d1da0bc0b5..1a6f14d262b1474576a3974dff7c57b205f48aaf 100755 --- "a/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277.md" +++ "b/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277.md" @@ -1,4 +1,4 @@ -# Hi3516开发板 +# Hi3516开发板 - **[安装开发板环境](安装开发板环境-2.md)** diff --git "a/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" "b/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" index 3c6ebbc875e4460fe0fb51105aae2fcd5571928a..3e24c43eb01be574c4a48c1d9a6e10d82beeca4e 100755 --- "a/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" +++ "b/zh-cn/device-dev/quick-start/Hi3516\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" @@ -1,4 +1,4 @@ -# Hi3516开发板介绍 +# Hi3516开发板介绍 - [简介](#section26131214194212) - [开发板规格](#section15192203316533) diff --git "a/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277.md" "b/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277.md" index c7a3daa41bb69758c22f0820179b0bccbc0eeef3..61807ea64d579d2364ff6c327864f20d8d6aaa6a 100755 --- "a/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277.md" +++ "b/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277.md" @@ -1,4 +1,4 @@ -# Hi3518开发板 +# Hi3518开发板 - **[安装开发板环境](安装开发板环境-4.md)** diff --git "a/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" "b/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" index d072777d4e1d56f4f8c3060e0edcb587f536917d..1f77aeac075607531fb98955ef218dfd00e3c6ae 100755 --- "a/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" +++ "b/zh-cn/device-dev/quick-start/Hi3518\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" @@ -1,4 +1,4 @@ -# Hi3518开发板介绍 +# Hi3518开发板介绍 - [简介](#section14815247616) - [开发板规格](#section765112478446) diff --git "a/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277.md" "b/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277.md" index 5fa74713ecf8339f75070e2e112e47c7ae0d8d02..f6c5f5833f16ede72614678ebc0483389d9120f8 100755 --- "a/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277.md" +++ "b/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277.md" @@ -1,4 +1,4 @@ -# Hi3861开发板 +# Hi3861开发板 - **[安装开发板环境](安装开发板环境.md)** diff --git "a/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" "b/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" index 8eb13ecf8baf6e8918989e2755517997bc81f4bb..ac6a21df22f9865ab77ad461ab1805404c595d0b 100755 --- "a/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" +++ "b/zh-cn/device-dev/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\344\273\213\347\273\215.md" @@ -1,4 +1,4 @@ -# Hi3861开发板介绍 +# Hi3861开发板介绍 - [简介](#section19352114194115) - [资源和约束](#section82610215014) @@ -19,7 +19,7 @@ Hi3861 WLAN模组是一片大约2cm\*5cm大小的开发板,是一款高度集 **图 2** Hi3861底板外观图 -![](figures/zh-cn_image_0000001119945810.png) +![](figures/zh-cn_image_0000001174350615.png) - RF电路包括功率放大器PA(Power Amplifier)、低噪声放大器LNA(Low Noise Amplifier)、RF Balun、天线开关以及电源管理等模块;支持20MHz标准带宽和5MHz/10MHz窄带宽,提供最大72.2Mbit/s物理层速率。 - Hi3861 WLAN基带支持正交频分复用(OFDM)技术,并向下兼容直接序列扩频(DSSS)和补码键控(CCK)技术,支持IEEE 802.11 b/g/n协议的各种数据速率。 @@ -29,7 +29,7 @@ Hi3861 WLAN模组是一片大约2cm\*5cm大小的开发板,是一款高度集 **图 3** Hi3861功能框图 - ![](figures/zh-cn_image_0000001105524466.png) + ![](figures/zh-cn_image_0000001128311066.png) ## 资源和约束 diff --git a/zh-cn/device-dev/quick-start/Readme-CN.md b/zh-cn/device-dev/quick-start/Readme-CN.md index 90dd84f1a6ac1b95caa0a28881d016960f73828c..69991d66becb3cfef2d8980b923dc38cdd43f790 100644 --- a/zh-cn/device-dev/quick-start/Readme-CN.md +++ b/zh-cn/device-dev/quick-start/Readme-CN.md @@ -1,6 +1,5 @@ # 快速入门 -- [导读](导读.md) - [轻量和小型系统入门](轻量和小型系统入门.md) - [概述](概述.md) - [了解开发板](了解开发板.md) @@ -33,12 +32,10 @@ - [常见问题](常见问题-6.md) - [标准系统入门](标准系统入门.md) - - [概述](概述-7.md) - - [环境搭建](环境搭建.md) - - [概述](概述-8.md) - - [Windows开发环境准备](Windows开发环境准备-9.md) - - [Ubuntu编译环境准备](Ubuntu编译环境准备-10.md) - - [常见问题](常见问题-11.md) - - - [开发步骤](开发步骤-12.md) + - [入门介绍](入门介绍.md) + - [Windows开发环境准备](Windows开发环境准备-7.md) + - [搭建Ubuntu环境及编译(Docker方式)](搭建Ubuntu环境及编译(Docker方式).md) + - [搭建Ubuntu环境及编译(安装包方式)](搭建Ubuntu环境及编译(安装包方式).md) + - [镜像烧录](镜像烧录.md) + - [常见问题](常见问题-8.md) diff --git "a/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207-10.md" "b/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207-10.md" deleted file mode 100644 index e0b8306a6577e9db5b4415098502b02638dbc741..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207-10.md" +++ /dev/null @@ -1,63 +0,0 @@ -# Ubuntu编译环境准备 - -- [方式一:Docker方式准备Ubuntu编译环境](#section1643363843714) - - [获取标准系统源码](#section58448331029) - - [Docker环境安装使用](#section22916211916) - -- [方式二:安装包方式准备Ubuntu编译环境](#section25961010189) - - [安装依赖工具](#section109262032104819) - - [获取标准系统源码](#section6325556113718) - - [获取prebuilts](#section16453104219209) - - -OpenHarmony为开发者提供了Docker和安装包两种方式来搭建Ubuntu编译环境。接下来将分别针对这两种方式进行介绍。 - -## 方式一:Docker方式准备Ubuntu编译环境 - -OpenHarmony标准系统为开发者提供的Docker环境已经将对应的编译工具链进行了封装,开发者可省略对应工具的安装。具体Docker使用分为如下几步: - -1. 获取标准系统源码。 -2. Docker环境安装使用。 - -### 获取标准系统源码 - -获取[标准系统源码](https://repo.huaweicloud.com/harmonyos/os/2.0/code-2.0-canary.tar.gz)。此处获取的源码为静态打包代码,如想获取码云社区最新源码,请采用[repo方式获取](../get-code/源码获取.md)。 - -### Docker环境安装使用 - -具体Docker环境的安装和使用请参考[Docker环境安装使用指导](../get-code/获取工具.md)。 - -## 方式二:安装包方式准备Ubuntu编译环境 - -安装包方式具体操作分为如下几步: - -1. 安装依赖工具。 -2. 获取标准系统源码。 -3. 获取prebuilts。 - -### 安装依赖工具 - -安装命令如下: - -``` -sudo apt-get install binutils git-core 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 lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 -``` - ->![](public_sys-resources/icon-caution.gif) **注意:** ->以上安装命令适用于Ubuntu18.04,其他版本请根据安装包名称采用对应的安装命令。如果是Ubuntu18.04以上版本需要安装python2.7 和 python-minimal。 - -### 获取标准系统源码 - -获取[标准系统源码](https://repo.huaweicloud.com/harmonyos/os/2.0/code-2.0-canary.tar.gz)。此处获取的源码为静态打包代码,如想获取码云社区最新源码,请采用[repo方式获取](../get-code/源码获取.md)。 - -### 获取prebuilts - -1. 在源码根目录下执行脚本。 - - ``` - build/prebuilts_download.sh - ``` - - 下载的prebuilts二进制默认存放在与OpenHarmony同目录下的OpenHarmony\_2.0\_canary\_prebuilts下。 - - diff --git "a/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207-9.md" "b/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207-9.md" deleted file mode 100644 index 57bbca56858890b3f41c5b0b73710a42427f30bb..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207-9.md" +++ /dev/null @@ -1,147 +0,0 @@ -# Ubuntu编译环境准备 - -- [Docker方式准备Ubuntu编译环境](#section1643363843714) - - [获取系统源码](#section58448331029) - - [Docker环境安装使用](#section22916211916) - -- [安装包方式准备Ubuntu编译环境](#section25961010189) - - [安装依赖工具](#section109262032104819) - - [获取标准系统源码](#section6325556113718) - - [获取prebuilts](#section16453104219209) - - [配置NodeJS环境和获取Node\_modules依赖包](#section133741330192119) - - [安装hc-gen工具](#section149281248182116) - - -OpenHarmony为开发者提供了Docker和安装包两种方式来搭建Ubuntu编译环境。接下来将分别针对这两种方式进行介绍。 - -## Docker方式准备Ubuntu编译环境 - -OpenHarmony标准系统为开发者提供的Docker环境已经将对应的编译工具链进行了封装,开发者可省略对应工具的安装。具体Docker使用分为如下几步: - -1. 获取系统源码。 -2. Docker环境安装使用。 - -### 获取系统源码 - -具体获取方式请参考[获取标准系统源码](../get-code/源码获取.md)。 - -### Docker环境安装使用 - -具体Docker环境的安装和使用请参考[Docker环境安装使用指导](../get-code/获取工具.md)。 - -## 安装包方式准备Ubuntu编译环境 - -安装包方式具体操作分为如下几步: - -1. 安装依赖工具。 -2. 获取系统源码。 -3. 获取prebuilts。 -4. 配置NodeJS环境和获取Node\_modules依赖包。 -5. 安装hc-gen工具。 - -### 安装依赖工具 - -安装命令如下: - -``` -sudo apt-get install binutils git-core 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 lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 python2.7 python-minimal -``` - ->![](public_sys-resources/icon-note.gif) **说明:** ->以上安装命令适用于Ubuntu18.04,其他版本请根据安装包名称采用对应的安装命令。 - -### 获取标准系统源码 - -具体获取方式请参考[获取标准系统源码](../get-code/源码获取.md)。 - -### 获取prebuilts - -1. 切换到OpenHarmony工作目录。 - - ``` - cd OpenHarmony - ``` - -2. 下载脚本。 - - ``` - curl https://gitee.com/landwind/script-tools/raw/master/Shell/OpenHarmony/OpenHarmony_2.0_canary_prebuilts_download.sh >./prebuilts_download.sh - ``` - -3. 下载并解压prebuilts压缩包到指定位置。 - - ``` - bash ./prebuilts_download.sh - ``` - - 二进制默认存放在与OpenHarmony同目录下的OpenHarmony\_2.0\_canary\_prebuilts下,如需修改默认位置,请编辑prebuilts\_download.sh修改bin\_dir值。 - -4. 切换到之前的目录。 - - ``` - cd - - ``` - - -### 配置NodeJS环境和获取Node\_modules依赖包 - -为了编译JS Framework,开发者需要在Linux服务器下载配置NodeJS(注意:步骤中OpenHarmony目录指代当前工程的根目录,可自定义),具体操作如下: - -1. 开发者在Linux服务器下载Nodejs。 - - ``` - mkdir -p OpenHarmony/prebuilts/build-tools/common/nodejs #创建nodejs目录 - cd OpenHarmony/prebuilts/build-tools/common/nodejs #进入nodejs目录 - wget --no-check-certificate https://nodejs.org/download/release/v12.18.4/node-v12.18.4-linux-x64.tar.gz #下载nodejs - tar -zxvf node-v12.18.4-linux-x64.tar.gz #解压nodejs压缩包 - cd - #切换到之前的目录 - ``` - -2. 配置NodeJS环境变量,下载node\_modules包。 - - ``` - cd OpenHarmony/third_party/jsframework #进入jsframework目录 - export PATH=../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin:${PATH} #设置NodeJS环境变量 - npm install #下载node_modules包 - cd - #切换到之前的目录 - ``` - -3. 把下载的node\_modules包放入OpenHarmony代码的prebuilts/build-tools/common/js-framework目录下。 - - ``` - mkdir -p OpenHarmony/prebuilts/build-tools/common/js-framework #创建js-framework目录 - cp -rp OpenHarmony/third_party/jsframework/node_modules OpenHarmony/prebuilts/build-tools/common/js-framework/ - ``` - - -### 安装hc-gen工具 - -hc-gen用于进行驱动编译,具体安装步骤如下: - -1. 打开Linux编译服务器终端。 -2. [下载hc-gen工具](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar)。 -3. 解压hc-gen安装包到Linux服务器\~/hc-gen路径下。 - - ``` - tar -xvf hc-gen-0.65-linux.tar -C ~/ - ``` - -4. 设置环境变量。 - - ``` - vim ~/.bashrc - ``` - - 将以下命令拷贝到.bashrc文件的最后一行,保存并退出。 - - ``` - export PATH=~/hc-gen:$PATH - ``` - -5. 生效环境变量。 - - ``` - source ~/.bashrc - ``` - - diff --git "a/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207.md" "b/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207.md" index 3f64dd3383059e40abef0e555618314c17afe72c..168c6184821b7c892def48d2f4c3ad5b6f055218 100755 --- "a/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207.md" +++ "b/zh-cn/device-dev/quick-start/Ubuntu\347\274\226\350\257\221\347\216\257\345\242\203\345\207\206\345\244\207.md" @@ -1,4 +1,4 @@ -# Ubuntu编译环境准备 +# Ubuntu编译环境准备 - [获取软件](#section1897711811517) - [获取源码](#section1545225464016) @@ -11,6 +11,9 @@ - [安装方法](#section11518484814) - [卸载方法](#section3512551574) +- [安装其他工具](#section830511218494) + - [安装方法](#section54409586499) + 系统要求:Ubuntu16.04及以上64位系统版本。 @@ -24,9 +27,9 @@ 6. 安装hb >![](public_sys-resources/icon-notice.gif) **须知:** ->- 针对Ubuntu编译环境我们提供了对应的Docker,该Docker封装了相关编译工具,选择使用Docker的开发者可跳过此章节。Docker使用可参考[Docker方式获取编译环境](../get-code/获取工具.md)。 +>- 针对Ubuntu编译环境我们提供了对应的Docker,该Docker封装了相关编译工具,选择使用Docker的开发者可跳过此章节。Docker使用可参考[Docker方式获取编译环境](../get-code/Docker编译环境.md)。 >- 通常系统默认安装samba、vim等常用软件,需要做适当适配以支持Linux服务器与Windows工作台之间的文件共享。 ->- 想要详细了解OpenHarmony编译构建模块功能的开发者可参考[编译构建使用指南](../subsystems/编译构建概述.md)。 +>- 想要详细了解OpenHarmony编译构建模块功能的开发者可参考[编译构建使用指南](../subsystems/编译构建.md)。 ## 获取软件 @@ -79,7 +82,8 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示

编译工具链

-

Master及OpenHarmony_v2.x分支/标签,请使用以下10.0.1版本:

https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz

+

Master及OpenHarmony_v2.x分支/标签,请使用以下10.0.1版本:

+

https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz

OpenHarmony_v1.x分支/标签,请使用以下9.0.0版本:

@@ -93,6 +97,13 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示

通过互联网获取

+

其他工具

+ +

编译构建中依赖的其他工具(如打包、镜像制作等)

+ +

通过互联网获取

+ + @@ -337,3 +348,14 @@ python3 -m pip uninstall ohos-build >![](public_sys-resources/icon-notice.gif) **须知:** >如果安装hb的过程中遇到问题,请参见下文[常见问题](常见问题.md)进行解决。 +## 安装其他工具 + +### 安装方法 + +1. apt安装全部依赖的工具 + + ``` + 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 + ``` + + diff --git "a/zh-cn/device-dev/quick-start/WLAN\350\201\224\347\275\221.md" "b/zh-cn/device-dev/quick-start/WLAN\350\201\224\347\275\221.md" index a0cacdf965403e4beff4fcdfa9e57e6a04adbffe..ab20f083f914b8a49bf99109750a3f6dd9cb1e0e 100755 --- "a/zh-cn/device-dev/quick-start/WLAN\350\201\224\347\275\221.md" +++ "b/zh-cn/device-dev/quick-start/WLAN\350\201\224\347\275\221.md" @@ -1,4 +1,4 @@ -# WLAN联网 +# WLAN联网 - [源码编译](#section191121332125319) - [镜像烧录](#section19458165166) @@ -10,7 +10,7 @@ 本节描述如何在Linux服务器上进行WLAN模组版本的编译。 -如果Linux编译环境通过Docker方式安装,具体编译过程请参见[Docker方式获取编译环境](../get-code/获取工具.md)的编译操作。如果Linux编译环境通过软件包方式安装,请参考如下步骤。 +如果Linux编译环境通过Docker方式安装,具体编译过程请参见[Docker方式获取编译环境](../get-code/Docker编译环境.md)的编译操作。如果Linux编译环境通过软件包方式安装,请参考如下步骤。 1. 打开DevEco Device Tool工具,点击“View \> Terminal”,进入终端界面。 @@ -19,7 +19,7 @@ ![](figures/1.png) - 在终端界面使用ssh命令连接linux服务器,如“ssh _user_@_ipaddr_”。 + 在终端界面使用ssh命令连接linux服务器,如“ssh user@ipaddr”。 **图 2** 终端界面示意图 @@ -63,17 +63,17 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,工具的基本使用请参考[DevEco Device Tool使用指南](https://device.harmonyos.com/cn/docs/ide/user-guides/service_introduction-0000001050166905),烧录过程包含如下步骤。 -1. 请连接好电脑和待烧录开发板,需要连接USB口,具体可参考[Hi3861开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_wifi_start_des-0000001050168548)。 +1. 请连接好电脑和待烧录开发板,需要连接USB口,具体可参考[Hi3861开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3861-0000001105041324)。 2. 打开电脑的设备管理器,查看并记录对应的串口号。 >![](public_sys-resources/icon-note.gif) **说明:** >如果对应的串口异常,请根据[Hi3861系列开发板串口驱动安装](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3861-drivers-0000001058153433)安装USB转串口的驱动程序。 - ![](figures/zh-cn_image_0000001073388838.png) + ![](figures/zh-cn_image_0000001128311118.png) 3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。 - ![](figures/zh-cn_image_0000001078404538.png) + ![](figures/zh-cn_image_0000001128311116.png) 4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3861系列开发板进行适配,无需单独修改。 5. 在“hi3861”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。 @@ -82,20 +82,20 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成, - upload\_protocol:选择烧录协议,固定选择“burn-serial”。 - upload\_partitions:选择待烧录的文件,默认选择hi3861\_app。 - ![](figures/zh-cn_image_0000001078244328.png) + ![](figures/zh-cn_image_0000001128470922.png) 6. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。 7. 打开工程文件,在DevEco Device Tool界面的“PROJECT TASKS”中,点击hi3861下的**Upload**按钮,启动烧录。 - ![](figures/zh-cn_image_0000001163569275.png) + ![](figures/zh-cn_image_0000001174270749.png) 8. 启动烧录后,显示如下提示信息时,请按开发板上的RST按钮重启开发板。 - ![](figures/zh-cn_image_0000001074285712.png) + ![](figures/zh-cn_image_0000001174270751.png) 9. 重新上电后,启动烧录,界面提示如下信息时,表示烧录成功。 - ![](figures/zh-cn_image_0000001074445364.png) + ![](figures/zh-cn_image_0000001174350669.png) ## WLAN模组联网 diff --git "a/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-9.md" "b/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-7.md" similarity index 94% rename from "zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-9.md" rename to "zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-7.md" index 1922601478a44f30abab394ab7dde6fca921fea3..bb7588a5ce8be87185e5d16a0a815ba8c342c87c 100644 --- "a/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-9.md" +++ "b/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-7.md" @@ -1,4 +1,4 @@ -# Windows开发环境准备 +# Windows开发环境准备 - [获取软件](#zh-cn_topic_0000001058091994_section1483143015558) - [安装Visual Studio Code](#zh-cn_topic_0000001058091994_section71401018163318) @@ -45,7 +45,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展

V3.7.4~V3.8.x 64位版本

-

推荐下载:https://www.python.org/downloads/release/python-388/

+

https://www.python.org/downloads/

Node.js

@@ -88,14 +88,13 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 ![](figures/zh-cn_image_0000001057335403.png) -2. 安装完成后,重启计算机,使Visual Studio Code的环境变量生效。 -3. 打开命令行工具,输入**code --version**命令,可以正常显示版本号说明安装成功。 +2. 安装完成后,打开命令行工具,输入**code --version**命令,可以正常显示版本号说明安装成功。 ## 安装Python 1. 双击Python安装包进行安装,勾选“**Add Python 3.8 to PATH**”,然后点击**Install Now**开始安装。 - ![](figures/zh-cn_image_0000001168817327.png) + ![](figures/zh-cn_image_0000001176317561.png) 2. 等待安装完成后,点击**Close**。 @@ -103,7 +102,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 3. 打开命令行工具,输入python --version,检查安装结果。 - ![](figures/zh-cn_image_0000001122419072.png) + ![](figures/zh-cn_image_0000001130278040.png) 4. 在命令行工具中,分别执行如下命令设置pip源,用于后续安装DevEco Device Tool过程中下载依赖的组件包。 @@ -122,9 +121,6 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 1. 点击下载后的软件包进行安装,全部按照默认设置点击**Next**,直至**Finish**。安装过程中,Node.js会自动在系统的path环境变量中配置node.exe的目录路径。 2. 重新打开命令行工具,输入“node -v“命令,能正常查询Node.js的版本号,说明Node.js安装成功。 - ![](figures/zh-cn_image_0000001056814287.png) - - ## 安装hpm 该方式需先确保**Node.js**安装成功。 @@ -154,8 +150,6 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 hpm -V ``` - ![](figures/zh-cn_image_0000001100641602.png) - ## 安装DevEco Device Tool插件 diff --git "a/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-8.md" "b/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-8.md" deleted file mode 100644 index 6cb31af41c0892a7b38dfc3dc84b79d02960271f..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207-8.md" +++ /dev/null @@ -1,183 +0,0 @@ -# Windows开发环境准备 - -- [获取软件](#zh-cn_topic_0000001058091994_section1483143015558) -- [安装Visual Studio Code](#zh-cn_topic_0000001058091994_section71401018163318) -- [安装Python](#zh-cn_topic_0000001058091994_section16266553175320) -- [安装Node.js](#zh-cn_topic_0000001058091994_section5353233124511) -- [安装hpm](#zh-cn_topic_0000001058091994_section173054793610) -- [安装DevEco Device Tool插件](#zh-cn_topic_0000001058091994_section4336315185716) - -系统要求:Windows 10 64位系统。 - -DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展,安装分为如下几步: - -1. 安装Visual Studio Code -2. 安装Python -3. 安装Node.js -4. 安装hpm -5. 安装DevEco Device Tool插件 - -## 获取软件 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

工具名称

-

用途说明

-

版本要求

-

获取渠道

-

Visual Studio Code

-

代码编辑工具

-

V1.53及以上 64位版本。

-

https://code.visualstudio.com/Download

-

Python

-

编译构建工具

-

3.7.4-3.8.x 64位版本

-

https://www.python.org/downloads/

-

Node.js

-

提供npm环境

-

v12.0.0及以上 64位版本

-

https://nodejs.org/zh-cn/download/

-

hpm

-

包管理工具

-

最新版

-

执行如下npm命令进行安装,npm自动下载最新版本

-
npm install -g @ohos/hpm-cli
-

DevEco Device Tool

-

OpenHarmony源码的编译、烧录、调试插件工具

-

v2.2 Beta1

-

https://device.harmonyos.com/cn/ide#download

-

下载前,请使用华为开发者帐号登录,如未注册,请先注册华为开发者帐号

-
- -## 安装Visual Studio Code - ->![](public_sys-resources/icon-note.gif) **说明:** ->如果已安装Visual Studio Code,打开命令行工具,输入**code --version**命令,检查版本号是否为1.53及以上版本;可以正常返回版本号,说明环境变量设置也正确。 - -1. 双击Visual Studio Code软件包进行安装。安装过程中,请勾选“添加到PATH(重启后生效)”。 - - ![](figures/zh-cn_image_0000001057335403.png) - -2. 安装完成后,重启计算机,使Visual Studio Code的环境变量生效。 -3. 打开命令行工具,输入**code --version**命令,可以正常显示版本号说明安装成功。 - -## 安装Python - -1. 双击Python安装包进行安装,勾选“**Add Python xx to PATH**”,然后点击**Install Now**开始安装。 - - ![](figures/zh-cn_image_0000001096154076.png) - -2. 等待安装完成后,点击**Close**。 - - ![](figures/zh-cn_image_0000001142794291.png) - -3. 打开命令行工具,输入python --version,检查安装结果。 - - ![](figures/zh-cn_image_0000001143154485.png) - -4. 在命令行工具中,分别执行如下命令设置pip源,用于后续安装DevEco Device Tool过程中下载依赖的组件包。 - - ``` - pip config set global.trusted-host repo.huaweicloud.com - pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple - pip config set global.timeout 120 - ``` - - -## 安装Node.js - ->![](public_sys-resources/icon-note.gif) **说明:** ->如果已安装Node.js,打开命令行工具,输入**node -v**命令,检查版本号是否为12.0.0及以上版本。 - -1. 点击下载后的软件包进行安装,全部按照默认设置点击**Next**,直至**Finish**。安装过程中,Node.js会自动在系统的path环境变量中配置node.exe的目录路径。 -2. 重新打开命令行工具,输入“node -v“命令,能正常查询Node.js的版本号,说明Node.js安装成功。 - - ![](figures/zh-cn_image_0000001056814287.png) - - -## 安装hpm - -该方式需先确保**Node.js**安装成功。 - -在安装hpm前,请检查网络连接状态,如果网络不能直接访问Internet,则需要通过代理服务器才可以访问。这种情况下,需要先[设置npm代理](https://device.harmonyos.com/cn/docs/ide/user-guides/npm_proxy-0000001054491032),才能安装hpm。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->如果已安装hpm,可以执行**npm update -g @ohos/hpm-cli**命令升级hpm至最新版本。 - -1. 建议将npm源配置为国内镜像,例如设置为华为云镜像源。 - - ``` - npm config set registry https://repo.huaweicloud.com/repository/npm/ - ``` - -2. 打开命令行工具,执行如下命令安装最新版本hpm。 - - ``` - npm install -g @ohos/hpm-cli - ``` - - ![](figures/zh-cn_image_0000001073840162.png) - -3. 安装完成后,执行如下命令(V为大写字母)检查hpm安装结果。 - - ``` - hpm -V - ``` - - ![](figures/zh-cn_image_0000001100641602.png) - - -## 安装DevEco Device Tool插件 - -安装DevEco Device Tool插件,**主机的用户名不能包含中文字符**,否则可能导致运行出现错误。 - -DevEco Device Tool正常运行需要依赖于C/C++和CodeLLDB插件,在安装完DevEco Device Tool后,会自动从Visual Studio Code的插件市场安装C/C++和CodeLLDB插件。因此,在安装DevEco Device Tool前,请检查Visual Studio Code的网络连接状态,如果网络不能直接访问Internet,则需要通过代理服务器才可以访问,请先[Visual Studio Code代理设置](https://device.harmonyos.com/cn/docs/ide/user-guides/vscode_proxy-0000001074231144)。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->安装DevEco Device Tool时,请先关闭Visual Studio Code。 - -1. 解压DevEco Device Tool插件压缩包,双击安装包程序进行安装。 -2. 安装过程中,会自动安装DevEco Device Tool所需的依赖文件(如C/C++和CodeLLDB插件)和执行程序。 - - ![](figures/zh-cn_image_0000001072468991.png) - -3. 安装完成后,会自动关闭命令行工具窗口。 -4. 启动Visual Studio Code,点击左侧的![](figures/zh-cn_image_0000001072757874.png)按钮,检查INSTALLED中,是否已成功安装C/C++、CodeLLDB和DevEco Device Tool。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >如果C/C++和CodeLLDB插件安装不成功,则DevEco Device Tool不能正常运行,解决方法,详细请参考:[离线安装C/C++和CodeLLDB插件](https://device.harmonyos.com/cn/docs/ide/user-guides/offline_plugin_install-0000001074376846)。 - - ![](figures/zh-cn_image_0000001142802505.png) - - diff --git "a/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207.md" "b/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207.md" index f70d3cce73f8f5939597d71c7d341d08a2f2a505..cffea83cad92e78f19cdb4222117b2c8c75902f0 100755 --- "a/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207.md" +++ "b/zh-cn/device-dev/quick-start/Windows\345\274\200\345\217\221\347\216\257\345\242\203\345\207\206\345\244\207.md" @@ -1,4 +1,4 @@ -# Windows开发环境准备 +# Windows开发环境准备 - [获取软件](#zh-cn_topic_0000001058091994_section1483143015558) - [安装Visual Studio Code](#zh-cn_topic_0000001058091994_section71401018163318) @@ -86,7 +86,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 1. 双击Visual Studio Code软件包进行安装。安装过程中,请勾选“添加到PATH(重启后生效)”。 - ![](figures/zh-cn_image_0000001057335403.png) + ![](figures/zh-cn_image_0000001174350653.png) 2. 安装完成后,重启计算机,使Visual Studio Code的环境变量生效。 3. 打开命令行工具,输入**code --version**命令,可以正常显示版本号说明安装成功。 @@ -95,15 +95,15 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 1. 双击Python安装包进行安装,勾选“**Add Python 3.8 to PATH**”,然后点击**Install Now**开始安装。 - ![](figures/zh-cn_image_0000001168817327.png) + ![](figures/zh-cn_image_0000001128470908.png) 2. 等待安装完成后,点击**Close**。 - ![](figures/zh-cn_image_0000001142794291.png) + ![](figures/zh-cn_image_0000001128311104.png) 3. 打开命令行工具,输入python --version,检查安装结果。 - ![](figures/zh-cn_image_0000001122419072.png) + ![](figures/zh-cn_image_0000001174350655.png) 4. 在命令行工具中,分别执行如下命令设置pip源,用于后续安装DevEco Device Tool过程中下载依赖的组件包。 @@ -122,7 +122,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 1. 点击下载后的软件包进行安装,全部按照默认设置点击**Next**,直至**Finish**。安装过程中,Node.js会自动在系统的path环境变量中配置node.exe的目录路径。 2. 重新打开命令行工具,输入“node -v“命令,能正常查询Node.js的版本号,说明Node.js安装成功。 - ![](figures/zh-cn_image_0000001056814287.png) + ![](figures/zh-cn_image_0000001128311096.png) ## 安装hpm @@ -146,7 +146,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 npm install -g @ohos/hpm-cli ``` - ![](figures/zh-cn_image_0000001073840162.png) + ![](figures/zh-cn_image_0000001128311100.png) 3. 安装完成后,执行如下命令(V为大写字母)检查hpm安装结果。 @@ -154,7 +154,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展 hpm -V ``` - ![](figures/zh-cn_image_0000001100641602.png) + ![](figures/zh-cn_image_0000001174270735.png) ## 安装DevEco Device Tool插件 @@ -169,14 +169,14 @@ DevEco Device Tool正常运行需要依赖于C/C++和CodeLLDB插件,在安装 1. 解压DevEco Device Tool插件压缩包,双击安装包程序进行安装。 2. 安装过程中,会自动安装DevEco Device Tool所需的依赖文件(如C/C++和CodeLLDB插件)和执行程序。 - ![](figures/zh-cn_image_0000001072468991.png) + ![](figures/zh-cn_image_0000001128470902.png) 3. 安装完成后,会自动关闭命令行工具窗口。 -4. 启动Visual Studio Code,点击左侧的![](figures/zh-cn_image_0000001072757874.png)按钮,检查INSTALLED中,是否已成功安装C/C++、CodeLLDB和DevEco Device Tool。 +4. 启动Visual Studio Code,点击左侧的![](figures/zh-cn_image_0000001174350651.png)按钮,检查INSTALLED中,是否已成功安装C/C++、CodeLLDB和DevEco Device Tool。 >![](public_sys-resources/icon-note.gif) **说明:** >如果C/C++和CodeLLDB插件安装不成功,则DevEco Device Tool不能正常运行,解决方法,详细请参考:[离线安装C/C++和CodeLLDB插件](https://device.harmonyos.com/cn/docs/ide/user-guides/offline_plugin_install-0000001074376846)。 - ![](figures/zh-cn_image_0000001142802505.png) + ![](figures/zh-cn_image_0000001174270727.png) diff --git a/zh-cn/device-dev/quick-start/figures/1-18.png b/zh-cn/device-dev/quick-start/figures/1-18.png deleted file mode 100644 index 8ed1535a6bc23dc5bd02fbd5a3f1392f46ad8d83..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/1-18.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/2021-01-27_170334-16.png b/zh-cn/device-dev/quick-start/figures/2021-01-27_170334-16.png deleted file mode 100644 index 1e7dd2cdb515e871a1c5d34b3332b097bc02351b..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/2021-01-27_170334-16.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/2021-01-27_170334-17.png b/zh-cn/device-dev/quick-start/figures/2021-01-27_170334-17.png index 5b573a4ddfe89fe25cb1b567736823244fdb9e97..1e7dd2cdb515e871a1c5d34b3332b097bc02351b 100644 Binary files a/zh-cn/device-dev/quick-start/figures/2021-01-27_170334-17.png and b/zh-cn/device-dev/quick-start/figures/2021-01-27_170334-17.png differ diff --git a/zh-cn/device-dev/quick-start/figures/2021-01-27_181047.png b/zh-cn/device-dev/quick-start/figures/2021-01-27_181047.png deleted file mode 100755 index 587ca51a1010c3fefcc79be73ffc5584075551ed..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/2021-01-27_181047.png and /dev/null differ diff --git "a/zh-cn/device-dev/quick-start/figures/3516\346\255\243\351\235\242-16.png" "b/zh-cn/device-dev/quick-start/figures/3516\346\255\243\351\235\242-16.png" new file mode 100644 index 0000000000000000000000000000000000000000..6975fb5fef92e35dec2de84b7e7035a39794bdf4 Binary files /dev/null and "b/zh-cn/device-dev/quick-start/figures/3516\346\255\243\351\235\242-16.png" differ diff --git "a/zh-cn/device-dev/quick-start/figures/3861\350\203\214\351\235\242.png" "b/zh-cn/device-dev/quick-start/figures/3861\350\203\214\351\235\242.png" deleted file mode 100755 index 623a4d9c339512dc78ec15c94013ad535c8b296c..0000000000000000000000000000000000000000 Binary files "a/zh-cn/device-dev/quick-start/figures/3861\350\203\214\351\235\242.png" and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001113969536.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001113969536.png deleted file mode 100644 index baac7b26450b8bc195a0db0bb3bb41119c0d9828..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001113969536.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001114129426.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001114129426.png deleted file mode 100644 index c5548cb227bd024b49aa3adba0a20869581448e8..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001114129426.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001117168786.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001117168786.png deleted file mode 100644 index ecc5d08c03bd361cfc3d2b9691ee6a52807cead6..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001117168786.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001117621400.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001117621400.png new file mode 100644 index 0000000000000000000000000000000000000000..bfb378217e99536cf076deecfb0f0677cb51eef8 Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001117621400.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001120802383.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001120802383.png deleted file mode 100755 index 4921a82341b8828a6117343b77f7c92b0d99a2c6..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001120802383.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105524466.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311066.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105524466.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311066.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105216304.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311070.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105216304.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311070.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152176131.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311072.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152176131.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311072.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001096963405.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311090.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001096963405.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311090.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001078089378.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311092.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001078089378.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311092.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073835952.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311094.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073835952.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311094.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311096.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311096.png new file mode 100644 index 0000000000000000000000000000000000000000..0cd7b0a67ce7110774979284e69c462058723756 Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311096.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160649343.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311098.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160649343.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311098.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311100.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311100.png new file mode 100644 index 0000000000000000000000000000000000000000..61aec8202ac830a3598ef2c8a413be30c5a742f0 Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311100.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311104.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311104.png new file mode 100644 index 0000000000000000000000000000000000000000..773abcd91a0c0ee1d3f5f87218216fc337d8f62f Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311104.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001078404538.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311116.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001078404538.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311116.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001057235392.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311118.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001057235392.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128311118.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001151976061.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470864.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001151976061.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470864.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105376252.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470880.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105376252.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470880.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073057176.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470900.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073057176.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470900.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470902.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470902.png new file mode 100644 index 0000000000000000000000000000000000000000..43e43b52b677660cec4d049784b246aebe1a2434 Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470902.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160529355.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470904.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160529355.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470904.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470906.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470906.png new file mode 100644 index 0000000000000000000000000000000000000000..281958fe76a787acc5d0b98f5ea248fa5abf2405 Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470906.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001168817327.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470908.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001168817327.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470908.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001078244328.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470922.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001078244328.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001128470922.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001130278040.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001130278040.png new file mode 100644 index 0000000000000000000000000000000000000000..90e51536da16b151e112aa3698cd339044afe3ea Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001130278040.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160527611.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001130584312.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160527611.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001130584312.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160528243.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160528243.png deleted file mode 100644 index 571af4fc8e53f59f246496ad670cc6b84f4473f3..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160528243.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160649345.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160649345.png deleted file mode 100644 index 1819a2816fa617fa6389646fd6a4b1ab0d97272d..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160649345.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163045527.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163045527.png deleted file mode 100644 index d8ac531b8265f265e2bd25518b212143fc61e4cf..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163045527.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163569081.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163569081.png deleted file mode 100644 index 703476a1e0d68ef903774a53b45e19c0617cb135..0000000000000000000000000000000000000000 Binary files a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163569081.png and /dev/null differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152056191.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270699.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152056191.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270699.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105216296.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270713.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105216296.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270713.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105056492.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270715.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105056492.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270715.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270727.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270727.png new file mode 100644 index 0000000000000000000000000000000000000000..2609aa029260a137c76c299fead396c07b8c8e45 Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270727.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001116405268.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270729.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001116405268.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270729.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163529159.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270731.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163529159.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270731.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270733.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270733.png new file mode 100644 index 0000000000000000000000000000000000000000..72dd05e3ae1eb91156df98cb1915b6264b3bbe5a Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270733.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270735.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270735.png new file mode 100644 index 0000000000000000000000000000000000000000..2710fef9266dde76a9c555bc2edecebd8e3d8d1b Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270735.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152256221.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270737.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152256221.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270737.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001151976069.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270739.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001151976069.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270739.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105376260.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270743.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105376260.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270743.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163569275.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270749.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163569275.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270749.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001074285712.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270751.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001074285712.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174270751.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001119945810.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350615.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001119945810.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350615.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152176139.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350623.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152176139.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350623.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073388838.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350633.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073388838.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350633.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163568181.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350641.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001163568181.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350641.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073242197.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350643.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001073242197.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350643.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160529359.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350647.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001160529359.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350647.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001077956808.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350649.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001077956808.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350649.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350651.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350651.png new file mode 100644 index 0000000000000000000000000000000000000000..686385e096a24ec1906169d2b11f75030c386b9f Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350651.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350653.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350653.png new file mode 100644 index 0000000000000000000000000000000000000000..1e6214d082696dc0727947e6b46f252fff33d92e Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350653.png differ diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001122419072.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350655.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001122419072.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350655.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105536118.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350659.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001105536118.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350659.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152256235.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350661.png similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001152256235.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350661.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001074445364.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350669.png old mode 100755 new mode 100644 similarity index 100% rename from zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001074445364.png rename to zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001174350669.png diff --git a/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001176317561.png b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001176317561.png new file mode 100644 index 0000000000000000000000000000000000000000..bf690379e676877036e375102155c3980f5dc29e Binary files /dev/null and b/zh-cn/device-dev/quick-start/figures/zh-cn_image_0000001176317561.png differ diff --git "a/zh-cn/device-dev/quick-start/figures/\346\240\207\345\207\206\347\216\257\345\242\203\345\277\253\351\200\237\345\205\245\351\227\250\346\265\201\347\250\213.png" "b/zh-cn/device-dev/quick-start/figures/\346\240\207\345\207\206\347\216\257\345\242\203\345\277\253\351\200\237\345\205\245\351\227\250\346\265\201\347\250\213.png" new file mode 100644 index 0000000000000000000000000000000000000000..587b414d787f36de3494760e14313e0ff18f896b Binary files /dev/null and "b/zh-cn/device-dev/quick-start/figures/\346\240\207\345\207\206\347\216\257\345\242\203\345\277\253\351\200\237\345\205\245\351\227\250\346\265\201\347\250\213.png" differ diff --git "a/zh-cn/device-dev/quick-start/\344\272\206\350\247\243\345\274\200\345\217\221\346\235\277.md" "b/zh-cn/device-dev/quick-start/\344\272\206\350\247\243\345\274\200\345\217\221\346\235\277.md" index ca0d75e7cae1de7d855b2beb89503df26a6e1173..fae4d8bb46425aee84df037e4e126c480c18bd9d 100755 --- "a/zh-cn/device-dev/quick-start/\344\272\206\350\247\243\345\274\200\345\217\221\346\235\277.md" +++ "b/zh-cn/device-dev/quick-start/\344\272\206\350\247\243\345\274\200\345\217\221\346\235\277.md" @@ -1,4 +1,4 @@ -# 了解开发板 +# 了解开发板 - **[Hi3861开发板介绍](Hi3861开发板介绍.md)** diff --git "a/zh-cn/device-dev/quick-start/\345\205\245\351\227\250\344\273\213\347\273\215.md" "b/zh-cn/device-dev/quick-start/\345\205\245\351\227\250\344\273\213\347\273\215.md" new file mode 100644 index 0000000000000000000000000000000000000000..3e0807591c3e4ae71f160c45a6da9dc6cbf3dbca --- /dev/null +++ "b/zh-cn/device-dev/quick-start/\345\205\245\351\227\250\344\273\213\347\273\215.md" @@ -0,0 +1,54 @@ +# 入门介绍 + +- [快速入门流程](#section7825218111517) +- [开发板简介](#zh-cn_topic_0000001053666242_section047719215429) +- [开发板规格](#zh-cn_topic_0000001053666242_section15192203316533) + +开发者可通过本文快速掌握OpenHarmony标准系统的环境搭建、编译、烧录、启动等操作。标准系统可以使用Windows环境进行开发、烧录,使用Linux环境进行编译。 + +本文将以当前推荐的Hi3516DV300开发板为例对上述操作进行说明。 + +## 快速入门流程 + +标准系统快速入门流程如下图所示,其中“搭建Ubuntu环境及编译”环节可根据实际情况选择docker方式或工具包方式其中一种即可。 + +**图 1** 标准环境快速入门流程 +![](figures/标准环境快速入门流程.png "标准环境快速入门流程") + +## 开发板简介 + +Hi3516DV300作为新一代行业专用Smart HD IP摄像机SOC,集成新一代ISP\(Image Signal Processor\)、H.265视频压缩编码器,同时集成高性能NNIE引擎,使得Hi3516DV300在低码率、高画质、智能处理和分析、低功耗等方面引领行业水平。 + +**图 2** Hi3516单板正面外观图 + + +![](figures/3516正面-16.png) + +## 开发板规格 + +**表 1** Hi3516开发板规格清单 + + + + + + + + + + + + + +

规格类型

+

规格清单

+

处理器及内部存储

+
  • Hi3516DV300芯片
  • DDR3 1GB
  • eMMC4.5,8GB容量
+

外部器件

+
  • 以太网口
  • 音频视频
    • 1路语音输入
    • 1路单声道(AC_L)输出,接3W功放(LM4871)
    • MicroHDMI(1路HDMI 1.4)
    +
  • 摄像头
    • 传感器IMX335
    • 镜头M12,焦距4mm,光圈1.8
    +
  • 显示屏
    • LCD连接器(2.35寸)
    • LCD连接器(5.5寸)
    +
  • 外部器件及接口
    • SD卡接口
    • JTAG/I2S 接口
    • ADC接口
    • 舵机接口
    • Grove连接器
    • USB2.0(Type C)
    • 功能按键3个,2个用户自定义按键,1个升级按键
    • LED指示灯,绿灯,红灯
    +
+
+ diff --git "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-1.md" "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-1.md" deleted file mode 100644 index 2348c6d97e09b0e333f325bf17ae29b129e59f10..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-1.md" +++ /dev/null @@ -1,151 +0,0 @@ -# 安装开发板环境 - -- [Hi3516工具要求](#section179175261196) - - [硬件要求](#section5840424125014) - - [软件要求](#section965634210501) - -- [安装Linux服务器工具](#section182916865219) - - [将Linux shell改为bash](#section1715027152617) - - [安装编译依赖基础软件(仅Ubuntu 20+需要)](#section45512412251) - - [安装文件打包工具](#section1969111820270) - - [安装Java 虚拟机环境](#section1692618112713) - - -## Hi3516工具要求 - -### 硬件要求 - -- Hi3516DV300 IoT Camera开发板 -- USB转串口线、网线(Windows工作台通过USB转串口线、网线与Hi3516DV300 开发板连接) - -各硬件连接关系如下图所示。 - -**图 1** 硬件连线图 - - -![](figures/矩形备份-292.png) - -### 软件要求 - ->![](public_sys-resources/icon-notice.gif) **须知:** ->本节描述安装包方式搭建编译环境的操作步骤。如果是Docker方式安装编译环境,请跳过此章节以及下述[安装Linux服务器工具](#section182916865219)章节。 - -Hi3516开发板对Linux服务器通用环境配置需要的工具及其获取途径如下表所示。 - -**表 1** Linux服务器开发工具及获取途径 - - - - - - - - - - - - - - - - - - - - - - - - -

开发工具

-

用途

-

获取途径

-

bash

-

命令行处理工具

-

系统配置

-

编译基础软件包(仅ubuntu 20+需要)

-

编译依赖的基础软件包

-

通过互联网获取

-

dosfstools、mtools、mtd-utils

-

文件打包工具

-

通过apt-get install安装

-

Java 虚拟机环境

-

编译、调试和运行Java程序

-

通过apt-get install安装

-
- -## 安装Linux服务器工具 - ->![](public_sys-resources/icon-notice.gif) **须知:** ->- 如果通过“HPM组件方式”或“HPM包管理器命令行工具方式”获取源码,不需要安装LLVM、hc-gen编译工具。 ->- (推荐)如果通过“镜像站点方式”或“代码仓库方式”获取源码,需要安装hc-gen编译工具。安装hc-gen编译工具时,请确保编译工具的环境变量路径唯一。 - -### 将Linux shell改为bash - -查看shell是否为bash,在终端运行如下命令 - -``` -ls -l /bin/sh -``` - -如果显示为“/bin/sh -\> bash”则为正常,否则请按以下方式修改: - -**方法一**:在终端运行如下命令,然后选择 no。 - -``` -sudo dpkg-reconfigure dash -``` - -**方法二**:先删除sh,再创建软链接。 - -``` -sudo rm -rf /bin/sh -sudo ln -s /bin/bash /bin/sh -``` - -### 安装编译依赖基础软件(仅Ubuntu 20+需要) - -执行以下命令进行安装: - -``` -sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev -``` - -### 安装文件打包工具 - -1. 打开Linux编译服务器终端。 -2. 运行如下命令,安装dosfstools。 - - ``` - sudo apt-get install dosfstools - ``` - -3. 运行如下命令,安装mtools。 - - ``` - sudo apt-get install mtools - ``` - -4. 运行如下命令,安装mtd-utils。 - - ``` - sudo apt-get install mtd-utils - ``` - - -### 安装Java 虚拟机环境 - -1. 打开Linux编译服务器终端。 -2. 安装Java运行时环境(JRE)。 - - ``` - sudo apt-get install default-jre - ``` - -3. 安装Java sdk开发工具包。 - - ``` - sudo apt-get install default-jdk - ``` - - diff --git "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-2.md" "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-2.md" index 21805e2323747ff8d8b72df0474b59f83238898d..3f827074bfd5e4c7c19251d467dece8dedeb4fe2 100644 --- "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-2.md" +++ "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-2.md" @@ -1,4 +1,4 @@ -# 安装开发板环境 +# 安装开发板环境 - [Hi3516工具要求](#section179175261196) - [硬件要求](#section5840424125014) diff --git "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-3.md" "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-3.md" deleted file mode 100644 index bf59854a1d551fdbcbb26a8b726653d64d72c5bb..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-3.md" +++ /dev/null @@ -1,156 +0,0 @@ -# 安装开发板环境 - -- [Hi3518环境搭建](#section1724111409282) - - [硬件要求](#section487353718276) - - [软件要求](#section17315193935817) - -- [安装Linux服务器工具](#section8831868501) - - [将Linux shell改为bash](#section1715027152617) - - [安装编译依赖基础软件(仅Ubuntu 20+需要)](#section45512412251) - - [安装文件打包工具](#section1686964015274) - - [安装hc-gen](#section18706403274) - - -## Hi3518环境搭建 - -### 硬件要求 - -- Hi3518EV300 IoT Camera开发板 -- USB转串口线、网线(Windows工作台通过USB转串口线、网线与开发板连接) - - 各硬件连接关系如下图所示。 - - -**图 1** 硬件连线图 -![](figures/硬件连线图-3.png "硬件连线图-3") - -### 软件要求 - ->![](public_sys-resources/icon-notice.gif) **须知:** ->本节描述安装包方式搭建编译环境的操作步骤。如果是Docker方式安装编译环境,请跳过此章节以及下述[安装Linux服务器工具](#section8831868501)章节。 - -Hi3518开发板对Linux服务器通用环境配置需要的工具及其获取途径如下表所示。 - -**表 1** Linux服务器开发工具及获取途径 - - - - - - - - - - - - - - - - - - - - -

开发工具

-

用途

-

获取途径

-

bash

-

命令行处理工具

-

系统配置

-

编译基础软件包(仅ubuntu 20+需要)

-

编译依赖的基础软件包

-

通过互联网获取

-

dosfstools、mtools、mtd-utils

-

文件打包工具

-

通过apt-get install安装

-
- -## 安装Linux服务器工具 - ->![](public_sys-resources/icon-notice.gif) **须知:** ->- 如果通过“HPM组件方式”或“HPM包管理器命令行工具方式”获取源码,不需要安装hc-gen编译工具。 ->- (推荐)如果通过“镜像站点方式”或“代码仓库方式”获取源码,需要安装hc-gen编译工具。安装hc-gen编译工具时,请确保编译工具的环境变量路径唯一。 - -### 将Linux shell改为bash - -查看shell是否为bash,在终端运行如下命令 - -``` -ls -l /bin/sh -``` - -如果显示为“/bin/sh -\> bash”则为正常,否则请按以下方式修改: - -**方法一**:在终端运行如下命令,然后选择 no。 - -``` -sudo dpkg-reconfigure dash -``` - -**方法二**:先删除sh,再创建软链接。 - -``` -sudo rm -rf /bin/sh -sudo ln -s /bin/bash /bin/sh -``` - -### 安装编译依赖基础软件(仅Ubuntu 20+需要) - -执行以下命令进行安装: - -``` -sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev -``` - -### 安装文件打包工具 - -1. 打开Linux编译服务器终端。 -2. 运行如下命令,安装dosfstools。 - - ``` - sudo apt-get install dosfstools - ``` - -3. 运行如下命令,安装mtools。 - - ``` - sudo apt-get install mtools - ``` - -4. 运行如下命令,安装mtd-utils。 - - ``` - sudo apt-get install mtd-utils - ``` - - -### 安装hc-gen - -1. 打开Linux编译服务器终端。 -2. [下载hc-gen工具](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar)。 -3. 解压hc-gen安装包到Linux服务器\~/hc-gen路径下。 - - ``` - tar -xvf hc-gen-0.65-linux.tar -C ~/ - ``` - -4. 设置环境变量。 - - ``` - vim ~/.bashrc - ``` - - 将以下命令拷贝到.bashrc文件的最后一行,保存并退出。 - - ``` - export PATH=~/hc-gen:$PATH - ``` - -5. 生效环境变量。 - - ``` - source ~/.bashrc - ``` - - diff --git "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-4.md" "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-4.md" index fced03de6238573e2e338fd74d7b3618f2481d53..b2bbd778809bfdb9aa3ac3e5104e070cce42eae4 100644 --- "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-4.md" +++ "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203-4.md" @@ -1,4 +1,4 @@ -# 安装开发板环境 +# 安装开发板环境 - [Hi3518环境搭建](#section1724111409282) - [硬件要求](#section487353718276) diff --git "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203.md" "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203.md" index 7bc6e67829cceedac9c8991f9ebfbba0ec0c608e..2bf84d7aab300883ba5e0b44f2c0acb5ad043917 100644 --- "a/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203.md" +++ "b/zh-cn/device-dev/quick-start/\345\256\211\350\243\205\345\274\200\345\217\221\346\235\277\347\216\257\345\242\203.md" @@ -1,4 +1,4 @@ -# 安装开发板环境 +# 安装开发板环境 - [Hi3861工具要求](#section466851916410) - [硬件要求](#section19202111020215) @@ -362,6 +362,6 @@ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev 2. 点击安装包,安装驱动程序。 3. 驱动安装完成后,重新插拔USB接口,串口信息显示如下图所示。 - ![](figures/zh-cn_image_0000001057235392.png) + ![](figures/zh-cn_image_0000001174350633.png) diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-0.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-0.md" deleted file mode 100755 index de74ac1a07c009703075f5ac3e5b067bbd463052..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-0.md" +++ /dev/null @@ -1,292 +0,0 @@ -# 常见问题 - -- [安装python3过程中,提示“configure: error: no acceptable C compiler found in $PATH”](#section1221016541119) -- [安装python3过程中,提示“-bash: make: command not found”](#section1913477181213) -- [安装python3过程中,提示“zlib not available”](#section108211415131210) -- [安装python3过程中,提示“No module named '\_ctypes'”](#section2062268124) -- [编译构建过程中,提示“No module named 'Crypto'”](#section982315398121) -- [编译构建过程中,提示“No module named 'ecdsa'”](#section102035451216) -- [编译构建过程中,提示“Could not find a version that satisfies the requirement six\>=1.9.0”](#section4498158162320) -- [编译构建过程中,提示找不到“-lgcc”](#section11181036112615) -- [编译构建过程中,提示找不到“python”](#section1571810194619) -- [安装 kconfiglib时,遇到lsb\_release错误](#section691681635814) - -## 安装python3过程中,提示“configure: error: no acceptable C compiler found in $PATH” - -- **现象描述** - - 安装python3过程中出现以下错误: - - ``` - configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details - ``` - -- **可能原因** - - 环境中未安装“gcc”。 - -- **解决办法** - - 1、通过命令“apt-get install gcc”在线安装。 - - 2、完成后,重新安装python3。 - - -## 安装python3过程中,提示“-bash: make: command not found” - -- **现象描述** - - 安装python3过程中出现以下错误: - - ``` - -bash: make: command not found - ``` - -- **可能原因** - - 环境中未安装“make”。 - -- **解决办法** - - 1、通过命令“apt-get install make”在线安装。 - - 2、完成后,重新安装python3。 - - -## 安装python3过程中,提示“zlib not available” - -- **现象描述** - - 安装python3过程中出现以下错误: - - ``` - zipimport.ZipImportError: can't decompress data; zlib not avaliable - ``` - -- **可能原因** - - 环境中未安装“zlib”。 - -- **解决办法** - - 方法1:通过命令“apt-get install zlib”在线安装。 - - 方法2:如果软件源中没有该软件,请从“www.zlib.net”下载版本代码,并离线安装。 - - ![](figures/10.png) - - 完成下载后,通过以下命令安装: - - ``` - # tar xvf zlib-1.2.11.tar.gz - # cd zlib-1.2.11 - # ./configure - # make && make install - ``` - - 完成后,重新安装python3。 - - -## 安装python3过程中,提示“No module named '\_ctypes'” - -- **现象描述** - - 安装python3过程中出现以下错误: - - ``` - ModuleNotFoundError:No module named ‘_ctypes’ - ``` - - -- **可能原因** - - 环境中未安装“libffi”和“libffi-devel”。 - - -- **解决办法** - - 1、通过命令“apt-get install libffi\* -y”,在线安装。 - - 2、完成后,重新安装python3。 - - -## 编译构建过程中,提示“No module named 'Crypto'” - -- **现象描述** - - 编译构建过程中出现以下错误: - - ``` - ModuleNotFoundError: No module named 'Crypto' - ``` - - -- **可能原因** - - 环境中未安装“Crypto”。 - - -- **解决办法** - - 方法1:通过命令“pip3 install Crypto”,在线安装。 - - 方法2:离线安装 - - 通过网页[https://pypi.org/project/pycrypto/\#files](https://pypi.org/project/pycrypto/#files),下载源码。 - - ![](figures/zh-cn_image_0000001151976061.png) - - 将源码放置在Linux服务器中,解压,并安装“python3 setup.py install”。 - - 完成上述安装后,重新构建。 - - -## 编译构建过程中,提示“No module named 'ecdsa'” - -- **现象描述** - - 编译构建过程中出现以下错误: - - ``` - ModuleNotFoundError:No module named 'ecdsa' - ``` - - -- **可能原因** - - 环境中未安装“ecdsa”。 - - -- **解决办法** - - 方法1:通过命令“pip3 install ecdsa”,在线安装。 - - 方法2:离线安装 - - 通过网页[https://pypi.org/project/ecdsa/\#files](https://pypi.org/project/ecdsa/#files),下载安装包。 - - ![](figures/zh-cn_image_0000001152176131.png) - - 将安装包放置Linux服务器中,并安装“pip3 install ecdsa-0.15-py2.py3-none-any.whl”。 - - 完成上述安装后,重新构建。 - - -## 编译构建过程中,提示“Could not find a version that satisfies the requirement six\>=1.9.0” - -- **现象描述** - - 编译构建过程中出现以下错误: - - ``` - Could not find a version that satisfies the requirement six>=1.9.0 - ``` - - -- **可能原因** - - 环境中未安装合适的“six”。 - - -- **解决办法** - - 方法1:通过命令“pip3 install six”,在线安装。 - - 方法2:离线安装 - - 通过网页[https://pypi.org/project/six/\#files](https://pypi.org/project/six/#files),下载安装包。 - - ![](figures/zh-cn_image_0000001152056191.png) - - 将源码放置在Linux服务器中,并安装“pip3 install six-1.14.0-py2.py3-none-any.whl”。 - - 完成上述安装后,重新构建。 - - -## 编译构建过程中,提示找不到“-lgcc” - -- **现象描述** - - 编译构建过程中出现以下错误: - - ``` - riscv32-unknown-elf-ld: cannot find -lgcc - ``` - - -- **可能原因** - - 交叉编译器gcc\_riscv32的PATH添加错误,如下,在"bin"后多添加了一个“/”,应该删除。 - - ``` - ~/gcc_riscv32/bin/:/data/toolchain/ - ``` - - -- **解决办法** - - 重新修改gcc\_riscv32的PATH,将多余的“/”删除。 - - ``` - ~/gcc_riscv32/bin:/data/toolchain/ - ``` - - -## 编译构建过程中,提示找不到“python” - -- **现象描述** - - 编译构建过程中出现以下错误: - - ``` - -bash: /usr/bin/python: No such file or directory - ``` - - -- **可能原因**1 - - 没有装python。 - -- **解决办法** - - 请按照 [安装Python环境](../quick-start/Ubuntu编译环境准备.md) - -- **可能原因2** - - ![](figures/zh-cn_image_0000001105376252.png) - -- **解决办法** - - usr/bin目录下没有python软链接,请运行以下命令添加软链接: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - 例: - - ![](figures/zh-cn_image_0000001105216296.png) - - -## 安装 kconfiglib时,遇到lsb\_release错误 - -- **现象描述** - - 安装kconfiglib过程中遇到如下错误打印: - - ``` - subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1. - ``` - -- **可能原因** - - lsb\_release模块基于的python版本与现有python版本不一致 - -- **解决办法** - - 执行"find / -name lsb\_release",找到lsb\_release位置并删除,如:"sudo rm -rf /usr/bin/lsb\_release" - - diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" index de74ac1a07c009703075f5ac3e5b067bbd463052..f8e0b7384e225685a08fa51e0cf97264bfe3851e 100644 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" +++ "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" @@ -1,4 +1,4 @@ -# 常见问题 +# 常见问题 - [安装python3过程中,提示“configure: error: no acceptable C compiler found in $PATH”](#section1221016541119) - [安装python3过程中,提示“-bash: make: command not found”](#section1913477181213) @@ -134,7 +134,7 @@ 通过网页[https://pypi.org/project/pycrypto/\#files](https://pypi.org/project/pycrypto/#files),下载源码。 - ![](figures/zh-cn_image_0000001151976061.png) + ![](figures/zh-cn_image_0000001128470864.png) 将源码放置在Linux服务器中,解压,并安装“python3 setup.py install”。 @@ -165,7 +165,7 @@ 通过网页[https://pypi.org/project/ecdsa/\#files](https://pypi.org/project/ecdsa/#files),下载安装包。 - ![](figures/zh-cn_image_0000001152176131.png) + ![](figures/zh-cn_image_0000001128311072.png) 将安装包放置Linux服务器中,并安装“pip3 install ecdsa-0.15-py2.py3-none-any.whl”。 @@ -196,7 +196,7 @@ 通过网页[https://pypi.org/project/six/\#files](https://pypi.org/project/six/#files),下载安装包。 - ![](figures/zh-cn_image_0000001152056191.png) + ![](figures/zh-cn_image_0000001174270699.png) 将源码放置在Linux服务器中,并安装“pip3 install six-1.14.0-py2.py3-none-any.whl”。 @@ -253,7 +253,7 @@ - **可能原因2** - ![](figures/zh-cn_image_0000001105376252.png) + ![](figures/zh-cn_image_0000001128311070.png) - **解决办法** @@ -268,7 +268,7 @@ 例: - ![](figures/zh-cn_image_0000001105216296.png) + ![](figures/zh-cn_image_0000001174350623.png) ## 安装 kconfiglib时,遇到lsb\_release错误 diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-10.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-10.md" deleted file mode 100644 index 7f7e7a76538ce683098105b3e6bda42bae97df74..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-10.md" +++ /dev/null @@ -1,21 +0,0 @@ -# 常见问题 - -- **现象描述** - - Linux编译服务器终端输入不识别的命令时,提示"ImportError: No module named apt\_pkg" - - -- **可能原因** - - python3 apt安装兼容性问题。 - -- **解决办法** - - 执行如下命令重新安装python3-apt。 - - ``` - sudo apt-get remove python3-apt - sudo apt-get install python3-apt - ``` - - diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-2.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-2.md" deleted file mode 100755 index 1dade41bc1a1fd59f0cd3e366899d314ced4f6a9..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-2.md" +++ /dev/null @@ -1,175 +0,0 @@ -# 常见问题 - -- [烧写选择串口后提示失败](#section627268185113) -- [Windows电脑与单板网络连接失败](#section195391036568) -- [烧写失败](#section571164016565) -- [编译构建过程中,提示找不到“python”](#section1039835245619) -- [串口无回显](#section14871149155911) - -## 烧写选择串口后提示失败 - -- **现象描述** - - 点击烧写并选择串口后,出现Error: Opening COMxx: Access denied。 - - **图 1** 打开串口失败图 - ![](figures/打开串口失败图.png "打开串口失败图") - -- **可能原因** - - 串口已经被占用。 - -- **解决办法** - -1. 按图依次选择下拉框,查找带有serial-xx的终端 - - **图 2** 查找是否存在占用串口的终端 - ![](figures/查找是否存在占用串口的终端.png "查找是否存在占用串口的终端") - -2. 点击标号中的垃圾桶图标,关闭串口。 - - **图 3** 关闭串口终端 - ![](figures/关闭串口终端.png "关闭串口终端") - -3. 重新点击烧写,选择串口并开始烧写程序 - - **图 4** 重新启动烧写任务 - - - ![](figures/changjian1.png) - - -## Windows电脑与单板网络连接失败 - -- **现象描述** - - 点击烧写并选择串口后,无法获取文件。 - - **图 5** 网络不通,单板无法获取文件图 - ![](figures/网络不通-单板无法获取文件图.png "网络不通-单板无法获取文件图") - -- **可能原因** - - 单板网络与Windows电脑不联通。 - - Windows电脑防火墙未允许Visual Studio Code联网。 - -- **解决方法** - -1. 检查网线是否连接。 -2. 点击Windows防火墙。 - - **图 6** 网络防火墙设置图 - ![](figures/网络防火墙设置图.png "网络防火墙设置图") - -3. 点击“允许应用通过防火墙”。 - - **图 7** 防火墙和网络保护界面图 - ![](figures/防火墙和网络保护界面图.png "防火墙和网络保护界面图") - -4. 查找Visual Studio Code应用。 - - **图 8** 查找Visual Studio Code应用图 - ![](figures/查找Visual-Studio-Code应用图.png "查找Visual-Studio-Code应用图") - -5. 勾选Visual Studio Code的专用和公用网络的访问权限。 - - **图 9** 允许Visual Studio Code应用访问网络 - ![](figures/允许Visual-Studio-Code应用访问网络.png "允许Visual-Studio-Code应用访问网络") - - -## 烧写失败 - -- **现象描述** - - 点击烧写并选择串口后,出现无法烧写的情况。 - -- **可能原因** - - 安装IDE插件DevEco后未重启。 - -- **解决方法** - - 重启IDE。 - - -## 编译构建过程中,提示找不到“python” - -- **现象描述** - - ![](figures/zh-cn_image_0000001105056492.png) - - -- **可能原因1** - - 没有装python。 - -- **解决办法** - - 请按照[安装python](../quick-start/Ubuntu编译环境准备.md)。 - -- **可能原因2** - - ![](figures/zh-cn_image_0000001151976069.png) - -- **解决办法** - - usr/bin目录下没有python软链接,请运行以下命令: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - 例: - - ![](figures/zh-cn_image_0000001152176139.png) - - -## 串口无回显 - -- **现象描述** - - 串口显示已连接,重启单板后,回车无任何回显。 - -- **可能原因1** - - 串口连接错误。 - -- **解决办法** - - 修改串口号。 - - 请查看设备管理器,确认连接单板的串口与终端中连接串口是否一致,若不一致,请按镜像运行内[步骤1](../quick-start/运行Hello-OHOS.md)修改串口号。 - - -- **可能原因2** - - 单板U-boot被损坏。 - -- **解决办法** - - 烧写U-boot。 - - 若上述步骤依旧无法连接串口,可能由于单板U-boot损坏,按下述步骤烧写U-boot。 - - -1. 获取引导文件U-boot。 - - >![](public_sys-resources/icon-notice.gif) **须知:** - >单板的U-boot文件请在开源包中获取: - >Hi3516DV300:device\\hisilicon\\hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3516dv300.bin - >Hi3518EV300:device\\hisilicon\\hispark\_aries\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3518ev300.bin - -2. 根据USB烧写步骤烧写U-boot文件。 - - 按照[Hi3516系列USB烧写步骤](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_upload-0000001052148681)/[Hi3518系列USB烧写步骤](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3518_upload-0000001057313128)中描述的USB烧写方法,选择对应单板的U-boot文件进行烧写。 - -3. 烧写完成后,登录串口如下图所示。 - - **图 10** U-boot烧写完成串口显示图 - ![](figures/U-boot烧写完成串口显示图.png "U-boot烧写完成串口显示图") - - diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" index 1dade41bc1a1fd59f0cd3e366899d314ced4f6a9..ece72f03517ecd60ca587fcba3c3fab1a5974a47 100644 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" +++ "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" @@ -1,4 +1,4 @@ -# 常见问题 +# 常见问题 - [烧写选择串口后提示失败](#section627268185113) - [Windows电脑与单板网络连接失败](#section195391036568) @@ -97,7 +97,7 @@ - **现象描述** - ![](figures/zh-cn_image_0000001105056492.png) + ![](figures/zh-cn_image_0000001174270715.png) - **可能原因1** @@ -110,7 +110,7 @@ - **可能原因2** - ![](figures/zh-cn_image_0000001151976069.png) + ![](figures/zh-cn_image_0000001128470880.png) - **解决办法** @@ -125,7 +125,7 @@ 例: - ![](figures/zh-cn_image_0000001152176139.png) + ![](figures/zh-cn_image_0000001174270713.png) ## 串口无回显 diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-5.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-5.md" deleted file mode 100755 index 1bff88b102de828e19eda72d4a376dcec7ea9a01..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-5.md" +++ /dev/null @@ -1,174 +0,0 @@ -# 常见问题 - -- [烧写选择串口后提示失败](#section1498892119619) -- [Windows电脑与单板网络连接失败](#section8512971816) -- [烧写失败](#section1767804111198) -- [编译构建过程中,提示找不到“python”](#zh-cn_topic_0000001053466255_section1039835245619) -- [串口无回显](#zh-cn_topic_0000001053466255_section14871149155911) - -## 烧写选择串口后提示失败 - -- **现象描述** - - 点击烧写并选择串口后,出现Error: Opening COMxx: Access denied。 - - **图 1** 打开串口失败图 - ![](figures/打开串口失败图-7.png "打开串口失败图-7") - -- **可能原因** - - 串口已经被占用。 - -- **解决办法** - -1. 按图依次选择下拉框,查找带有serial-xx的终端 - - **图 2** 查找是否存在占用串口的终端 - ![](figures/查找是否存在占用串口的终端-8.png "查找是否存在占用串口的终端-8") - -2. 点击标号中的垃圾桶图标,关闭串口。 - - **图 3** 关闭串口终端 - ![](figures/关闭串口终端-9.png "关闭串口终端-9") - -3. 重新点击烧写,选择串口并开始烧写程序 - - **图 4** 重新启动烧写任务 - - - ![](figures/changjian1-10.png) - - -## Windows电脑与单板网络连接失败 - -- **现象描述** - - 点击烧写并选择串口后,无法获取文件。 - - **图 5** 网络不通,单板无法获取文件图 - ![](figures/网络不通-单板无法获取文件图-11.png "网络不通-单板无法获取文件图-11") - -- **可能原因** - - 单板网络与Windows电脑不联通。 - - Windows电脑防火墙未允许Visual Studio Code联网。 - -- **解决方法** - -1. 检查网线是否连接。 -2. 点击Windows防火墙。 - - **图 6** 网络防火墙设置图 - ![](figures/网络防火墙设置图-12.png "网络防火墙设置图-12") - -3. 点击“允许应用通过防火墙”。 - - **图 7** 防火墙和网络保护界面图 - ![](figures/防火墙和网络保护界面图-13.png "防火墙和网络保护界面图-13") - -4. 查找Visual Studio Code应用。 - - **图 8** 查找Visual Studio Code应用图 - ![](figures/查找Visual-Studio-Code应用图-14.png "查找Visual-Studio-Code应用图-14") - -5. 勾选Visual Studio Code的专用和公用网络的访问权限。 - - **图 9** 允许Visual Studio Code应用访问网络 - ![](figures/允许Visual-Studio-Code应用访问网络-15.png "允许Visual-Studio-Code应用访问网络-15") - - -## 烧写失败 - -- **现象描述** - - 点击烧写并选择串口后,出现无法烧写的情况。 - -- **可能原因** - - 安装IDE插件DevEco后未重启。 - -- **解决方法** - - 重启IDE。 - - -## 编译构建过程中,提示找不到“python” - -- **现象描述** - - ![](figures/zh-cn_image_0000001105376260.png) - - -- **可能原因1** - - 没有装python。 - -- **解决办法** - - 请按照[安装python](../quick-start/Ubuntu编译环境准备.md)。 - -- **可能原因2** - - ![](figures/zh-cn_image_0000001105216304.png) - -- **解决办法** - - usr/bin目录下没有python软链接,请运行以下命令: - - ``` - # cd /usr/bin/ - # which python3 - # ln -s /usr/local/bin/python3 python - # python --version - ``` - - 例: - - ![](figures/zh-cn_image_0000001152256235.png) - - -## 串口无回显 - -- **现象描述** - - 串口显示已连接,重启单板后,回车无任何回显。 - -- **可能原因1** - - 串口连接错误。 - -- **解决办法** - - 修改串口号。 - - 请查看设备管理器,确认连接单板的串口与终端中连接串口是否一致,若不一致,请按镜像运行内[步骤1](../quick-start/运行Hello-OHOS.md)修改串口号。 - - -- **可能原因2** - - 单板U-boot被损坏。 - -- **解决办法** - - 烧写U-boot。 - - 若上述步骤依旧无法连接串口,可能由于单板U-boot损坏,按下述步骤烧写U-boot。 - - -1. 获取引导文件U-boot。 - - >![](public_sys-resources/icon-notice.gif) **须知:** - >单板的U-boot文件请在开源包中获取: - >Hi3516DV300:device\\hisilicon\\hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3516dv300.bin - >Hi3518EV300:device\\hisilicon\\hispark\_aries\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3518ev300.bin - -2. 根据USB烧写步骤烧写U-boot文件。 - - 按照[Hi3516系列USB烧写步骤](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_upload-0000001052148681)/[Hi3518系列USB烧写步骤](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3518_upload-0000001057313128)中描述的USB烧写方法,选择对应单板的U-boot文件进行烧写。 - -3. 烧写完成后,登录串口如下图所示。 - - ![](figures/zh-cn_image_0000001105536118.png) - - diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-6.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-6.md" index 1bff88b102de828e19eda72d4a376dcec7ea9a01..b2dc3ad51268d608a8767e7eaf9256fbc9adfe11 100644 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-6.md" +++ "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-6.md" @@ -1,4 +1,4 @@ -# 常见问题 +# 常见问题 - [烧写选择串口后提示失败](#section1498892119619) - [Windows电脑与单板网络连接失败](#section8512971816) @@ -97,7 +97,7 @@ - **现象描述** - ![](figures/zh-cn_image_0000001105376260.png) + ![](figures/zh-cn_image_0000001174270743.png) - **可能原因1** @@ -110,7 +110,7 @@ - **可能原因2** - ![](figures/zh-cn_image_0000001105216304.png) + ![](figures/zh-cn_image_0000001174270739.png) - **解决办法** @@ -125,7 +125,7 @@ 例: - ![](figures/zh-cn_image_0000001152256235.png) + ![](figures/zh-cn_image_0000001174350661.png) ## 串口无回显 @@ -169,6 +169,6 @@ 3. 烧写完成后,登录串口如下图所示。 - ![](figures/zh-cn_image_0000001105536118.png) + ![](figures/zh-cn_image_0000001174350659.png) diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-11.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-8.md" similarity index 86% rename from "zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-11.md" rename to "zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-8.md" index 7f7e7a76538ce683098105b3e6bda42bae97df74..85c32067b448d53895207caca5feb9217dda9b9b 100644 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-11.md" +++ "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-8.md" @@ -1,4 +1,4 @@ -# 常见问题 +# 常见问题 - **现象描述** diff --git "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230.md" "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230.md" index 2bb8c5f473aa8b6038dca80d1c1fc94b9ae5a019..91cee989ccdc93b2afeb8690bb939a34b57a2a20 100755 --- "a/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230.md" +++ "b/zh-cn/device-dev/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230.md" @@ -1,4 +1,4 @@ -# 常见问题 +# 常见问题 - [hb 安装过程中出现乱码、段错误](#section411894616119) - [hb 安装过程中提示"cannot import 'sysconfig' from 'distutils'"](#section629417571626) diff --git "a/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244-11.md" "b/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244-11.md" deleted file mode 100644 index 37b798d84329ebe4a92979fe92ceb5560645b6a5..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244-11.md" +++ /dev/null @@ -1,246 +0,0 @@ -# 开发步骤 - -- [环境搭建](#section1246439101710) -- [编译](#section375234715135) -- [烧录](#section111671738101213) - - [前提条件](#section1458192114718) - - [使用USB烧录](#section18423113662120) - -- [示例开发](#section5600113114323) - -## 环境搭建 - -请参考[搭建标准系统环境](概述-7.md)完成OpenHarmony的系统环境搭建。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->如果使用三方开发板开发,针对开发板的具体环境要求,以三方开发板的官方指导为准。 - -## 编译 - -使用Docker环境的开发者可参照Docker使用指导进行编译。采用安装包方式的开发者在Linux环境进行如下操作。 - -1. 进入源码根目录,执行如下命令进行版本编译。 - - ``` - ./build.sh --product-name Hi3516DV300 - ``` - - \{product\_name\}为当前版本支持的平台。 - -2. 检查编译结果。编译完成后,log中显示如下: - - ``` - build system image successful. - =====build Hi3516DV300 successful. - ``` - - 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >其他模块化编译操作,可参见[编译构建指导](../subsystems/标准系统编译构建指导.md)。 - - -## 烧录 - -标准系统烧录,在V2.2 Beta1及以上版本支持。 - -Hi3516系列开发板中,只有Hi3516DV300支持烧录标准系统,其烧录方式包括USB烧录、网口烧录和串口烧录三种方式,其中: - -- **Windows系统:支持USB烧录、网口烧录和串口烧录** -- **Linux系统:支持串口烧录和网口烧录。如果采用的是Linux+Windows双系统,也支持USB烧录。** - -同一种烧录方式(如网口烧录),在Windows和Linux环境下的烧录操作完全一致,区别仅在于DevEco Device Tool环境搭建不同。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->当前Hi3516DV300开发板支持通过USB、网口、串口三种方式烧录OpenHarmony标准系统。本文以USB方式为例讲解烧录操作,其他两种烧录方式请参照[Hi3516DV300烧录指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_upload-0000001052148681)。 - -### 前提条件 - -在DevEco Device Tool中[打开一个工程](https://device.harmonyos.com/cn/docs/ide/user-guides/open_project-0000001071680043),该工程文件夹选择待烧录文件所在文件夹即可。其中开发板类型固定选择Hi3516DV300,Framework选择“Hb”。 - -### 使用USB烧录 - -Hi3516DV300开发板使用USB烧录方式,支持Windows系统。如果采用的是Linux+Windows双系统,Linux系统也支持USB烧录。 - -1. 请连接好电脑和待烧录开发板,以Hi3516DV300为例,需要同时连接串口和USB口,具体可参考[Hi3516开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_3516-0000001052670587)。 -2. 打开电脑的设备管理器,查看并记录对应的串口号。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >如果对应的串口异常,请根据[Hi3516/Hi3518系列开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。 - - ![](figures/zh-cn_image_0000001160529359.png) - -3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。 - - ![](figures/2021-01-27_170334-16.png) - -4. 在**Partition Configuration**页签中,按照下表内容填写烧录文件信息,包括: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Binary

-

Memory

-

System

-

Address

-

Length

-

Board

-

Type

-

fastboot

-

选择“u-boot-hi3516dv300_emmc.bin”

-

emmc

-

none

-

0x000000

-

0x100000

-

固定选择“hi3516dv300”

-

NA

-

boot

-

选择“uImage”

-

emmc

-

none

-

0x100000

-

0xf00000

-

NA

-

updater

-

选择“updater.img”

-

emmc

-

ext3/4

-

0x1000000

-

0x1400000

-

NA

-

misc

-

空白,不用选择

-

emmc

-

none

-

0x2400000

-

0x100000

-

NA

-

system

-

选择“system.img”

-

emmc

-

ext3/4

-

0x2500000

-

0xceb00000

-

NA

-

vendor

-

选择“vendor.img”

-

emmc

-

ext3/4

-

0xd1000000

-

0x10000000

-

NA

-

userdata

-

选择“userdata.img”

-

emmc

-

ext3/4

-

0xe1000000

-

0x5b800000

-

NA

-
- - ![](figures/zh-cn_image_0000001160527611.png) - -5. 在“hi3516dv300”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。 - - - upload\_port:选择步骤2中查询的串口号。 - - upload\_protocol:选择烧录协议,固定选择“hiburn-usb”。 - - upload\_partitions:选择待烧录的文件,包括fastboot、boot、updater、misc、system、vendor和userdata。 - - ![](figures/zh-cn_image_0000001160528243.png) - -6. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。 -7. 打开工程文件,点击![](figures/2021-01-27_170334-17.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击fastboot下的**Erase**按钮,擦除U-Boot。 - - ![](figures/zh-cn_image_0000001163045527.png) - -8. 执行**Erase**擦除操作后,显示如下提示信息时,请重启开发板(下电再上电)。 - - ![](figures/zh-cn_image_0000001114129426.png) - -9. 重新上电后,显示如下信息时,表示擦除U-Boot成功。 - - ![](figures/zh-cn_image_0000001113969536.png) - -10. 擦除完成后,点击hi3516dv300下的**Upload**按钮,启动烧录。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >如果您是第一次在工作台烧录Hi3516/Hi3518系列开发板,可能烧录失败,提示“not find the Devices”,请根据[Hi3516/Hi3518系列开发板USB驱动安装](https://device.harmonyos.com/cn/docs/ide/user-guides/usb_driver-0000001058690393)进行处理后再重新烧录。 - - ![](figures/1-18.png) - -11. 启动烧录后,界面提示如下信息时,表示烧录成功。 - - ![](figures/zh-cn_image_0000001160649343.png) - - -## 示例开发 - -恭喜!您已经完成了OpenHarmony标准系统的快速入门,接下来可[开发一个小示例](../guide/概述-10.md),进一步熟悉OpenHarmony的开发。 - diff --git "a/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244-12.md" "b/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244-12.md" deleted file mode 100644 index 40cde60fb17a996761f180e09bcb509a339f160a..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244-12.md" +++ /dev/null @@ -1,246 +0,0 @@ -# 开发步骤 - -- [环境搭建](#section1246439101710) -- [编译](#section375234715135) -- [烧录](#section111671738101213) - - [前提条件](#section1458192114718) - - [使用USB烧录](#section18423113662120) - -- [示例开发](#section5600113114323) - -## 环境搭建 - -请参考[搭建标准系统环境](概述-8.md)完成OpenHarmony的系统环境搭建。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->如果使用三方开发板开发,针对开发板的具体环境要求,以三方开发板的官方指导为准。 - -## 编译 - -使用Docker环境的开发者可参照Docker使用指导进行编译。采用安装包方式的开发者在Linux环境进行如下操作。 - -1. 进入源码根目录,执行如下命令进行版本编译。 - - ``` - ./build.sh --product-name Hi3516DV300 - ``` - - \{product\_name\}为当前版本支持的平台。 - -2. 检查编译结果。编译完成后,log中显示如下: - - ``` - build system image successful. - =====build Hi3516DV300 successful. - ``` - - 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >其他模块化编译操作,可参见[编译构建指导](../subsystems/标准系统编译构建指导.md)。 - - -## 烧录 - -标准系统烧录,在V2.2 Beta1及以上版本支持。 - -Hi3516系列开发板中,只有Hi3516DV300支持烧录标准系统,其烧录方式包括USB烧录、网口烧录和串口烧录三种方式,其中: - -- **Windows系统:支持USB烧录、网口烧录和串口烧录** -- **Linux系统:支持串口烧录和网口烧录。如果采用的是Linux+Windows双系统,也支持USB烧录。** - -同一种烧录方式(如网口烧录),在Windows和Linux环境下的烧录操作完全一致,区别仅在于DevEco Device Tool环境搭建不同。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->当前Hi3516DV300开发板支持通过USB、网口、串口三种方式烧录OpenHarmony标准系统。本文以USB方式为例讲解烧录操作,其他两种烧录方式请参照[Hi3516DV300烧录指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_upload-0000001052148681)。 - -### 前提条件 - -在DevEco Device Tool中[打开一个工程](https://device.harmonyos.com/cn/docs/ide/user-guides/open_project-0000001071680043),该工程文件夹选择待烧录文件所在文件夹即可。其中开发板类型固定选择Hi3516DV300,Framework选择“Hb”。 - -### 使用USB烧录 - -Hi3516DV300开发板使用USB烧录方式,支持Windows系统。如果采用的是Linux+Windows双系统,Linux系统也支持USB烧录。 - -1. 请连接好电脑和待烧录开发板,以Hi3516DV300为例,需要同时连接串口和USB口,具体可参考[Hi3516开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_3516-0000001052670587)。 -2. 打开电脑的设备管理器,查看并记录对应的串口号。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >如果对应的串口异常,请根据[Hi3516/Hi3518系列开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。 - - ![](figures/zh-cn_image_0000001160529359.png) - -3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。 - - ![](figures/2021-01-27_170334-16.png) - -4. 在**Partition Configuration**页签中,按照下表内容填写烧录文件信息,包括: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Name

-

Binary

-

Memory

-

System

-

Address

-

Length

-

Board

-

Type

-

fastboot

-

选择“u-boot-hi3516dv300_emmc.bin”

-

emmc

-

none

-

0x000000

-

0x100000

-

固定选择“hi3516dv300”

-

NA

-

boot

-

选择“uImage”

-

emmc

-

none

-

0x100000

-

0xf00000

-

NA

-

updater

-

选择“updater.img”

-

emmc

-

ext3/4

-

0x1000000

-

0x1400000

-

NA

-

misc

-

空白,不用选择

-

emmc

-

none

-

0x2400000

-

0x100000

-

NA

-

system

-

选择“system.img”

-

emmc

-

ext3/4

-

0x2500000

-

0xceb00000

-

NA

-

vendor

-

选择“vendor.img”

-

emmc

-

ext3/4

-

0xd1000000

-

0x10000000

-

NA

-

userdata

-

选择“userdata.img”

-

emmc

-

ext3/4

-

0xe1000000

-

0x5b800000

-

NA

-
- - ![](figures/zh-cn_image_0000001160527611.png) - -5. 在“hi3516dv300”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。 - - - upload\_port:选择步骤2中查询的串口号。 - - upload\_protocol:选择烧录协议,固定选择“hiburn-usb”。 - - upload\_partitions:选择待烧录的文件,包括fastboot、boot、updater、misc、system、vendor和userdata。 - - ![](figures/zh-cn_image_0000001160528243.png) - -6. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。 -7. 打开工程文件,点击![](figures/2021-01-27_170334-17.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击fastboot下的**Erase**按钮,擦除U-Boot。 - - ![](figures/zh-cn_image_0000001163045527.png) - -8. 执行**Erase**擦除操作后,显示如下提示信息时,请重启开发板(下电再上电)。 - - ![](figures/zh-cn_image_0000001114129426.png) - -9. 重新上电后,显示如下信息时,表示擦除U-Boot成功。 - - ![](figures/zh-cn_image_0000001113969536.png) - -10. 擦除完成后,点击hi3516dv300下的**Upload**按钮,启动烧录。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >如果您是第一次在工作台烧录Hi3516/Hi3518系列开发板,可能烧录失败,提示“not find the Devices”,请根据[Hi3516/Hi3518系列开发板USB驱动安装](https://device.harmonyos.com/cn/docs/ide/user-guides/usb_driver-0000001058690393)进行处理后再重新烧录。 - - ![](figures/1-18.png) - -11. 启动烧录后,界面提示如下信息时,表示烧录成功。 - - ![](figures/zh-cn_image_0000001160649343.png) - - -## 示例开发 - -恭喜!您已经完成了OpenHarmony标准系统的快速入门,接下来可[开发一个小示例](../guide/概述-10.md),进一步熟悉OpenHarmony的开发。 - diff --git "a/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244.md" "b/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244.md" index d9eb08eb1571d36406c81a16e6d0f87808885feb..70e795860fbfacc0dc0c4d9c38c453e7a5a99519 100644 --- "a/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244.md" +++ "b/zh-cn/device-dev/quick-start/\345\274\200\345\217\221\346\255\245\351\252\244.md" @@ -1,4 +1,4 @@ -# 开发步骤 +# 开发步骤 - **[Hi3861开发板](Hi3861开发板.md)** diff --git "a/zh-cn/device-dev/quick-start/\346\220\255\345\273\272Ubuntu\347\216\257\345\242\203\345\217\212\347\274\226\350\257\221\357\274\210Docker\346\226\271\345\274\217\357\274\211.md" "b/zh-cn/device-dev/quick-start/\346\220\255\345\273\272Ubuntu\347\216\257\345\242\203\345\217\212\347\274\226\350\257\221\357\274\210Docker\346\226\271\345\274\217\357\274\211.md" new file mode 100644 index 0000000000000000000000000000000000000000..2f4c97aa4a72f1a42454c7662ccfc17eab7e17d4 --- /dev/null +++ "b/zh-cn/device-dev/quick-start/\346\220\255\345\273\272Ubuntu\347\216\257\345\242\203\345\217\212\347\274\226\350\257\221\357\274\210Docker\346\226\271\345\274\217\357\274\211.md" @@ -0,0 +1,118 @@ +# 搭建Ubuntu环境及编译(Docker方式) + +- [获取标准系统源码](#section8761819202511) + - [前提条件](#section102871547153314) + - [操作步骤](#section429012478331) + +- [获取Docker环境](#section181431248132513) +- [编译](#section92391739152318) + +OpenHarmony标准系统为开发者提供的Docker环境已经将对应的编译工具链进行了封装,开发者可省略对应工具的安装。 + +>![](public_sys-resources/icon-note.gif) **说明:** +>- 在使用Docker前需要先安装Docker,Docker安装请参考[官方指导](https://docs.docker.com/engine/install/ubuntu/)。 +>- Docker方式和安装包方式二选一即可。选择Docker方式的开发者可跳过[安装包方式](搭建Ubuntu环境及编译(安装包方式).md)的内容。 + +## 获取标准系统源码 + +### 前提条件 + +1. 注册码云gitee账号。 +2. 注册码云SSH公钥,请参考[码云帮助中心](https://gitee.com/help/articles/4191)。 +3. 安装[git客户端](http://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git)和[git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading))并配置用户信息。 + + ``` + git config --global user.name "yourname" + git config --global user.email "your-email-address" + git config --global credential.helper store + ``` + +4. 安装码云repo工具,可以执行如下命令。 + + ``` + curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #如果没有权限,可下载至其他目录,并将其配置到环境变量中 + chmod a+x /usr/local/bin/repo + pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests + ``` + + +### 操作步骤 + +方式一(推荐):通过repo + ssh 下载(需注册公钥,请参考[码云帮助中心](https://gitee.com/help/articles/4191))。 + +``` +repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify +repo sync -c +repo forall -c 'git lfs pull' +``` + +方式二:通过repo + https 下载。 + +``` +repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify +repo sync -c +repo forall -c 'git lfs pull' +``` + +## 获取Docker环境 + +**方式一:从HuaweiCloud SWR上直接获取Docker镜像进行构建:** + +1. 获取Docker镜像。 + + ``` + docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 + ``` + +2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 + + ``` + docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.1 + ``` + + +**方式二:通过Dockerfile 构建本地Docker镜像进行构建** + +1. 获取Dockerfile脚本文件,用来构建本地Docker镜像。 + + ``` + git clone https://gitee.com/openharmony/docs.git + ``` + +2. 进入Dockerfile代码目录路径执行Docker镜像构建命令。 + + ``` + cd docs/docker/standard + ./build.sh + ``` + +3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 + + ``` + docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.1 + ``` + + +## 编译 + +1. 在源码的根目录执行预处理脚本。 + + ``` + ../scripts/prepare.sh + ``` + +2. 通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。 + + ``` + ./build.sh --product-name {product_name} + ``` + + \{product\_name\}为当前版本支持的平台,比如:Hi3516DV300 + + 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 + +3. 编译源码完成,请进行镜像烧录,具体请参见[镜像烧录](镜像烧录.md)。 + +>![](public_sys-resources/icon-note.gif) **说明:** +>退出Docker执行exit命令即可。 + diff --git "a/zh-cn/device-dev/quick-start/\346\220\255\345\273\272Ubuntu\347\216\257\345\242\203\345\217\212\347\274\226\350\257\221\357\274\210\345\256\211\350\243\205\345\214\205\346\226\271\345\274\217\357\274\211.md" "b/zh-cn/device-dev/quick-start/\346\220\255\345\273\272Ubuntu\347\216\257\345\242\203\345\217\212\347\274\226\350\257\221\357\274\210\345\256\211\350\243\205\345\214\205\346\226\271\345\274\217\357\274\211.md" new file mode 100644 index 0000000000000000000000000000000000000000..92eb461fe7ace1d62022113eabdd655b4d1f6788 --- /dev/null +++ "b/zh-cn/device-dev/quick-start/\346\220\255\345\273\272Ubuntu\347\216\257\345\242\203\345\217\212\347\274\226\350\257\221\357\274\210\345\256\211\350\243\205\345\214\205\346\226\271\345\274\217\357\274\211.md" @@ -0,0 +1,98 @@ +# 搭建Ubuntu环境及编译(安装包方式) + +- [安装依赖工具](#section18431165519244) +- [获取标准系统源码](#section113751052102517) + - [前提条件](#section102871547153314) + - [操作步骤](#section429012478331) + +- [执行prebuilts](#section0495320152619) +- [编译](#section1664835963517) + +## 安装依赖工具 + +安装命令如下: + +``` +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 +``` + +>![](public_sys-resources/icon-note.gif) **说明:** +>以上安装命令适用于Ubuntu18.04,其他版本请根据安装包名称采用对应的安装命令。 + +## 获取标准系统源码 + +### 前提条件 + +1. 注册码云gitee账号。 +2. 注册码云SSH公钥,请参考[码云帮助中心](https://gitee.com/help/articles/4191)。 +3. 安装[git客户端](http://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git)和[git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading))并配置用户信息。 + + ``` + git config --global user.name "yourname" + git config --global user.email "your-email-address" + git config --global credential.helper store + ``` + +4. 安装码云repo工具,可以执行如下命令。 + + ``` + curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo #如果没有权限,可下载至其他目录,并将其配置到环境变量中 + chmod a+x /usr/local/bin/repo + pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests + ``` + + +### 操作步骤 + +方式一(推荐):通过repo + ssh 下载(需注册公钥,请参考[码云帮助中心](https://gitee.com/help/articles/4191))。 + +``` +repo init -u git@gitee.com:openharmony/manifest.git -b master --no-repo-verify +repo sync -c +repo forall -c 'git lfs pull' +``` + +方式二:通过repo + https 下载。 + +``` +repo init -u https://gitee.com/openharmony/manifest.git -b master --no-repo-verify +repo sync -c +repo forall -c 'git lfs pull' +``` + +## 执行prebuilts + +在源码根目录下执行脚本,安装编译器及二进制工具。 + +``` +bash build/prebuilts_download.sh +``` + +下载的prebuilts二进制默认存放在与OpenHarmony同目录下的OpenHarmony\_2.0\_canary\_prebuilts下。 + +## 编译 + +在Linux环境进行如下操作: + +1. 进入源码根目录,执行如下命令进行版本编译。 + + ``` + ./build.sh --product-name {product_name} + ``` + + \{product\_name\}为当前版本支持的平台,比如:Hi3516DV300 + +2. 检查编译结果。编译完成后,log中显示如下: + + ``` + build system image successful. + =====build Hi3516DV300 successful. + ``` + + 编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 + + >![](public_sys-resources/icon-note.gif) **说明:** + >其他模块化编译操作,可参见[编译构建指导](../subsystems/标准系统编译构建指导.md)。 + +3. 编译源码完成,请进行镜像烧录,具体请参见[镜像烧录](镜像烧录.md)。 + diff --git "a/zh-cn/device-dev/quick-start/\346\220\255\345\273\272\347\263\273\347\273\237\347\216\257\345\242\203.md" "b/zh-cn/device-dev/quick-start/\346\220\255\345\273\272\347\263\273\347\273\237\347\216\257\345\242\203.md" index 8329e7ffd099f57833fa26a714a4a2597583b18f..73a9d50f87e5de08c775137b9864e6f02656872e 100755 --- "a/zh-cn/device-dev/quick-start/\346\220\255\345\273\272\347\263\273\347\273\237\347\216\257\345\242\203.md" +++ "b/zh-cn/device-dev/quick-start/\346\220\255\345\273\272\347\263\273\347\273\237\347\216\257\345\242\203.md" @@ -1,4 +1,4 @@ -# 搭建系统环境 +# 搭建系统环境 - **[概述](概述-0.md)** diff --git "a/zh-cn/device-dev/quick-start/\346\240\207\345\207\206\347\263\273\347\273\237\345\205\245\351\227\250.md" "b/zh-cn/device-dev/quick-start/\346\240\207\345\207\206\347\263\273\347\273\237\345\205\245\351\227\250.md" index 6c5d5731272e16d42afd0fb49e2e856b8bfc0911..0281a27a47be0f03dcb2595968a0377c5e65f554 100755 --- "a/zh-cn/device-dev/quick-start/\346\240\207\345\207\206\347\263\273\347\273\237\345\205\245\351\227\250.md" +++ "b/zh-cn/device-dev/quick-start/\346\240\207\345\207\206\347\263\273\347\273\237\345\205\245\351\227\250.md" @@ -1,9 +1,15 @@ # 标准系统入门 -- **[概述](概述-7.md)** +- **[入门介绍](入门介绍.md)** -- **[环境搭建](环境搭建.md)** +- **[Windows开发环境准备](Windows开发环境准备-7.md)** -- **[开发步骤](开发步骤-12.md)** +- **[搭建Ubuntu环境及编译(Docker方式)](搭建Ubuntu环境及编译(Docker方式).md)** + +- **[搭建Ubuntu环境及编译(安装包方式)](搭建Ubuntu环境及编译(安装包方式).md)** + +- **[镜像烧录](镜像烧录.md)** + +- **[常见问题](常见问题-8.md)** diff --git "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-0.md" "b/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-0.md" index 9438a5709543f609e8be3c31d3b142ad6bedacc3..1ef79df37bfea75bd726e0a20b273f7b8c01fd80 100644 --- "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-0.md" +++ "b/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-0.md" @@ -1,4 +1,4 @@ -# 概述 +# 概述 OpenHarmony可以使用DevEco Device Tool进行开发、编译、烧录、调测等。 diff --git "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-6.md" "b/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-6.md" deleted file mode 100644 index 8551ab5722f57062a695c9bb4e420bb300006355..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-6.md" +++ /dev/null @@ -1,4 +0,0 @@ -# 概述 - -开发者可以通过本文快速掌握OpenHarmony标准系统的环境搭建、编译、烧录、启动等操作。本文将以当前推荐的Hi3516DV300开发板为例进行说明。 - diff --git "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-7.md" "b/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-7.md" deleted file mode 100644 index 8551ab5722f57062a695c9bb4e420bb300006355..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-7.md" +++ /dev/null @@ -1,4 +0,0 @@ -# 概述 - -开发者可以通过本文快速掌握OpenHarmony标准系统的环境搭建、编译、烧录、启动等操作。本文将以当前推荐的Hi3516DV300开发板为例进行说明。 - diff --git "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-8.md" "b/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-8.md" deleted file mode 100644 index 2dfd7a2168d9b8fc7dec01687a1c857ec9eb2282..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260-8.md" +++ /dev/null @@ -1,58 +0,0 @@ -# 概述 - -- [简介](#section18217135811916) -- [环境要求](#section466851916410) - - [硬件要求](#section19682305453) - - [软件要求](#section1595725202314) - - -## 简介 - -OpenHarmony标准系统当前可以使用DevEco Device Tool在Windows平台进行开发和烧录,使用Linux环境进行编译。本文接下来将介绍如何进行对应环境的搭建。 - ->![](public_sys-resources/icon-note.gif) **说明:** ->OpenHarmony标准系统的Windows开发环境准备跟轻量和小型系统的对应操作一致,所以完成轻量和小型系统Windows开发环境准备的开发者可以跳过本文[第2章节](Windows开发环境准备-9.md)。 - -## 环境要求 - -### 硬件要求 - -- Linux服务器 -- Windows工作台(主机电脑) - -### 软件要求 - -**表 1** 开发平台要求 - - - - - - - - - - - - - - - - - - -

平台

-

软件

-

描述

-

备注

-

Linux编译服务器

-

操作系统

-

Ubuntu18.04及以上64位系统版本,Shell使用bash。服务器硬件规格要求见下:

-
  • 硬盘:至少400G
  • CPU:至少8核
  • 内存:至少32G
-

通常系统默认安装samba、vim等常用软件,需要做适当适配以支持Linux文件共享。

-

开发人员可以在Windows工作台中进行程序开发,或者远程登录到Linux服务器进行程序开发。

-

Windows工作台

-

操作系统

-

Windows XP/Windows7/Windows10

-
- diff --git "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260.md" "b/zh-cn/device-dev/quick-start/\346\246\202\350\277\260.md" index 426a8d9fbd55e2545bda64c889619c160e561059..32de2be933c176263c569c82662acf43a574ba93 100644 --- "a/zh-cn/device-dev/quick-start/\346\246\202\350\277\260.md" +++ "b/zh-cn/device-dev/quick-start/\346\246\202\350\277\260.md" @@ -1,4 +1,4 @@ -# 概述 +# 概述 OpenHarmony轻量和小型系统适用于内存较小的IOT设备,本文选取了三款典型开发板:Hi3861 WLAN模组、Hi3516DV300、Hi3518EV300,并基于上述三款开发板进行开发介绍。 diff --git "a/zh-cn/device-dev/quick-start/\347\216\257\345\242\203\346\220\255\345\273\272.md" "b/zh-cn/device-dev/quick-start/\347\216\257\345\242\203\346\220\255\345\273\272.md" deleted file mode 100644 index 299cbb9c175b6842abb2c36091dab1a64049a70d..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\347\216\257\345\242\203\346\220\255\345\273\272.md" +++ /dev/null @@ -1,11 +0,0 @@ -# 环境搭建 - -- **[概述](概述-8.md)** - -- **[Windows开发环境准备](Windows开发环境准备-9.md)** - -- **[Ubuntu编译环境准备](Ubuntu编译环境准备-10.md)** - -- **[常见问题](常见问题-11.md)** - - diff --git "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS-4.md" "b/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS-4.md" deleted file mode 100755 index 6e33d9e8e9014487b3a4f82893d3ef1e61fa22ef..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS-4.md" +++ /dev/null @@ -1,264 +0,0 @@ -# 运行Hello OHOS - -- [新建应用程序](#section1550972416485) -- [编译](#section234175193114) -- [烧录](#section7609155824819) -- [镜像运行](#section17612105814480) -- [下一步学习](#section9712145420182) - -本节指导开发者在单板上运行第一个应用程序,其中包括新建应用程序、编译、烧写、运行等步骤,最终输出“Hello OHOS!”。 - -## 新建应用程序 - -1. 新建目录及源码 - - 新建**applications/sample/camera/apps/src/helloworld.c**目录及文件,代码如下所示,用户可以自定义修改打印内容(例如:修改OHOS为World)。当前应用程序可支持标准C及C++的代码开发。 - - ``` - #include - - int main(int argc, char **argv) - { - printf("\n************************************************\n"); - printf("\n\t\tHello OHOS!\n"); - printf("\n************************************************\n\n"); - - return 0; - } - ``` - -2. 新建编译组织文件 - - 新建**applications/sample/camera/apps/BUILD.gn**文件,内容如下所示: - - ``` - 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. 添加新组件 - - 修改文件**build/lite/components/applications.json**,添加组件hello\_world\_app的配置,如下所示为applications.json文件片段,"\#\#start\#\#"和"\#\#end\#\#"之间为新增配置("\#\#start\#\#"和"\#\#end\#\#"仅用来标识位置,添加完配置后删除这两行): - - ``` - { - "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. 修改单板配置文件 - - 修改文件**vendor/hisilicon/hispark\_aries/config.json**,新增hello\_world\_app组件的条目,如下所示代码片段为applications子系统配置,"\#\#start\#\#"和"\#\#end\#\#"之间为新增条目("\#\#start\#\#"和"\#\#end\#\#"仅用来标识位置,添加完配置后删除这两行): - - ``` - { - "subsystem": "applications", - "components": [ - ##start## - { "component": "hello_world_app", "features":[] }, - ##end## - { "component": "camera_sample_app", "features":[] } - - ] - }, - ``` - - -## 编译 - -如果Linux编译环境通过Docker方式安装,具体编译过程请参见[Docker方式获取编译环境](../get-code/获取工具.md)的编译操作。如果Linux编译环境通过软件包方式安装,进入源码根目录,执行如下命令进行编译: - -``` -hb set(设置编译路径) -.(选择当前路径) -选择ipcamera_hispark_aries@hisilicon并回车 -hb build -f(执行编译) -``` - -结果文件生成在out/hispark\_aries/ipcamera\_hispark\_aries目录下。 - -**图 1** 设置图例 -![](figures/设置图例-4.png "设置图例-4") - ->![](public_sys-resources/icon-notice.gif) **须知:** ->Hi3518EV300单板的U-boot文件获取路径:device/hisilicon/hispark\_aries/sdk\_liteos/uboot/out/boot/u-boot-hi3518ev300.bin - -## 烧录 - -Hi3518开发板的代码烧录仅支持USB烧录方式。 - -1. 请连接好电脑和待烧录开发板,以Hi3518EV300为例,需要同时连接串口和USB口,具体可参考[Hi3518开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_hi3518-0000001050170473)。 -2. 打开电脑的设备管理器,查看并记录对应的串口号。 - - >![](public_sys-resources/icon-note.gif) **说明:** - >如果对应的串口异常,请根据[Hi3516/Hi3518系列开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。 - - ![](figures/zh-cn_image_0000001073057176.png) - -3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。 - - ![](figures/zh-cn_image_0000001077956808.png) - -4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3518系列开发板进行适配,无需单独修改。 -5. 在“hi3518ev300”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。 - - - upload\_port:选择步骤[2](#zh-cn_topic_0000001057313128_li46411811196)中查询的串口号。 - - upload\_protocol:选择烧录协议,固定选择“hiburn-usb”。 - - upload\_partitions:选择待烧录的文件,默认情况下会同时烧录fastboot、kernel、rootfs和userfs。 - - ![](figures/zh-cn_image_0000001096963405.png) - -6. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。 -7. 打开工程文件,点击![](figures/2021-01-27_170334-5.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击hi3518ev300\_fastboot下的**Erase**按钮,擦除U-Boot。 - - ![](figures/2021-01-27_181047.png) - - ![](figures/zh-cn_image_0000001163529159.png) - -8. 执行**Erase**擦除操作后,显示如下提示信息时,请重启开发板(下电再上电)。 - - ![](figures/zh-cn_image_0000001078089378.png) - -9. 重新上电后,显示如下信息时,表示擦除U-Boot成功。 - - ![](figures/zh-cn_image_0000001073835952.png) - -10. 擦除完成后,点击hi3518ev300下的**Upload**按钮,启动烧录。 - - ![](figures/zh-cn_image_0000001163568181.png) - -11. 启动烧录后,界面提示如下信息时,表示烧录成功。 - - ![](figures/zh-cn_image_0000001073242197.png) - - -## 镜像运行 - -1. 连接串口。 - - >![](public_sys-resources/icon-notice.gif) **须知:** - >若无法连接串口,请参考[常见问题](../quick-start/常见问题-5.md)进行排查。 - - **图 2** 连接串口图 - - - ![](figures/chuankou1-6.png) - - 1. 单击**Monitor**打开串口。 - 2. 连续输入回车直到串口显示"hisilicon"。 - 3. 单板初次启动或修改启动参数,请进入[步骤2](#li9441185382314),否则进入[步骤3](#li6442853122312)。 - -2. (初次烧写必选)修改U-boot的bootcmd及bootargs内容:该步骤为固化操作,可保存执行结果,但U-boot重新烧入,则需要再次执行下述步骤。 - - **表 1** U-boot修改命令 - - - - - - - - - - - - - - - - - - - - - - -

执行命令

-

命令解释

-

setenv bootcmd "sf probe 0;sf read 0x40000000 0x100000 0x600000;go 0x40000000";

-

设置bootcmd内容,选择FLASH器件0,读取FLASH起始地址为0x100000,大小为0x600000字节的内容到0x40000000的内存地址,此处0x600000为6MB,与IDE中填写OHOS_Image.bin的文件大小必须相同

-

setenv bootargs "console=ttyAMA0,115200n8 root=flash fstype=jffs2 rw rootaddr=7M rootsize=8M";

-

表示设置bootargs参数为串口输出,波特率为115200,数据位8,rootfs挂载于FLASH上,文件系统类型为jffs2 rw,以支持可读写JFFS2文件系统。“rootaddr=7M rootsize=8M”处对应填入实际rootfs.img的烧写起始位置与长度,与IDE内所填大小必须相同

-

saveenv

-

表示保存当前配置。

-

reset

-

表示复位单板。

-

pri

-

表示查看显示参数。

-
- - >![](public_sys-resources/icon-notice.gif) **须知:** - >**“go 0x40000000”**为可选指令,默认配置已将该指令固化在启动参数中,单板复位后可自动启动。若想切换为手动启动,可在U-boot启动倒数阶段使用"回车"打断自动启动。 - -3. 若启动时显示**"hisilicon \#**字样,请输入**“reset”**指令,等待系统自启动进入系统,系统启动后,显示**“OHOS”**字样,输入**”./bin/helloworld”**并回车,显示成功结果如下图所示。 - - **图 3** 启动成功并执行应用程序图 - ![](figures/启动成功并执行应用程序图.png "启动成功并执行应用程序图") - - -## 下一步学习 - -恭喜您,已完成Hi3518的快速上手!建议您下一步进入[无屏摄像头产品开发](../guide/摄像头控制.md)的学习 。 - diff --git "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS-5.md" "b/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS-5.md" index c0146d09136cde8e590603813306b64ed1ec961f..51873c97ac3662e15356d6350e6da77ed10fc7c0 100644 --- "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS-5.md" +++ "b/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS-5.md" @@ -1,4 +1,4 @@ -# 运行Hello OHOS +# 运行Hello OHOS - [新建应用程序](#section1550972416485) - [编译](#section234175193114) @@ -128,7 +128,7 @@ ## 编译 -如果Linux编译环境通过Docker方式安装,具体编译过程请参见[Docker方式获取编译环境](../get-code/获取工具.md)的编译操作。如果Linux编译环境通过软件包方式安装,进入源码根目录,执行如下命令进行编译: +如果Linux编译环境通过Docker方式安装,具体编译过程请参见[Docker方式获取编译环境](../get-code/Docker编译环境.md)的编译操作。如果Linux编译环境通过软件包方式安装,进入源码根目录,执行如下命令进行编译: ``` hb set(设置编译路径) @@ -149,17 +149,17 @@ hb build -f(执行编译) Hi3518开发板的代码烧录仅支持USB烧录方式。 -1. 请连接好电脑和待烧录开发板,以Hi3518EV300为例,需要同时连接串口和USB口,具体可参考[Hi3518开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_hi3518-0000001050170473)。 +1. 请连接好电脑和待烧录开发板,以Hi3518EV300为例,需要同时连接串口和USB口,具体可参考[Hi3518开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3518-0000001105201138)。 2. 打开电脑的设备管理器,查看并记录对应的串口号。 >![](public_sys-resources/icon-note.gif) **说明:** >如果对应的串口异常,请根据[Hi3516/Hi3518系列开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。 - ![](figures/zh-cn_image_0000001073057176.png) + ![](figures/zh-cn_image_0000001128470900.png) 3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。 - ![](figures/zh-cn_image_0000001077956808.png) + ![](figures/zh-cn_image_0000001174350649.png) 4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3518系列开发板进行适配,无需单独修改。 5. 在“hi3518ev300”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。 @@ -168,28 +168,28 @@ Hi3518开发板的代码烧录仅支持USB烧录方式。 - upload\_protocol:选择烧录协议,固定选择“hiburn-usb”。 - upload\_partitions:选择待烧录的文件,默认情况下会同时烧录fastboot、kernel、rootfs和userfs。 - ![](figures/zh-cn_image_0000001096963405.png) + ![](figures/zh-cn_image_0000001128311090.png) 6. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。 7. 打开工程文件,点击![](figures/2021-01-27_170334-5.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击hi3518ev300\_fastboot下的**Erase**按钮,擦除U-Boot。 - ![](figures/zh-cn_image_0000001163529159.png) + ![](figures/zh-cn_image_0000001174270731.png) 8. 执行**Erase**擦除操作后,显示如下提示信息时,请重启开发板(下电再上电)。 - ![](figures/zh-cn_image_0000001078089378.png) + ![](figures/zh-cn_image_0000001128311092.png) 9. 重新上电后,显示如下信息时,表示擦除U-Boot成功。 - ![](figures/zh-cn_image_0000001073835952.png) + ![](figures/zh-cn_image_0000001128311094.png) 10. 擦除完成后,点击hi3518ev300下的**Upload**按钮,启动烧录。 - ![](figures/zh-cn_image_0000001163568181.png) + ![](figures/zh-cn_image_0000001174350641.png) 11. 启动烧录后,界面提示如下信息时,表示烧录成功。 - ![](figures/zh-cn_image_0000001073242197.png) + ![](figures/zh-cn_image_0000001174350643.png) ## 镜像运行 diff --git "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS.md" "b/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS.md" index 68de0b2b57b40a4f61aaebfbe2a3ec50870bb9e2..d5f775c64f385feec6cdc67c211ee5978397aca7 100755 --- "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS.md" +++ "b/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-OHOS.md" @@ -1,4 +1,4 @@ -# 运行Hello OHOS +# 运行Hello OHOS - [新建应用程序](#section204672145202) - [编译](#section1077671315253) @@ -129,7 +129,7 @@ ## 编译 -如果Linux编译环境通过Docker方式安装,具体编译过程请参见[Docker方式获取编译环境](../get-code/获取工具.md)的编译操作。如果Linux编译环境通过软件包方式安装,请进入源码根目录,执行如下命令进行编译: +如果Linux编译环境通过Docker方式安装,具体编译过程请参见[Docker方式获取编译环境](../get-code/Docker编译环境.md)的编译操作。如果Linux编译环境通过软件包方式安装,请进入源码根目录,执行如下命令进行编译: ``` hb set(设置编译路径) @@ -150,13 +150,13 @@ hb build -f(执行编译) Hi3516开发板的代码烧录支持USB烧录、网口烧录和串口烧录三种方式。此处仅以网口烧录为例进行说明。 -1. 请连接好电脑和待烧录开发板,以Hi3516DV300为例,需要同时连接串口、网口和电源,具体可参考[Hi3516开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_3516-0000001052670587)。 +1. 请连接好电脑和待烧录开发板,以Hi3516DV300为例,需要同时连接串口、网口和电源,具体可参考[Hi3516开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3516-0000001152041033)。 2. 打开电脑的设备管理器,查看并记录对应的串口号。 >![](public_sys-resources/icon-note.gif) **说明:** >如果对应的串口异常,请根据[Hi3516/Hi3518系列开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。 - ![](figures/zh-cn_image_0000001114129428.png) + ![](figures/zh-cn_image_0000001174350647.png) 3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。 @@ -169,7 +169,7 @@ Hi3516开发板的代码烧录支持USB烧录、网口烧录和串口烧录三 - upload\_protocol:选择烧录协议,固定选择“hiburn-net”。 - upload\_partitions:选择待烧录的文件,默认情况下会同时烧录fastboot、kernel、rootfs和userfs。 - ![](figures/zh-cn_image_0000001160529355.png) + ![](figures/zh-cn_image_0000001128470904.png) 6. 检查和设置连接开发板后的网络适配器的IP地址信息,设置方法请参考[设置Hi3516网口烧录的IP地址信息](https://device.harmonyos.com/cn/docs/ide/user-guides/set_ipaddress-0000001141825075)。 7. 设置网口烧录的IP地址信息,设置如下选项: @@ -179,20 +179,20 @@ Hi3516开发板的代码烧录支持USB烧录、网口烧录和串口烧录三 - upload\_net\_client\_gw:设置开发板的网关,工具会自动根据选择的upload\_net\_server\_ip进行设置。例如192.168.1.1 - upload\_net\_client\_ip:设置开发板的IP地址,工具会自动根据选择的upload\_net\_server\_ip进行设置。例如192.168.1.3 - ![](figures/zh-cn_image_0000001117463460.png) + ![](figures/zh-cn_image_0000001174270733.png) 8. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。 9. 打开工程文件,点击![](figures/2021-01-27_170334-2.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击hi3516dv300下的**Upload**按钮,启动烧录。 - ![](figures/zh-cn_image_0000001116405268.png) + ![](figures/zh-cn_image_0000001174270729.png) 10. 启动烧录后,显示如下提示信息时,请重启开发板(下电再上电)。 - ![](figures/zh-cn_image_0000001114129432.png) + ![](figures/zh-cn_image_0000001128470906.png) 11. 重新上电后,启动烧录,界面提示如下信息时,表示烧录成功。 - ![](figures/zh-cn_image_0000001113969542.png) + ![](figures/zh-cn_image_0000001128311098.png) ## 镜像运行 diff --git "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-World.md" "b/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-World.md" index 74887e1fd4aa4672b99a9e4dd23ec41c644c649b..f428ec411ee4fc51d1be00be263867d1f8f8dc74 100755 --- "a/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-World.md" +++ "b/zh-cn/device-dev/quick-start/\350\277\220\350\241\214Hello-World.md" @@ -1,4 +1,4 @@ -# 运行Hello World +# 运行Hello World - [修改源码](#section79601457101015) - [调测验证](#section1621064881419) @@ -137,7 +137,7 @@ Call Stack 6 -- 3f5e24 addr:f78fc 3. 根据以上调用栈信息,可以定位WadRecvCB函数中出现了异常。 - ![](figures/zh-cn_image_0000001152256221.png) + ![](figures/zh-cn_image_0000001174270737.png) 4. 完成代码排查及修改。 diff --git "a/zh-cn/device-dev/quick-start/\351\225\234\345\203\217\347\203\247\345\275\225.md" "b/zh-cn/device-dev/quick-start/\351\225\234\345\203\217\347\203\247\345\275\225.md" new file mode 100644 index 0000000000000000000000000000000000000000..3fca75cfcd0691990f88acac3e1f32ac98528a08 --- /dev/null +++ "b/zh-cn/device-dev/quick-start/\351\225\234\345\203\217\347\203\247\345\275\225.md" @@ -0,0 +1,201 @@ +# 镜像烧录 + +- [下一步](#section5600113114323) + +标准系统烧录,在V2.2 Beta1及以上版本支持。 + +Hi3516DV300支持烧录标准系统,其烧录方式包括网口烧录和串口烧录三种方式,其中: + +- **Windows系统:支持网口烧录和串口烧录** +- **Linux系统:支持串口烧录和网口烧录。** + +同一种烧录方式(如网口烧录),在Windows和Linux环境下的烧录操作完全一致,区别仅在于DevEco Device Tool环境搭建不同。 + +>![](public_sys-resources/icon-note.gif) **说明:** +>当前Hi3516DV300开发板支持通过网口、USB、串口三种方式烧录OpenHarmony标准系统。本文以网口方式为例讲解烧录操作,其他两种烧录方式请参照[Hi3516DV300烧录指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_upload-0000001052148681)。 + +### 前提条件 + +在DevEco Device Tool中[打开一个工程](https://device.harmonyos.com/cn/docs/ide/user-guides/open_project-0000001071680043),该工程文件夹选择待烧录文件所在文件夹即可。其中开发板类型固定选择Hi3516DV300,Framework选择“Hb”。 + +### 使用网口烧录 + +Hi3516DV300开发板使用网口录方式,支持Windows和Linux系统。 + +1. 请连接好电脑和待烧录开发板,需要同时连接串口、网口和电源,具体可参考[Hi3516DV300开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3516-0000001152041033)。 +2. 打开电脑的设备管理器,查看并记录对应的串口号。 + + >![](public_sys-resources/icon-note.gif) **说明:** + >如果对应的串口异常,请根据[Hi3516DV300/Hi3518EV300开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。 + + ![](figures/zh-cn_image_0000001114129428.png) + +3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。 + + ![](figures/2021-01-27_170334-17.png) + +4. 在**Partition Configuration**页签中,按照下表内容填写烧录文件信息,包括: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

+

Binary

+

Memory

+

System

+

Address

+

Length

+

Board

+

Type

+

fastboot

+

选择“u-boot-hi3516dv300_emmc.bin”

+

emmc

+

none

+

0x000000

+

0x100000

+

固定选择“hi3516dv300”

+

NA

+

boot

+

选择“uImage”

+

emmc

+

none

+

0x100000

+

0xf00000

+

NA

+

updater

+

选择“updater.img”

+

emmc

+

ext3/4

+

0x1000000

+

0x1400000

+

NA

+

misc

+

空白,不用选择

+

emmc

+

none

+

0x2400000

+

0x100000

+

NA

+

system

+

选择“system.img”

+

emmc

+

ext3/4

+

0x2500000

+

0xceb00000

+

NA

+

vendor

+

选择“vendor.img”

+

emmc

+

ext3/4

+

0xd1000000

+

0x10000000

+

NA

+

userdata

+

选择“userdata.img”

+

emmc

+

ext3/4

+

0xe1000000

+

0x5b800000

+

NA

+
+ + ![](figures/zh-cn_image_0000001130584312.png) + +5. 在“hi3516dv300”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。 + + - upload\_port:选择步骤[2](#zh-cn_topic_0000001056443961_li1050616379507)中查询的串口号。 + - upload\_protocol:选择烧录协议,固定选择“hiburn-net”。 + - upload\_partitions:选择待烧录的文件,包括fastboot、boot、updater、misc、system、vendor和userdata。 + + ![](figures/zh-cn_image_0000001117621400.png) + +6. 检查和设置连接开发板后的网络适配器的IP地址信息,设置方法请参考[设置Hi3516DV300网口烧录的IP地址信息](https://device.harmonyos.com/cn/docs/ide/user-guides/set_ipaddress-0000001141825075)。 +7. 设置网口烧录的IP地址信息,设置如下选项: + + - upload\_net\_server\_ip:选择步骤6中设置的IP地址信息。例如192.168.1.2 + - upload\_net\_client\_mask:设置开发板的子网掩码,工具会自动根据选择的upload\_net\_server\_ip进行设置。例如255.255.255.0 + - upload\_net\_client\_gw:设置开发板的网关,工具会自动根据选择的upload\_net\_server\_ip进行设置。例如192.168.1.1 + - upload\_net\_client\_ip:设置开发板的IP地址,工具会自动根据选择的upload\_net\_server\_ip进行设置。例如192.168.1.3 + + ![](figures/zh-cn_image_0000001117463460.png) + +8. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。 +9. 启动烧录后,显示如下提示信息时,请重启开发板(下电再上电)。 + + ![](figures/zh-cn_image_0000001114129432.png) + +10. 重新上电后,启动烧录,界面提示如下信息时,表示烧录成功。 + + ![](figures/zh-cn_image_0000001113969542.png) + + +## 下一步 + +恭喜!您已经完成了OpenHarmony标准系统的快速入门,接下来可[开发一个小示例](../guide/时钟应用开发示例.md),进一步熟悉OpenHarmony的开发。 + diff --git "a/zh-cn/device-dev/quick-start/\351\251\261\345\212\250\345\274\200\345\217\221\347\244\272\344\276\213.md" "b/zh-cn/device-dev/quick-start/\351\251\261\345\212\250\345\274\200\345\217\221\347\244\272\344\276\213.md" index ae2c5d1108fb1ba6469b6fc18543567b2208bb6c..f9eb065a5d8f0b372e670919a8ed6b89681dbb90 100755 --- "a/zh-cn/device-dev/quick-start/\351\251\261\345\212\250\345\274\200\345\217\221\347\244\272\344\276\213.md" +++ "b/zh-cn/device-dev/quick-start/\351\251\261\345\212\250\345\274\200\345\217\221\347\244\272\344\276\213.md" @@ -1,4 +1,4 @@ -# 驱动开发示例 +# 驱动开发示例 - [驱动程序介绍](#s8efc1952ebfe4d1ea717182e108c29bb) - [编译和烧写](#section660016185110) diff --git a/zh-cn/device-dev/subsystems/Readme-CN.md b/zh-cn/device-dev/subsystems/Readme-CN.md index a1c06756966a069dbf7a6b9c697d6c2fa2cb62c5..3032d57b57d4c11908aae5e450f92382b11bd886 100755 --- a/zh-cn/device-dev/subsystems/Readme-CN.md +++ b/zh-cn/device-dev/subsystems/Readme-CN.md @@ -71,7 +71,6 @@ - [应用验签开发指导](应用验签开发指导.md) - [应用权限管理开发指导](应用权限管理开发指导.md) - [IPC通信鉴权开发指导](IPC通信鉴权开发指导.md) - - [可信设备群组管理开发指导](可信设备群组管理开发指导.md) - [启动恢复](启动恢复.md) - [启动恢复子系统概述](启动恢复子系统概述.md) diff --git "a/zh-cn/device-dev/subsystems/\345\217\257\344\277\241\350\256\276\345\244\207\347\276\244\347\273\204\347\256\241\347\220\206\345\274\200\345\217\221\346\214\207\345\257\274.md" "b/zh-cn/device-dev/subsystems/\345\217\257\344\277\241\350\256\276\345\244\207\347\276\244\347\273\204\347\256\241\347\220\206\345\274\200\345\217\221\346\214\207\345\257\274.md" deleted file mode 100755 index bf9fb41b5170c999b590ae30bfa2c91e1aaa2d30..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/subsystems/\345\217\257\344\277\241\350\256\276\345\244\207\347\276\244\347\273\204\347\256\241\347\220\206\345\274\200\345\217\221\346\214\207\345\257\274.md" +++ /dev/null @@ -1,264 +0,0 @@ -# 可信设备群组管理开发指导 - -- [场景介绍](#section18502174174019) -- [接口说明](#section1633115419401) -- [开发步骤](#section17516229192313) -- [调测验证](#section427316292411) - -## 场景介绍 - -当分布式业务需要利用软总线提供的设备间安全会话通信时,可以使用可信设备群组管理服务在设备间创建可信群组。在OpenHarmony下提供异账号下基于PIN、二维码、碰一碰等设备认证能力和同华为账号群组下的设备认证能力,分布式应用可基于该能力建立和使用设备间的安全可信关系。对于未登录华为账号的设备,可以通过PIN码输入、二维码扫描后获取的设备连接信息和PIN码信息,再通过可信设备群组管理提供的群组创建,群组成员添加,主动建立设备间可信关系;在有其它业务应用已经创建并分享了设备可信群组的情况下或者登录了相同的华为账号后,也可以通过可信设备群组管理提供的查询能力,复用这些可信群组。 - -## 接口说明 - -可信群组管理组件当前提供innerkits接口,仅供系统应用调用,相关接口及功能描述如下: - -**表 1** 群组管理器提供的JAVA API接口功能介绍 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

接口名

-

描述

-

public static DeviceGroupManager getInstance(Abilityability, StringappID, IHichainGroupCallbackcallbackHandler)

-

获取群组管理的实例,并注册一个请求的listen回调。

-

int createGroup(String appId, String groupName, int groupType, String groupInfo)

-

创建一个可信群组。

-

public int deleteGroup(String gourpId)

-

删除一个可信群组。

-

public String getLocalConnectInfo()

-

获取本地设备的网络连接信息。

-

int addMemberToGroup(String appId, long requestId, String addParams, String connectParams, int groupType)

-

添加成员到指定群组ID的可信群组。

-

int deleteMemberFromGroup(String appId, long requestId, String deleteParams, String connectParams)

-

从指定群组里删除可信成员。

-

int cancelRequest(long requestId)

-

取消正在进行的请求,如添加成员,删除成员。

-

List<String> listJoinedGroups(int groupType)

-

查询指定群组类型下本设备加入的群组信息列表。

-

List<String> listTrustedDevices(String groupId)

-

查询指定群组里可信设备的信息列表。

-

boolean isDeviceInGroup(String groupId, String deviceId)

-

查询指定设备ID的设备是否加入了指定ID的群组。

-

List<String> getGroupInfo(String queryParams)

-

根据输入参数,查询符合条件的群组的信息列表。

-

int setFriendsList(String groupId, List<String> friendsList)

-

向指定ID的群组,添加群组访问的友元名单

-

List<String> getFriendsList(String groupId)

-

获取指定群组里的友元名单

-

int registerGroupNotice(String groupId, IHichainGroupChangeListener groupChangeListener)

-

注册指定群组发生变化的回调listen

-

int revokeGroupNotice(String groupId)

-

取消对指定群组变化的listen

-
- -**表 2** 群组管理器提供的C++ API,供内部系统应用通过SA查询群组信息; - - - - - - - - - - - - - - - - - - - - - - -

接口名

-

描述

-

DeviceAuthProxy()

-

获取一个可信群组管理代理的实例。

-

~DeviceAuthProxy()

-

可信群组管理代理的实例的析构函数。

-

static int CheckAccessToGroup(const std::string &groupId, const std::string &pkgName);

-

判断指定包名的应用,是否对指定群组具有访问权限。

-

static int CheckAccessToDevice(const std::string &connDeviceId, const std::string &pkgName);

-

判断指定包名的应用,对指定的设备所加入的群组,是否具有访问权限。

-

static std::vector<std::string> GetRelatedGroupInfo(const std::string &connDeviceId);

-

获取指定ID的设备与本地设备存在可信管理的所有群组的基本信息。

-
- -## 开发步骤 - -群组管理的开发步骤比较简单,大体的流程就是先获取一个实例,获取实例的同时就注册了群组操作结果的通知回调,获取到实例后就可以对群组进行成员的添加、删除和群组的友元设置以及群组的相关的查询操作。 - -**场景一** 创建群组,下面首先以创建群组为例,说明群组管理类的创建以及接口使用方法: - -``` -private HwDeviceGroupManager hwDeviceGroupManager; -... -private HichainGroupCallback groupCallbackByA = new HichainGroupCallback() { - @Override public void onFinish(long requestId, GroupOperation operationCode, String returnData) { - - } - @Override public void onError(long requestId, GroupOperation operationCode, int errorCode, String errorReturn) { - - } - @Override public String onRequest(long requestId, GroupOperation operationCode, String reqParams) { - JSONObject onRequestJson = generateConfirmation(REQUEST_ACCEPTED); - return onRequestJson.toString(); - } -}; -... -Optional context = convertAbilityToContext(mAbility); -Context ctxt = context.get(); -hwDeviceGroupManager = HwDeviceGroupManager.getInstance(ctxt, APP_ID, groupCallbackByA); -int ret = hwDeviceGroupManager.createGroup(APP_ID, GROUP_NAME, GROUP_TYPE, GROUP_INFO); -``` - -1. 在类成员里申明群组管理实例的私有成员变量 - - ``` - private HwDeviceGroupManager hwDeviceGroupManager; - ``` - -2. 创建一个群组管理操作回调; - - ``` - private HichainGroupCallback groupCallbackByA = new HichainGroupCallback(); - ``` - -3. 在构造函数里创建一个群组管理的实例, 在分布式场景中,位于不同设备的同业务应用,应该设置相同的APP\_ID; - - ``` - hwDeviceGroupManager = HwDeviceGroupManager.getInstance(ctxt, APP_ID, groupCallbackByA); - ``` - -4. 调用createGroup创建一个群组,当函数返回为0,在表明创建群组的请求已正确提交; - - ``` - int ret = hwDeviceGroupManager.createGroup(APP_ID, GROUP_NAME, GROUP_TYPE, GROUP_INFO); - ``` - -5. 群组创建成功,会收到一个onFinish的回调,回调函数中operationCode参数为OperationCode.CREATE, 表明是创建群组操作,returnData为Json格式数据,会包含一个“groupId”的字段,返回创建的群组的Id值。 - -**场景二** 添加成员,在创建群组后,我们希望把目标设备经过设备认证加入到群组中,后续就可以通过软总线向目标设备发起可信的加密通信; - -``` -deviceGroupManager = DeviceGroupManager.getInstance(mAbility, APP_ID, hichainGroupCallback); -private static final String CONN_PARAM ="{\"DEVICE_ID\":\"11111111\",\"WIFI_IP\":\"192.168.43.149\",\"WIFI_PORT\":\"30000\",\"BLE_MAC\":\"\"}"; -private static final String ADD_PARAM ="{\"groupId\":\"344C1C8B149\",\"groupName\":\"myGroup\",\"addId\":\"11111111\",\"isAdmin\":\"false\"}"; -private static final int GROUP_TYPE = 256; -int result = deviceGroupManager.addMemberToGroup(APP_ID, reqId, ADD_PARAM, CONN_PARAM, GROUP_TYPE); -``` - -1. 获取群组管理的实例; - - ``` - deviceGroupManager = HwDeviceGroupManager.getInstance(mAbility, APP_ID, hichainGroupCallback); - ``` - -2. 设置添加成员的网络连接参数,为JSON格式,为软总线支持的网络参数字段,包括WIFI\_IP,WIFI\_PORT,BLR\_MAC,DEVICE\_ID等,具体连接参数要求参见软总线; - - ``` - String CONN_PARAM ="{\"DEVICE_ID\":\"11111111\",\"WIFI_IP\":\"192.168.43.149\",\"WIFI_PORT\":\"30000\",\"BLE_MAC\":\"\"}"; - ``` - -3. 设置添加成员的成员信息参数,为JSON格式,包括欲添加的群组ID,群组名,是否是管理员,若是主动邀请对方加入,则isAdmin字段为true,若是主动加入对方群组,则isAdmin为false - - ``` - String ADD_PARAM ="{\"groupId\":\"344C1C8B149\",\"groupName\":\"myGroup\",\"addId\":\"11111111\",\"isAdmin\":\"false\"}"; - ``` - -4. 设置欲添加的群组的群组类型为256,即点对点群组; - - ``` - private static final int GROUP_TYPE = 256; - ``` - -5. 在HichainGroupCallback 的onRequest函数,参见场景一列出的generateConfirmation传入指定的参数,其中PIN\_CODE为为PIN码,由上层业务提供界面给用户输入,确保分布式场景两端设置的PIN码一致,后续步骤才能成功; - - ``` - private JSONObject generateConfirmation(int confirmation) { - JSONObject jsonObject = new JSONObject(); - try { jsonObject.put("pinCode", PIN_CODE); - jsonObject.put("confirmation", confirmation); - } catch (JSONException e) { - LogUtil.error(TAG, "" + e.getMessage()); - } - return jsonObject; - } - ``` - -6. 调用群组管理的添加成员接口 - - ``` - result = deviceGroupManager.addMemberToGroup(APP_ID, reqId, ADD_PARAM, CONN_PARAM, GROUP_TYPE); - ``` - -7. 若添加成功,将会收到HichainGroupCallback.onFinish的回调,其中operationCode参数为OperationCode.JOIN -8. 添加成员成功后,业务可以调用软总线请求创建设备间安全会话。 - -## 调测验证 - -1 在OpenHarmony上开发应用App。 - -2 根据开发指导开发,开发应用App。 - -3 执行创建群组操作,如果收到onFinish回调,代表创建群组成功。 - -4 在分布式组网的节点部署相同的App,假设当前部署的有节点A和节点B; - -5 通过上层将节点B的连接参数,通过扫码的方式,传递到节点A, - -6 节点A上App创建一个群组group1,节点A上App调用添加成员接口,将B加入到group1中,若收到HichainGroupCallback.onFinish,表明加入群组成功; - diff --git "a/zh-cn/device-dev/subsystems/\345\274\200\345\217\221\346\214\207\345\257\274-5.md" "b/zh-cn/device-dev/subsystems/\345\274\200\345\217\221\346\214\207\345\257\274-5.md" deleted file mode 100755 index cd3f58d79fd22f548f694d86830562b3494428c2..0000000000000000000000000000000000000000 --- "a/zh-cn/device-dev/subsystems/\345\274\200\345\217\221\346\214\207\345\257\274-5.md" +++ /dev/null @@ -1,11 +0,0 @@ -# 开发指导 - -- **[Modem厂商库集成指导](Modem厂商库集成指导.md)** - -- **[Modem厂商库初始化开发指导](Modem厂商库初始化开发指导.md)** - -- **[Modem业务请求及响应开发指导](Modem业务请求及响应开发指导.md)** - -- **[Modem事件上报开发指导](Modem事件上报开发指导.md)** - - diff --git "a/zh-cn/device-dev/quick-start/\345\257\274\350\257\273.md" "b/zh-cn/device-dev/\345\257\274\350\257\273.md" old mode 100755 new mode 100644 similarity index 83% rename from "zh-cn/device-dev/quick-start/\345\257\274\350\257\273.md" rename to "zh-cn/device-dev/\345\257\274\350\257\273.md" index 95d9b60b723551ddcf8f06602353ecd82d62159a..5927fe29580d014356e247e03a15a17f6a24eafb --- "a/zh-cn/device-dev/quick-start/\345\257\274\350\257\273.md" +++ "b/zh-cn/device-dev/\345\257\274\350\257\273.md" @@ -30,6 +30,9 @@ OpenHarmony也提供了一系列可选的系统组件,方便设备开发者按 ## 文档导读 +- [轻量和小型系统开发指导](#table3762949121211) +- [标准系统开发指导](#table17667535516) + **表 1** 轻量和小型系统开发指导(参考内存<128MB) @@ -45,49 +48,49 @@ OpenHarmony也提供了一系列可选的系统组件,方便设备开发者按

整体认知OpenHarmony

- +

获取开发资源

准备开发前相关资源

- +

快速入门

快速熟悉OpenHarmony环境搭建、编译、烧录、调测、运行。

-

轻量和小型系统快速入门

+

轻量和小型系统入门

基础能力使用

使用OpenHarmony提供的基础能力

- +

进阶开发

结合系统能力开发智能设备

- +

移植适配

  • 针对特定芯片做移植适配
  • 对三方库进行移植适配
- +

贡献组件

OpenHarmony贡献功能组件

- +

参考

@@ -115,49 +118,49 @@ OpenHarmony也提供了一系列可选的系统组件,方便设备开发者按

整体认知OpenHarmony

- +

获取开发资源

准备开发前相关资源

- +

快速入门

快速熟悉OpenHarmony环境搭建、编译、烧录、调测、运行。

-

标准系统快速入门

+

标准系统入门

基础能力使用

使用OpenHarmony提供的基础能力

- +

进阶开发

结合系统能力开发智能设备

- +

移植适配

对三方库进行移植适配

-

三方库移植指导

+

三方库移植指导

贡献组件

OpenHarmony贡献功能组件

- +

参考

diff --git a/zh-cn/readme.md b/zh-cn/readme.md index f645e2b6a68fd8eb388d1bef56c575628c280f95..b2c4e67dca56025dee5fa6caa3a0874b0109b258 100644 --- a/zh-cn/readme.md +++ b/zh-cn/readme.md @@ -7,7 +7,7 @@ - [Openharmony概述](OpenHarmony-Overview_zh.md) - 轻量和小型系统开发指导(参考内存<128MB) - 设备开发 - - overview:[设备开发导读](device-dev/quick-start/导读.md) + - overview:[设备开发导读](device-dev/导读.md) - quick-start:[快速入门](device-dev/quick-start/Readme-CN.md)(搭建环境、获取源码、编译、烧录等) - 开发基础能力 - Kernel:[轻量和小型系统内核](device-dev/kernel/轻量和小型系统内核.md) @@ -31,7 +31,7 @@ - 标准系统开发指导(参考内存≥128MB) - 设备开发 - - overview:[设备开发导读](device-dev/quick-start/导读.md) + - overview:[设备开发导读](device-dev/导读.md) - quick-start:[快速入门](device-dev/quick-start/Readme-CN.md)(搭建环境、获取源码、编译、烧录等) - 开发基础能力 - Kernel:[标准系统内核](device-dev/kernel/标准系统内核.md) @@ -40,7 +40,7 @@ - Security:[隐私与安全](device-dev/security/Readme-CN.md) - guide:[开发示例](device-dev/guide/Readme-CN.md) - - [时钟应用](device-dev/guide/时钟应用开发示例.md) + - [时钟应用](device-dev/guide/时钟应用开发指导.md) - [平台驱动](device-dev/guide/平台驱动开发示例.md) - [外设驱动](device-dev/guide/外设驱动开发示例.md) @@ -61,7 +61,6 @@ - media:[媒体](application-dev/media/Readme-CN.md) - connectivity:[网络与连接](application-dev/connectivity/Readme-CN.md) - js-reference:[JS参考规范](application-dev/js-reference/Readme-CN.md) -- 许可证及版权信息检查工具:[开源合规审查工具](https://gitee.com/openharmony-sig/tools_oat) - glossary:[术语](device-dev/glossary/术语.md) ## 版本更新