提交 4b1bad50 编写于 作者: D duangavin123

update 导入OpenHarmony工程

Signed-off-by: Nduangavin123 <duanxichao@huawei.com>
上级 9a1e1e46
# Overview<a name="EN-US_TOPIC_0000001191785779"></a>
# Overview<a name="EN-US_TOPIC_0000001152533331"></a>
- [System Types](#section767218232110)
- [Document Outline](#section19810171681218)
......@@ -69,7 +69,7 @@ In addition, OpenHarmony provides a series of optional system components that ca
</td>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><p id="p857711379158"><a name="p857711379158"></a><a name="p857711379158"></a>Using basic capabilities of <span id="text8928941123820"><a name="text8928941123820"></a><a name="text8928941123820"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul1577103716159"></a><a name="ul1577103716159"></a><ul id="ul1577103716159"><li><a href="kernel/kernel-lite.md">Kernel</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/security-guidelines-overall.md">Security Guidelines</a></li><li><a href="security/security-privacy-protection.md">Privacy Protection</a></li></ul>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul1577103716159"></a><a name="ul1577103716159"></a><ul id="ul1577103716159"><li><a href="kernel/kernel-lite-mini.md">HarmonyOS Kernel Development Guide (LiteOS-M)</a></li><li><a href="kernel/kernel-lite-small.md">HarmonyOS Kernel Development Guide (LiteOS-A)</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/security-guidelines-overall.md">Security Guidelines</a></li><li><a href="security/security-privacy-protection.md">Privacy Protection</a></li></ul>
</td>
</tr>
<tr id="row10602193719152"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p857873713152"><a name="p857873713152"></a><a name="p857873713152"></a>Advanced development</p>
......@@ -90,7 +90,7 @@ In addition, OpenHarmony provides a series of optional system components that ca
</td>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><p id="p45798376158"><a name="p45798376158"></a><a name="p45798376158"></a>Contributing components to <span id="text207913212498"><a name="text207913212498"></a><a name="text207913212498"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul957919379156"></a><a name="ul957919379156"></a><ul id="ul957919379156"><li><a href="bundles/bundles-standard-rules.md">Component Development Specifications</a></li><li><a href="bundles/bundles-guide.md">Component Development Guidelines</a></li><li><a href="bundles/bundles-demo.md">HPM User Guide</a></li></ul>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul957919379156"></a><a name="ul957919379156"></a><ul id="ul957919379156"><li><a href="bundles/bundles-standard-rules.md">Bundle Development Specifications</a></li><li><a href="bundles/bundles-guide.md">Bundle Development Guidelines</a></li><li><a href="bundles/bundles-demo.md">Bundle Development Example</a></li></ul>
</td>
</tr>
<tr id="row260193701512"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p95794372155"><a name="p95794372155"></a><a name="p95794372155"></a>Reference</p>
......@@ -114,11 +114,11 @@ In addition, OpenHarmony provides a series of optional system components that ca
</th>
</tr>
</thead>
<tbody><tr id="row9662532514"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p066105317513"><a name="p066105317513"></a><a name="p066105317513"></a>About <span id="text1523091643"><a name="text1523091643"></a><a name="text1523091643"></a>OpenHarmony</span></p>
<tbody><tr id="row9662532514"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p066105317513"><a name="p066105317513"></a><a name="p066105317513"></a>About <span id="text70243343"><a name="text70243343"></a><a name="text70243343"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p16673531512"><a name="p16673531512"></a><a name="p16673531512"></a>Getting familiar with <span id="text280142300"><a name="text280142300"></a><a name="text280142300"></a>OpenHarmony</span></p>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p16673531512"><a name="p16673531512"></a><a name="p16673531512"></a>Getting familiar with <span id="text897788591"><a name="text897788591"></a><a name="text897788591"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul10673531517"></a><a name="ul10673531517"></a><ul id="ul10673531517"><li><a href="https://gitee.com/openharmony" target="_blank" rel="noopener noreferrer">About OpenHarmony</a></li><li><a href="glossary/glossary.md">Glossary</a></li></ul>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul10673531517"></a><a name="ul10673531517"></a><ul id="ul10673531517"><li><a href="https://gitee.com/openharmony/docs/blob/master/en/OpenHarmony-Overview.md" target="_blank" rel="noopener noreferrer">About OpenHarmony</a></li><li><a href="glossary/glossary.md">Glossary</a></li></ul>
</td>
</tr>
<tr id="row267155313513"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p13671853205113"><a name="p13671853205113"></a><a name="p13671853205113"></a>Development resources</p>
......@@ -137,31 +137,23 @@ In addition, OpenHarmony provides a series of optional system components that ca
</tr>
<tr id="row1168155365119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p96810536514"><a name="p96810536514"></a><a name="p96810536514"></a>Basic capabilities</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p136812535511"><a name="p136812535511"></a><a name="p136812535511"></a>Using basic capabilities of <span id="text2027331797"><a name="text2027331797"></a><a name="text2027331797"></a>OpenHarmony</span></p>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p136812535511"><a name="p136812535511"></a><a name="p136812535511"></a>Using basic capabilities of <span id="text1468659507"><a name="text1468659507"></a><a name="text1468659507"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul1954915235272"></a><a name="ul1954915235272"></a><ul id="ul1954915235272"><li><a href="kernel/kernel-standard.md">Kernel</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/security-privacy-protection.md">Security Guidelines</a></li><li><a href="security/security-privacy-protection.md">Privacy Protection</a></li></ul>
</td>
</tr>
<tr id="row1368195345111"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p16681853145115"><a name="p16681853145115"></a><a name="p16681853145115"></a>Advanced development</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1568753135116"><a name="p1568753135116"></a><a name="p1568753135116"></a>Developing smart devices based on system capabilities</p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul136895314518"></a><a name="ul136895314518"></a><ul id="ul136895314518"><li><a href="guide/device-clock-guide.md">Development Example for Clock Apps</a></li><li><a href="guide/device-driver-demo.md">Development Example for Platform Drivers</a></li><li><a href="guide/device-outerdriver-demo.md">Development Example for Peripheral Drivers</a></li></ul>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul1954915235272"></a><a name="ul1954915235272"></a><ul id="ul1954915235272"><li><a href="kernel/kernel-standard.md">Kernel Development Guide</a></li><li><a href="driver/Readme-EN.md">HDF</a></li><li><a href="subsystems/Readme-EN.md">Subsystems</a></li><li><a href="security/security-guidelines-overall.md">Security Guidelines</a></li><li><a href="security/security-privacy-protection.md">Privacy Protection</a></li></ul>
</td>
</tr>
<tr id="row66915375119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p4696535512"><a name="p4696535512"></a><a name="p4696535512"></a>Porting and adaptation</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p185185615284"><a name="p185185615284"></a><a name="p185185615284"></a>Porting and adapting the <span id="text1434016533511"><a name="text1434016533511"></a><a name="text1434016533511"></a>OpenHarmony</span> to a third-party library</p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><p id="p10262183114555"><a name="p10262183114555"></a><a name="p10262183114555"></a><a href="porting/porting-thirdparty.md">Third-Party Library Porting Guide</a></p>
<p id="p123471211096"><a name="p123471211096"></a><a name="p123471211096"></a><a href="porting/standard-system-porting-guide">Standard System SoC Porting Guide</a></p>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul14724164204819"></a><a name="ul14724164204819"></a><ul id="ul14724164204819"><li><a href="porting/standard-system-porting-guide.md">Standard System SoC Porting Guide</a></li></ul>
</td>
</tr>
<tr id="row869853125119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p3691530511"><a name="p3691530511"></a><a name="p3691530511"></a>Contributing components</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1469115335113"><a name="p1469115335113"></a><a name="p1469115335113"></a>Contributing components to <span id="text262674084"><a name="text262674084"></a><a name="text262674084"></a>OpenHarmony</span></p>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1469115335113"><a name="p1469115335113"></a><a name="p1469115335113"></a>Contributing components to <span id="text1180831622"><a name="text1180831622"></a><a name="text1180831622"></a>OpenHarmony</span></p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul87045395116"></a><a name="ul87045395116"></a><ul id="ul87045395116"><li><a href="bundles/bundles-standard-rules.md">Component Development Specifications</a></li><li><a href="bundles/bundles-guide.md">Component Development Guidelines</a></li><li><a href="bundles/bundles-demo.md">HPM User Guide</a></li></ul>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul44949625110"></a><a name="ul44949625110"></a><ul id="ul44949625110"><li><a href="bundles/bundles-standard-rules.md">Bundle Development Specifications</a></li><li><a href="bundles/bundles-guide.md">Bundle Development Guidelines</a></li><li><a href="bundles/bundles-demo.md">Bundle Development Example</a></li></ul>
</td>
</tr>
<tr id="row1170153125110"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p16701253195118"><a name="p16701253195118"></a><a name="p16701253195118"></a>Reference</p>
......
......@@ -69,7 +69,6 @@ OpenHarmony provides the following two types of Docker environments for you to q
</tbody>
</table>
## Preparations<a name="section7337134183512"></a>
Before using the Docker environment, perform the following operations:
......@@ -151,10 +150,8 @@ hb set
.
```
**Figure 1** Setting page<a name="fig18712183616135"></a>
![](figure/en-us_image_0000001101413884.png)
**Figure 1** Setting page<a name="fig7947145854013"></a>
![](figure/setting-page.png "setting-page")
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>The mapping between the development board and the building GUI:
......
......@@ -9,7 +9,7 @@ HUAWEI DevEco Device Tool is a one-stop integrated development environment \(IDE
The roadmap of Huawei DevEco Device Tool for supporting OpenHarmony device development is shown in the figure below.
![](figure/3-27.png)
![](figure/evolution-roadmap.png)
## Acquiring the Application Development Tool \(HUAWEI DevEco Studio\)<a name="section0904101019258"></a>
......
......@@ -48,7 +48,7 @@ This document describes how to acquire OpenHarmony source code and provides its
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) and [git-lfs](https://gitee.com/vcs-all-in-one/git-lfs?_from=gitee_search#downloading), and configure basic user information.
3. Install the [git client](http://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-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"
......@@ -101,12 +101,12 @@ This document describes how to acquire OpenHarmony source code and provides its
```
repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony_1.0.1_release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
repo[Release-Notes](../../release-notes/Readme.md) forall -c 'git lfs pull'
```
- Obtaining the source code of other OpenHarmony releases
For details about how to obtain the source code of other OpenHarmony releases, see the [Release Notes](../../release-notes/Readme.md).
For details about how to obtain the source code of other OpenHarmony releases, see the [Release-Notes](../../release-notes/Readme.md).
## Method 2: Acquiring Source Code from HPM<a name="section463013147412"></a>
......@@ -154,10 +154,8 @@ You must install **Node.js** and HPM on your local PC. The installation proced
3. Specify filter criteria, such as the bundle type \(for example: **Board support** and **Kernel support**\), to further filter the distributions.
4. Locate your desired distribution and click it to view details.
**Figure 1** HPM page<a name="fig838103114320"></a>
![](figure/en-us_image_0000001119915556.png)
**Figure 1** HPM page<a name="fig414435103619"></a>
![](figure/hpm-page.png "hpm-page")
2. Learn more about the distribution.
......@@ -165,10 +163,8 @@ You must install **Node.js** and HPM on your local PC. The installation proced
2. Click **Download** to download the distribution to your local PC.
3. Click **Custom** to add or delete bundles of the distribution.
**Figure 2** Example distribution<a name="fig1329851510414"></a>
![](figure/en-us_image_0000001119755646.png)
**Figure 2** Example distribution<a name="fig950763112375"></a>
![](figure/example-distribution.png "example-distribution")
3. Customize bundles.
1. Access the **Custom solution** page, as shown in the following figure.
......@@ -176,10 +172,8 @@ You must install **Node.js** and HPM on your local PC. The installation proced
3. Enter the basic information about your project, including the bundle name, version, and description, on the right pane.
4. Click **Download**. The system then generates the OpenHarmony code structure file \(for example, **my\_cust\_dist.zip**\) and saves it to your local PC.
**Figure 3** Customizing bundles<a name="fig05036599014"></a>
![](figure/en-us_image_0000001166715379.png)
**Figure 3** Customizing bundles<a name="fig13979182053817"></a>
![](figure/customizing-bundles.png "customizing-bundles")
4. Download and install bundles.
1. Decompress the downloaded file using the CLI tool CMD \(shell in Linux\).
......@@ -192,7 +186,7 @@ You must install **Node.js** and HPM on your local PC. The installation proced
To ensure the download performance, you are advised to download the source code or the corresponding solution from the image library of the respective site listed in the table below.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>- The table below provides only the sites for downloading the latest OpenHarmony master and LTS code. For details about how to obtain the source code of earlier versions, see the [Release Notes](../../release-notes/Readme.md).
>- The table below provides only the sites for downloading the latest OpenHarmony master and LTS code. For details about how to obtain the source code of earlier versions, see the [Release-Notes](../../release-notes/Readme.md).
>- The Master 1.0 version is no longer maintained.
**Table 1** Sites for acquiring source code from image sites
......@@ -256,9 +250,9 @@ To ensure the download performance, you are advised to download the source code
</td>
<td class="cellrowborder" valign="top" width="25%"><p id="p194141849163919"><a name="p194141849163919"></a><a name="p194141849163919"></a><strong id="b1094411391670"><a name="b1094411391670"></a><a name="b1094411391670"></a>Version Information</strong></p>
</td>
<td class="cellrowborder" valign="top" width="25%"><p id="p8414649193919"><a name="p8414649193919"></a><a name="p8414649193919"></a><strong id="b172399013"><a name="b172399013"></a><a name="b172399013"></a>Site</strong></p>
<td class="cellrowborder" valign="top" width="25%"><p id="p8414649193919"><a name="p8414649193919"></a><a name="p8414649193919"></a><strong id="b311804727"><a name="b311804727"></a><a name="b311804727"></a>Site</strong></p>
</td>
<td class="cellrowborder" valign="top" width="25%"><p id="p13415149133914"><a name="p13415149133914"></a><a name="p13415149133914"></a><strong id="b294086750"><a name="b294086750"></a><a name="b294086750"></a>SHA-256 Verification Code</strong></p>
<td class="cellrowborder" valign="top" width="25%"><p id="p13415149133914"><a name="p13415149133914"></a><a name="p13415149133914"></a><strong id="b197076505"><a name="b197076505"></a><a name="b197076505"></a>SHA-256 Verification Code</strong></p>
</td>
</tr>
<tr id="row4769431134919"><td class="cellrowborder" valign="top" width="25%"><p id="p97691031124913"><a name="p97691031124913"></a><a name="p97691031124913"></a>Full code (for standard systems)</p>
......@@ -319,7 +313,7 @@ To ensure the download performance, you are advised to download the source code
</td>
<td class="cellrowborder" valign="top" width="25%"><p id="p1093810218417"><a name="p1093810218417"></a><a name="p1093810218417"></a><strong id="b1124015405556"><a name="b1124015405556"></a><a name="b1124015405556"></a>Version Information</strong></p>
</td>
<td class="cellrowborder" valign="top" width="25%"><p id="p9938132648"><a name="p9938132648"></a><a name="p9938132648"></a><strong id="b1331994007"><a name="b1331994007"></a><a name="b1331994007"></a>Site</strong></p>
<td class="cellrowborder" valign="top" width="25%"><p id="p9938132648"><a name="p9938132648"></a><a name="p9938132648"></a><strong id="b1902250690"><a name="b1902250690"></a><a name="b1902250690"></a>Site</strong></p>
</td>
<td class="cellrowborder" valign="top" width="25%"><p id="p12520113711011"><a name="p12520113711011"></a><a name="p12520113711011"></a><strong id="b19256751175516"><a name="b19256751175516"></a><a name="b19256751175516"></a>SHA-256 Verification Code</strong></p>
</td>
......
......@@ -34,7 +34,7 @@ In this example, an I2C driver is used. [Figure 1](#fig148041484161) shows the
## Preparations<a name="section6926133918422"></a>
Follow the instructions in [Environment Setup for Standard System](../quick-start/quickstart-standard-description.md).
Follow the instructions in [Environment Setup for Standard System](../quick-start/quickstart-standard-overview.md).
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>This development example applies to standard, small, and mini OpenHarmony systems. The following sections use the standard system as an example. You can refer to the specific guide for your system to set up the environment.
......
......@@ -48,7 +48,7 @@ During system startup, **OsUserInitProcess** is called to start the **init**
Common compilation modes of user-space programs include:
1. [Compilation using the framework](../quick-start/quickstart-lite-steps-board3516-running.md)
1. [Compilation using the framework](../quick-start/quickstart-lite-steps-hi3516-running.md)
2. Manual compilation
Example:
......@@ -57,7 +57,7 @@ Common compilation modes of user-space programs include:
clang --target=arm-liteos --sysroot=prebuilts/lite/sysroot -o helloworld helloworld.c
```
Before running the **clang** command, install the LLVM compiler. For details, see [Installing LLVM](../quick-start/quickstart-lite-env-setup-lin.md).
Before running the **clang** command, install the LLVM compiler. For details, see [Installing LLVM](../quick-start/quickstart-lite-env-setup-linux.md).
**--target=arm-liteos**: specifies that the compilation platform is arm-liteos.
......
......@@ -23,7 +23,7 @@ The download steps for other resources are the same as those in the mainline ver
- [Mini System SoC Porting Guide](porting-minichip.md)
- [Porting Preparations](porting-chip-prepare.md)
- [Before You Start](porting-chip-prepare-knows.md)
- [Before You Start](oem_transplant_chip_prepare_knows.md)
- [Building Adaptation Process](porting-chip-prepare-process.md)
- [Kernel Porting](porting-chip-kernel.md)
- [Overview](porting-chip-kernel-overview.md)
......
# Before You Start<a name="EN-US_TOPIC_0000001064030766"></a>
# Before You Start<a name="EN-US_TOPIC_0000001199722625"></a>
- [Porting Directory](#section284217487490)
- [Porting Process](#section639315306506)
......
# Third-party Module Adaptation<a name="EN-US_TOPIC_0000001117478960"></a>
# Third-party Module Adaptation<a name="EN-US_TOPIC_0000001153842842"></a>
To use third-party modules in the **third\_party** directory, you may need to adapt the modules. This section uses mbedTLS as an example to describe how to integrate the adaptation code with the OpenHarmony compilation framework. For the principles of mbedTLS and the specific logic of the adaptation code, see the adaptation guide on the mbedTLS official website.
......
# System Modules<a name="EN-US_TOPIC_0000001063871490"></a>
# System Modules<a name="EN-US_TOPIC_0000001199722621"></a>
- [SAMGR](#section105874301910)
- [DFX](#section20064420420)
......
# Board-Level Driver Adaptation<a name="EN-US_TOPIC_0000001063265278"></a>
# Board-Level Driver Adaptation<a name="EN-US_TOPIC_0000001153683028"></a>
To implement board-level driver adaptation, perform the following steps:
......
# Implementation of APIs at the HAL<a name="EN-US_TOPIC_0000001062862633"></a>
# Implementation of APIs at the HAL<a name="EN-US_TOPIC_0000001199722623"></a>
- [Utils](#section1394788286)
- [IoT Peripheral Subsystem](#section958113200811)
......
# Overview<a name="EN-US_TOPIC_0000001064031492"></a>
# Overview<a name="EN-US_TOPIC_0000001153683022"></a>
- [Porting Process](#section1283115812294)
- [Board-Level Directory Specifications](#section6204129143013)
......
# XTS<a name="EN-US_TOPIC_0000001063110883"></a>
# XTS<a name="EN-US_TOPIC_0000001199722627"></a>
- [Introduction](#section6725155811454)
- [Adding the XTS Subsystem to the Building Component](#section46981118105417)
......
# Board-Level OS Porting<a name="EN-US_TOPIC_0000001062604739"></a>
# Board-Level OS Porting<a name="EN-US_TOPIC_0000001199842515"></a>
- **[Overview](porting-chip-board-overview.md)**
......
# FAQ<a name="EN-US_TOPIC_0000001063192853"></a>
# FAQ<a name="EN-US_TOPIC_0000001153683024"></a>
- [How Do I Mount the Heap Memory to the Kernel?](#section965418378552)
......
# Basic Kernel Adaptation<a name="EN-US_TOPIC_0000001063432950"></a>
# Basic Kernel Adaptation<a name="EN-US_TOPIC_0000001199842517"></a>
- [Adaptation Process](#section14523241594)
- [Feature Configuration](#section112994366592)
......@@ -15,7 +15,7 @@ Basic adaptation consists of the following steps:
**Figure 1** Startup process<a name="fig10838105524917"></a>
![](figure/en-us_image_0000001073943511.png)
![](figure/startup-process.png)
In the **startup.S** file, you must ensure that the entry function \(for example, **reset\_vector**\) of the interrupt vector table is stored in the RAM start address specified by the link configuration files. The link configuration files of IAR, Keil, and GCC projects are **xxx.icf**, **xxx.sct**, and **xxx.ld**, respectively. The startup file provided by the vendor does not need to be modified if the **startup.S** file has initialized the system clock and returned to the **main** function. Otherwise, the preceding functions need to be implemented.
......@@ -63,6 +63,11 @@ The following table shows some typical configuration items:
<td class="cellrowborder" valign="top" width="65.19%" headers="mcps1.2.3.1.2 "><p id="p1644094201917"><a name="p1644094201917"></a><a name="p1644094201917"></a>Switch of the queue feature. The values <strong id="b1514814454405"><a name="b1514814454405"></a><a name="b1514814454405"></a>1</strong> and <strong id="b114824504011"><a name="b114824504011"></a><a name="b114824504011"></a>0</strong> indicate that the switch is turned on and turned off, respectively.</p>
</td>
</tr>
<tr id="row14294143784110"><td class="cellrowborder" valign="top" width="34.81%" headers="mcps1.2.3.1.1 "><p id="p529573794111"><a name="p529573794111"></a><a name="p529573794111"></a>LOSCFG_BASE_CORE_TSK_LIMIT</p>
</td>
<td class="cellrowborder" valign="top" width="65.19%" headers="mcps1.2.3.1.2 "><p id="p529503704116"><a name="p529503704116"></a><a name="p529503704116"></a>Maximum number of available tasks, excluding idle tasks. You can set this item based on your actual service requirements, or you can initially set it to a large value and adjust the value at a later time.</p>
</td>
</tr>
<tr id="row16440124216198"><td class="cellrowborder" valign="top" width="34.81%" headers="mcps1.2.3.1.1 "><p id="p9440184271915"><a name="p9440184271915"></a><a name="p9440184271915"></a>LOSCFG_BASE_IPC_SEM</p>
</td>
<td class="cellrowborder" valign="top" width="65.19%" headers="mcps1.2.3.1.2 "><p id="p1044024261912"><a name="p1044024261912"></a><a name="p1044024261912"></a>Switch of the semaphore feature. The values <strong id="b0766102114312"><a name="b0766102114312"></a><a name="b0766102114312"></a>1</strong> and <strong id="b1876612254312"><a name="b1876612254312"></a><a name="b1876612254312"></a>0</strong> indicate that the switch is turned on and turned off, respectively.</p>
......
# Overview<a name="EN-US_TOPIC_0000001063870592"></a>
# Overview<a name="EN-US_TOPIC_0000001153842840"></a>
- [Porting Scenario](#section93781277367)
- [Directory Specifications](#section18127744153119)
......@@ -21,7 +21,7 @@ The kernel used by module chips is LiteOS Cortex-M, which consists of four modul
**Figure 1** Architecture of the LiteOS Cortex-M kernel<a name="fig10838105524917"></a>
![](figure/en-us_image_0000001072304191.png)
![](figure/architecture-of-the-liteos-cortex-m-kernel.png)
The directory structure of the kernel is described as follows:
......
# Kernel Porting Verification<a name="EN-US_TOPIC_0000001062953117"></a>
# Kernel Porting Verification<a name="EN-US_TOPIC_0000001153842844"></a>
Add the sample program file **main.c** to the **device** directory of the project and compile the file. After LOS\_KernelInit is complete, this sample program will create two tasks that loop the **LOS\_TaskDelay** function and print the log information cyclically. In this way, you can check whether system scheduling and the clock work properly.
......
# Kernel Porting<a name="EN-US_TOPIC_0000001063110705"></a>
# Kernel Porting<a name="EN-US_TOPIC_0000001153842846"></a>
- **[Overview](porting-chip-kernel-overview.md)**
......
# Building Adaptation Process<a name="EN-US_TOPIC_0000001063302771"></a>
# Building Adaptation Process<a name="EN-US_TOPIC_0000001153683026"></a>
- [Building Adaptation Process](#section2159183845319)
......
# Porting Preparations<a name="EN-US_TOPIC_0000001063252862"></a>
# Porting Preparations<a name="EN-US_TOPIC_0000001199842513"></a>
- **[Before You Start](porting-chip-prepare-knows.md)**
- **[Before You Start](oem_transplant_chip_prepare_knows.md)**
- **[Building Adaptation Process](porting-chip-prepare-process.md)**
......
# Device Driver Porting<a name="EN-US_TOPIC_0000001124154504"></a>
# Device Driver Porting<a name="EN-US_TOPIC_0000001200252097"></a>
- [LCD Driver Porting](#section1574513454119)
- [Touchscreen Driver Porting](#section20284142116422)
......
# Overview<a name="EN-US_TOPIC_0000001172160289"></a>
# Overview<a name="EN-US_TOPIC_0000001154372312"></a>
Drivers can be classified as platform drivers or device drivers. The platform drivers are generally in the SoC, such as the GPIO, I2C, and SPI drivers. The device drivers are typically outside of the SoC, such as the LCD, TP, and WLAN drivers.
**Figure 1** OpenHarmony driver classification<a name="fig11697182018375"></a>
![](figure/分类.png)
**Figure 1** OpenHarmony driver classification<a name="fig08631434121"></a>
![](figure/openharmony-driver-classification.png "openharmony-driver-classification")
The Hardware Driver Foundation \(HDF\) is designed to work across OSs. The HDF driver framework provides strong support for drivers to achieve this goal. During HDF driver development, you are advised to use only the APIs provided by the HDF driver framework. Otherwise, the driver cannot be used across OSs. Before driver development, familiarize yourself with the [HDF](../driver/driver-hdf-overview.md).
# Platform Driver Porting<a name="EN-US_TOPIC_0000001170794079"></a>
# Platform Driver Porting<a name="EN-US_TOPIC_0000001154372314"></a>
Create a platform driver in the source code directory **//device/vendor\_name/soc\_name/drivers**. If there is no repository for the vendor of your SoC, contact the [device SIG](https://gitee.com/openharmony/community/blob/master/sig/sig-devboard/sig_devboard.md) to create one.
......
# Driver Porting<a name="EN-US_TOPIC_0000001123149616"></a>
# Driver Porting<a name="EN-US_TOPIC_0000001200252099"></a>
- **[Overview](porting-smallchip-driver-overview.md)**
......
# LiteOS Cortex-A<a name="EN-US_TOPIC_0000001113392962"></a>
# LiteOS Cortex-A<a name="EN-US_TOPIC_0000001200171989"></a>
- [Overview](#section14876256185510)
- [Porting Scenario](#section1986014410569)
......@@ -23,20 +23,20 @@ For details about the LiteOS Cortex-A directory specifications, see [LiteOS Cor
LiteOS Cortex-A provides the system initialization process and custom configuration options required for system running. During porting, pay attention to the functions related to hardware configuration in the initialization process.
The LiteOS Cortex-A initialization process consists of five steps:
The LiteOS Cortex-A initialization process consists of seven steps:
1. Add the **target\_config.h** file and compile the macros **DDR\_MEM\_ADDR** and **DDR\_MEM\_SIZE**, which indicate the start address and length of the board memory, respectively. The prelinker script **board.ld.S** creates the linker script **board.ld** based on the two macros.
2. The kernel creates a kernel image based on the linker script **board.ld**.
3. Operations such as initialization of the interrupt vector table and MMU page table are performed in the assembly files: **reset\_vector\_up.S** and **reset\_vector\_mp.S**, from which a single-core CPU and a multi-core CPU start, respectively.
4. The assembly code in **reset\_vector.S** jumps to the **main** function of the C programming language to initialize the hardware clock, software timer, memory, and tasks. This process depends on the feature macro configuration in **target\_config.h** . The **SystemInit** task to be implemented in the board code is then created, and **OsSchedStart\(\)** is enabled for task scheduling.
5. The **DeviceManagerStart** function is called to initialize the HDF driver. This process is implemented by calling the driver configuration file **hdf.hcs** and driver source code in the board code.
2. Define **g\_archMmuInitMapping**, the global array of MMU mappings, to specify the memory segment attributes and the virtual-to-physical address mappings. The memory mapping will be established based on this array during kernel startup.
3. If there are multiple cores, define **struct SmpOps**, the handle to the slave core operation function. The **SmpOps-\>SmpCpuOn** function needs to implement the feature of waking up a slave core. Then, define the **SmpRegFunc** function and call the **LOS\_SmpOpsSet** interface to register the handle. The registration process is completed by starting the framework using **LOS\_MODULE\_INIT\(SmpRegFunc, LOS\_INIT\_LEVEL\_EARLIEST\)**.
4. Create a kernel image based on the linker script **board.ld**.
5. Perform operations such as initialization of the interrupt vector table and MMU page table are performed in the assembly files: **reset\_vector\_up.S** and **reset\_vector\_mp.S**, from which a single-core CPU and a multi-core CPU start, respectively.
6. Enable the assembly code in **reset\_vector.S** to jump to the **main** function of the C programming language to initialize the hardware clock, software timer, memory, and tasks. This process depends on the feature macro configuration in **target\_config.h**. Then, create the **SystemInit** task to be implemented in the board code, with **OsSchedStart\(\)** enabled for task scheduling.
7. Call the **DeviceManagerStart** function to initialize the HDF driver. This process is implemented by calling the driver configuration file **hdf.hcs** and drivers source code in the board code.
Below is the overall initialization process.
The figure below shows the overall initialization process.
**Figure 1** Overall initialization process<a name="fig10838105524917"></a>
![](figure/en-us_image_0000001126358814.png)
**Figure 1** Overall initialization process<a name="fig68283211926"></a>
![](figure/overall-initialization-process.png "overall-initialization-process")
As can be seen from preceding figure, kernel basic adaptation involves the following parts:
......@@ -114,25 +114,23 @@ As can be seen from preceding figure, kernel basic adaptation involves the follo
</tbody>
</table>
- Implementing the **SystemInit** function to initialize services in the user space. Figure 2 shows a typical initialization scenario.
**Figure 1** Service startup process<a name="fig15798236163510"></a>
- Implementing the **SystemInit** function to initialize services in the user space. [\#EN-US\_TOPIC\_0000001200171989/fig15798236163510](#fig15798236163510) shows a typical initialization scenario.
![](figure/en-us_image_0000001126198996.png)
**Figure 2** Service startup process<a name="fig1919217914418"></a>
![](figure/service-startup-process.png "service-startup-process")
- Implementing the **main** function for basic kernel initialization and initialization of services in the board kernel space. Figure 3 shows the initialization process, where the kernel startup framework takes the lead in the initialization process. The light blue part in the figure indicates the phase in which external modules can be registered and started in the startup framework.
- Implementing the **main** function for basic kernel initialization and initialization of services in the board kernel space. [Figure 3](#fig32611728133919) shows the initialization process, where the kernel startup framework takes the lead in the initialization process. The light blue part in the figure indicates the phase in which external modules can be registered and started in the startup framework.
>![](../public_sys-resources/icon-caution.gif) **CAUTION:**
>Modules at the same layer cannot depend on each other.
**Figure 2** Kernel startup framework<a name="fig32611728133919"></a>
**Figure 3** Kernel startup framework<a name="fig32611728133919"></a>
![](figure/kernel-startup-framework.jpg "kernel-startup-framework")
**Table 2** Startup framework layers
<a name="table38544719428"></a>
<table><thead align="left"><tr id="row286134714423"><th class="cellrowborder" valign="top" width="34.089999999999996%" id="mcps1.2.3.1.1"><p id="p886164717423"><a name="p886164717423"></a><a name="p886164717423"></a>Level</p>
<table><thead align="left"><tr id="row286134714423"><th class="cellrowborder" valign="top" width="34.089999999999996%" id="mcps1.2.3.1.1"><p id="p886164717423"><a name="p886164717423"></a><a name="p886164717423"></a>Layer</p>
</th>
<th class="cellrowborder" valign="top" width="65.91%" id="mcps1.2.3.1.2"><p id="p586194716421"><a name="p586194716421"></a><a name="p586194716421"></a>Description</p>
</th>
......@@ -199,9 +197,9 @@ As can be seen from preceding figure, kernel basic adaptation involves the follo
</tr>
<tr id="row357517134414"><td class="cellrowborder" valign="top" width="34.089999999999996%" headers="mcps1.2.3.1.1 "><p id="p12575676449"><a name="p12575676449"></a><a name="p12575676449"></a>LOS_INIT_LEVEL_KMOD_TASK</p>
</td>
<td class="cellrowborder" valign="top" width="65.91%" headers="mcps1.2.3.1.2 "><p id="p7128122619143"><a name="p7128122619143"></a><a name="p7128122619143"></a>Kernel task creation</p>
<td class="cellrowborder" valign="top" width="65.91%" headers="mcps1.2.3.1.2 "><p id="p7128122619143"><a name="p7128122619143"></a><a name="p7128122619143"></a>Kernel task creation.</p>
<p id="p1657587184419"><a name="p1657587184419"></a><a name="p1657587184419"></a>This layer can be used to create kernel tasks (kernel thread and software timer tasks).</p>
<p id="p55485297219"><a name="p55485297219"></a><a name="p55485297219"></a>Example: creation of the resident resource reclaiming task, SystemInit task, and CPU usage statistics task.</p>
<p id="p55485297219"><a name="p55485297219"></a><a name="p55485297219"></a>Example: creation of the resident resource reclaiming task, SystemInit task, and CPU usage statistics task</p>
</td>
</tr>
</tbody>
......
# Linux Kernel<a name="EN-US_TOPIC_0000001159912785"></a>
# Linux Kernel<a name="EN-US_TOPIC_0000001200171987"></a>
- [Overview](#section6282121355111)
- [Basic Information](#section19589322515)
......@@ -58,18 +58,16 @@ You can use the Bootloader provided by the chipset vendor or open-source U-Boot
## Verification<a name="section17318153325311"></a>
Debug the **init** process, start shell, and run a simple program in the user space to check whether the kernel porting is successful. Below is the OS image structure of the OpenHarmony [small system](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des-0000001105598722) and the Linux user-space program startup process.
Debug the **init** process, start shell, and run a simple program in the user space to check whether the kernel porting is successful. Below is the OS image structure of the OpenHarmony [small system](../quick-start/quickstart-lite-overview.md) and the Linux user-space program startup process.
**Figure 1** OS image structure and user-space program startup process based on the Linux kernel<a name="fig1296918391004"></a>
![](figure/en-us_image_0000001126354076.png)
**Figure 1** OS image structure and user-space program startup process based on the Linux kernel<a name="fig91631652715"></a>
![](figure/os-image-structure-and-user-space-program-startup-process-based-on-the-linux-kernel.png "os-image-structure-and-user-space-program-startup-process-based-on-the-linux-kernel")
Based on the preceding process, the recommended verification procedure is as follows:
1. Create a root file system image.
Create a root file system image **rootfs.img** by following instructions in [Adding a Chipset Solution and a Product Solution](https://device.harmonyos.com/en/docs/develop/subsystems/oem_subsys_build_guide-0000001060378721). As shown in the preceding figure, the startup process is closely related to the product configuration. You need to complete the following configuration when creating **rootfs.img**:
Create a root file system image **rootfs.img** by following instructions in [Adding a Chipset Solution and a Product Solution](../subsystems/subsys-build-mini-lite.md). As shown in the preceding figure, the startup process is closely related to the product configuration. You need to complete the following configuration when creating **rootfs.img**:
- Component configuration
......@@ -99,17 +97,13 @@ Based on the preceding process, the recommended verification procedure is as fol
If the init startup log contains the version number, the init program is started properly:
**Figure 2** Log indicating that the init process is started properly<a name="fig13510844174415"></a>
![](figure/en-us_image_0000001172273945.jpg)
**Figure 2** Log indicating that the init process is started properly<a name="fig1111661083719"></a>
![](figure/log-indicating-that-the-init-process-is-started-properly.png "log-indicating-that-the-init-process-is-started-properly")
After entering the shell, run the **ls** command. The following figure shows the information printed over the serial port.
**Figure 3** Information printed after the ls command is executed in the shell<a name="fig584415944917"></a>
![](figure/en-us_image_0000001172393865.jpg)
**Figure 3** Information printed after the ls command is executed in the shell<a name="fig64571257103717"></a>
![](figure/information-printed-after-the-ls-command-is-executed-in-the-shell.png "information-printed-after-the-ls-command-is-executed-in-the-shell")
3. Configure the NFS.
......
# Kernel Porting<a name="EN-US_TOPIC_0000001105566322"></a>
# Kernel Porting<a name="EN-US_TOPIC_0000001200171985"></a>
- **[LiteOS Cortex-A](porting-smallchip-kernel-a.md)**
......
# Compilation and Building<a name="EN-US_TOPIC_0000001105406466"></a>
# Compilation and Building<a name="EN-US_TOPIC_0000001154212512"></a>
- [Compilation Environment Setup](#section3336103410314)
- [Introduction to the Compilation and Building Subsystem](#section354343816319)
......@@ -6,7 +6,7 @@
## Compilation Environment Setup<a name="section3336103410314"></a>
Set up the basic environment by following instructions in [Ubuntu Build Environment](../quick-start/quickstart-lite-env-setup-lin.md). Both the user space and LiteOS Cortex-A kernel space are compiled using the LLVM compiler. If you choose to port the Linux kernel, run the following command to install the gcc-arm-linux-gnueabi cross compiler for compiling the Linux kernel-space image:
Set up the basic environment by following instructions in [Ubuntu Build Environment](../quick-start/quickstart-lite-env-setup-linux.md). Both the user space and LiteOS Cortex-A kernel space are compiled using the LLVM compiler. If you choose to port the Linux kernel, run the following command to install the gcc-arm-linux-gnueabi cross compiler for compiling the Linux kernel-space image:
```
sudo apt-get install gcc-arm-linux-gnueabi
......@@ -121,12 +121,12 @@ After learning the compilation framework and setting up the compilation environm
3. Edit the build script of the development board.
In the **BUILD.gn** file described in 1, build code related to the development board, such as code for the on-device driver, on-device interface adaptation \(media and graphics\), and SDK on the development board.
In the **BUILD.gn** file described in step [1](#li20894101862), build code related to the development board, such as code for the on-device driver, on-device interface adaptation \(media and graphics\), and SDK on the development board.
For example, edit the **device/hisilicon/hispark\_taurus/BUILD.gn** file as follows:
```
# It is recommended that the group name be the same as the developer board name.
# It is recommended that the group name be the same as the development board name.
group("hispark_taurus") {
deps = [ "//kernel/linux/patches:linux_kernel" ] # Start kernel compilation.
deps += [
......
# Before You Start<a name="EN-US_TOPIC_0000001152006279"></a>
# Before You Start<a name="EN-US_TOPIC_0000001154212510"></a>
This document provides guidance on how to port the Linux and LiteOS Cortex-A kernels on the OpenHarmony [small system](../quick-start/quickstart-lite-overview.md) to a development board. It is intended for developers with experience in developing embedded systems. Before following instructions in this document, it is recommended that you familiarize yourself with [OpenHarmony](../../OpenHarmony-Overview.md), including its technical architecture, directory structure, kernel subsystem, and driver subsystem. The following table lists the development boards that have been adapted to the small system.
......
# Porting Preparations<a name="EN-US_TOPIC_0000001105401594"></a>
# Porting Preparations<a name="EN-US_TOPIC_0000001154212514"></a>
- **[Before You Start](porting-smallchip-prepare-needs.md)**
......
# Porting a Library Built Using CMake<a name="EN-US_TOPIC_0000001063033549"></a>
# Porting a Library Built Using CMake<a name="EN-US_TOPIC_0000001200172241"></a>
- [Source Code Acquisition](#section1771132116245)
- [Porting Guidelines](#section9737174410328)
......@@ -136,10 +136,10 @@ The following steps show how to configure and modify the toolchains for cross-co
set(CMAKE_LINKER clang)
set(CMAKE_CXX_LINKER clang++)
set(CMAKE_C_LINKER clang)
set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINKER}
${MY_LINK_FLAGS} <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINKER}
${MY_LINK_FLAGS} <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_C_LINK_EXECUTABLE
"${CMAKE_C_LINKER} ${MY_LINK_FLAGS} <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
set(CMAKE_CXX_LINK_EXECUTABLE
"${CMAKE_CXX_LINKER} ${MY_LINK_FLAGS} <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
# Specify the path for searching chained libraries.
set(CMAKE_SYSROOT ${OHOS_SYSROOT_PATH})
```
......@@ -154,7 +154,7 @@ The following steps show how to configure and modify the toolchains for cross-co
make -j
```
**OHOS\_SYSROOT\_PATH** specifies the absolute path where **sysroot** is located. Taking OpenHarmony for example, set **OHOS\_SYSROOT\_PATH** to the absolute path of **openHarmony/prebuilts/lite/sysroot**.
**OHOS\_SYSROOT\_PATH** specifies the absolute path where **sysroot** is located. For OpenHarmony, set **OHOS\_SYSROOT\_PATH** to the absolute path of the **out/hispark\__xxx_/ipcamera\_hispark\__xxx_/sysroot** directory. This directory is generated after full compilation is complete. Therefore, complete full compilation before porting.
3. <a name="li15717101715249"></a>View the result.
......@@ -227,7 +227,7 @@ The following steps show how to configure and modify the toolchains for cross-co
1. Set up the OpenHarmony environment.
Using Hi3518EV300 as an example, compile the OpenHarmony image and burn it to the development board. For details, see [Developing the First Example Program Running on Hi3518](../quick-start/quickstart-lite-steps-board3518-running.md).
Using Hi3518EV300 as an example, compile the OpenHarmony image and burn it to the development board. For details, see [Developing the First Example Program Running on Hi3518](../quick-start/quickstart-lite-steps-hi3518-running.md).
The following screen is displayed after a successful login to the OS.
......
# Porting a Library Built Using Makefile<a name="EN-US_TOPIC_0000001064218672"></a>
# Porting a Library Built Using Makefile<a name="EN-US_TOPIC_0000001154372572"></a>
- [Source Code Acquisition](#section114115321416)
- [Cross-Compilation Settings](#section81263255384)
......@@ -98,7 +98,7 @@ The following steps show how to configure and modify the toolchains for cross-co
CC:=clang
AR:=llvm-ar
# The --target and --sysroot flags must be specified.
CFLAGS:=-Wall -Wextra -Wno-unused-parameter -O2 -g --target=arm-liteos -march=armv7-a --sysroot=$(OHOS_ROOT_PATH)prebuilts/lite/sysroot
CFLAGS:=-Wall -Wextra -Wno-unused-parameter -O2 -g --target=arm-liteos -march=armv7-a --sysroot=$(OHOS_SYSROOT_PATH)
```
Original configuration:
......@@ -117,7 +117,7 @@ The following steps show how to configure and modify the toolchains for cross-co
make test OHOS_SYSROOT_PATH=...
```
**OHOS\_SYSROOT\_PATH** specifies the absolute path of the directory where **sysroot** is located. Taking OpenHarmony for example, set **OHOS\_SYSROOT\_PATH** to the absolute path of **prebuilts/lite/sysroot/**.
**OHOS\_SYSROOT\_PATH** specifies the absolute path of the directory where **sysroot** is located. For OpenHarmony, set **OHOS\_SYSROOT\_PATH** to the absolute path of the **out/hispark\__xxx_/ipcamera\_hispark\__xxx_/sysroot** directory. This directory is generated after full compilation is complete. Therefore, complete full compilation before porting.
3. View the result.
......
# Overview<a name="EN-US_TOPIC_0000001064570046"></a>
# Overview<a name="EN-US_TOPIC_0000001154212772"></a>
This document provides guidance for OpenHarmony developers to port third-party libraries that use common compiler organization modes, such as CMakeLists and Makefile. It describes how to set a toolchain in different compiler organization modes and how to add the compiling configuration of a library to the OpenHarmony project. Currently, this guide applies only to Hi3516DV300 and Hi3518EV300.
......@@ -6,4 +6,6 @@
- **[Small System SoC Porting Guide](porting-smallchip.md)**
- **[Standard System Porting Guide](standard-system-porting-guide.md)**
# Standard System Porting Guide
# Standard System Porting Guide<a name="EN-US_TOPIC_0000001180064129"></a>
<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=6 orderedList=false} -->
- [Defining a Development Board](#section132mcpsimp)
- [Defining an SoC](#section135mcpsimp)
- [Defining a Product](#section145mcpsimp)
- [Verifying the Porting](#section163mcpsimp)
<!-- code_chunk_output -->
- [Porting the Kernel](#section171mcpsimp)
- [1. Adding a Kernel-built Subsystem to the SoC](#section174mcpsimp)
- [2. Building the Kernel](#section182mcpsimp)
- [3. Verifying the Porting](#section207mcpsimp)
- [Defining a Development Board](#Defining-a-Development-Board)
- [1. Defining an SoC](#1-Defining-an-SoC)
- [2. Defining a Product](#2-Defining-a-Product)
- [3. Verifying the Porting](#3-Verifying-the-Porting)
- [Porting the Kernel](#Porting-the-Kernel)
- [1. Adding a Kernel-built Subsystem to the SoC](#1-Adding-a-Kernel-built-Subsystem-to-the-SoC)
- [2. Building the Kernel](#2-Building-the-Kernel)
- [3. Verifying the Porting](#3-Verifying-the-Porting-1)
- [Porting the HDF Driver](#Porting-the-HDF-Driver)
- [1. LCD](#1-lcd)
- [2. Touchscreen](#2-Touchscreen)
- [3. WLAN](#3-wlan)
- [用户态启动引导](#section20665151016586)
- [Porting the HDF Driver](#section210mcpsimp)
- [1. LCD](#section212mcpsimp)
- [2. Touchscreen](#section229mcpsimp)
- [3. WLAN](#section274mcpsimp)
- [4. Samples](#section11253153018415)
<!-- /code_chunk_output -->
This document describes the general process for porting a development board, rather than the porting process specific to a System on Chip (SoC). In the future, the community will provide more development board porting examples for your reference.
This document describes the general process for porting a development board, rather than the porting process specific to a System on Chip \(SoC\). In the future, the community will provide more development board porting examples for your reference.
## Defining a Development Board
## Defining a Development Board<a name="section132mcpsimp"></a>
This document uses the process of porting a development board named **MyProduct** as an example. This development board is provided by **MyProductVendor** and uses the SoC **MySOC** produced by **MySoCVendor**.
### 1. Defining an SoC
### Defining an SoC<a name="section135mcpsimp"></a>
Create a JSON file named after the SoC name in the **//productdefine/common/device** directory and specify the CPU architecture.
For example, to port **MySOC**, which uses a 32-bit ARM kernel, configure the file as follows:
`//productdefine/common/device/MySOC.json`
```json
//productdefine/common/device/MySOC.json
```
{
"target_os": "ohos",
"target_cpu": "arm"
}
```
Currently, **target_cpu** can be set to **arm** only. In the future, you can set the value depending on the CPU architecture, such as **arm64**, **riscv**, or **x86**.
### 2. Defining a Product
Currently, **target\_cpu** can be set to **arm** only. In the future, you can set the value depending on the CPU architecture, such as **arm64**, **riscv**, or **x86**.
### Defining a Product<a name="section145mcpsimp"></a>
Create a JSON file named after the product name in the **//productdefine/common/products** directory. This file is used to describe the SoC used by the product and the required subsystems. Configure the file as follows:
Create a JSON file named after the product name in the **//productdefine/common/products** directory. This file is used to describe the SoC used by the product and the required subsystems.
Configure the file as follows:
`//productdefine/common/products/MyProduct.json`
```json
//productdefine/common/products/MyProduct.json
```
{
"product_name": "MyProduct",
"product_company" : "MyProductVendor",
......@@ -61,35 +63,36 @@ Configure the file as follows:
}
```
The main configurations are as follows:
1. **product_device**: SoC used by the product.
1. **product\_device**: SoC used by the product.
2. **type**: system level. In this example, set it to **standard**.
3. **parts**: subsystems to enable. A subsystem can be treated as an independently built functional block.
3. **parts**: subsystem to enable. A subsystem can be treated as an independently built functional block.
You can find available subsystems in **//build/subsystem_config.json**. You can also customize subsystems.
You can find available subsystems in **//build/subsystem\_config.json**. You can also customize subsystems.
You are advised to copy the configuration file of Hi3516D V300 and delete the **hisilicon_products** subsystem, which is used to compile the kernel for Hi3516D V300.
You are advised to copy the configuration file of Hi3516D V300 and delete the **hisilicon\_products** subsystem, which is used to compile the kernel for Hi3516D V300.
### 3. Verifying the Porting
### Verifying the Porting<a name="section163mcpsimp"></a>
Run the following command to start the build of your product:
`./build.sh --product-name MyProduct `
After the build is complete, you can view the built OpenHarmony image file in the following directory:
```
./build.sh --product-name MyProduct
```
`//out/ohos-arm-release/packages/phone/images`
After the build is complete, you can view the built OpenHarmony image file in **//out/ohos-arm-release/packages/phone/images**.
## Porting the Kernel
## Porting the Kernel<a name="section171mcpsimp"></a>
Now, you need to port the Linux kernel to enable it to run successfully.
### 1. Adding a Kernel-built Subsystem to the SoC
### 1. Adding a Kernel-built Subsystem to the SoC<a name="section174mcpsimp"></a>
Add the following subsystem configuration to the **//build/subsystem_config.json** file:
Add the following subsystem configuration to the **//build/subsystem\_config.json** file:
```json
```
"MySOCVendor_products": {
"project": "hmf/MySOCVendor_products",
"path": "device/MySOCVendor/MySOC/build",
......@@ -100,46 +103,90 @@ Add the following subsystem configuration to the **//build/subsystem_config.json
Then, open the configuration file **//productdefine/common/products/MyProduct.json**, which is used to define the product, and add the new subsystem to the product.
### 2. Building the Kernel
### 2. Building the Kernel<a name="section182mcpsimp"></a>
The path for building the subsystem is defined when you define the subsystem in the previous step. The path is **//device/MySOCVendor/MySOC/build**. Now, you need to create a build script in this path to instruct the build system to build the kernel.
The OpenHarmony source code provides the Linux kernel 4.19, which is archived in **//kernel/linux-4.19**. This section uses this kernel version as an example to describe how to build the kernel.
Currently, the OpenHarmony source code provides the Linux kernel 4.19, which is archived in **//kernel/linux-4.19**. You are advised to use this kernel. However, if the SoC vendor does not provide the kernel of this version, use that provided by the vendor.
You are advised to use patches to modify or extend the SoC kernel.
The path for building the subsystem is defined when you define the subsystem in the previous step. The path is **//device/MySOCVendor/MySOC/build**. Now, you need to create a build script in this path to instruct the build system to build the kernel.
The recommended directory structure is as follows:
```
├── build
   ├── kernel
   │ ├── linux
   │ ├──standard_patch_for_4_19.patch
   ├── BUILD.gn
   ├── ohos.build
│ ├── kernel
│ │ ├── linux
│ ├──standard_patch_for_4_19.patch // Patch for the Linux kernel 4.19
│ ├── BUILD.gn
│ ├── ohos.build
```
The **BUILD.gn** file is the only entry for building the subsystem.
The expected build result is as follows:
| File| Description|
|------|------|
|$root_build_dir/packages/phone/images/uImage| Kernel image|
|$root_build_dir/packages/phone/images/uboot | Bootloader image|
### 3. Verifying the Porting
<a name="table193mcpsimp"></a>
<table><tbody><tr id="row198mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry199mcpsimpp0"><a name="entry199mcpsimpp0"></a><a name="entry199mcpsimpp0"></a>File</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry200mcpsimpp0"><a name="entry200mcpsimpp0"></a><a name="entry200mcpsimpp0"></a>Description</p>
</td>
</tr>
<tr id="row201mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry202mcpsimpp0"><a name="entry202mcpsimpp0"></a><a name="entry202mcpsimpp0"></a>$root_build_dir/packages/phone/images/uImage</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry203mcpsimpp0"><a name="entry203mcpsimpp0"></a><a name="entry203mcpsimpp0"></a>Kernel image</p>
</td>
</tr>
<tr id="row204mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry205mcpsimpp0"><a name="entry205mcpsimpp0"></a><a name="entry205mcpsimpp0"></a>$root_build_dir/packages/phone/images/uboot</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry206mcpsimpp0"><a name="entry206mcpsimpp0"></a><a name="entry206mcpsimpp0"></a>Bootloader image</p>
</td>
</tr>
</tbody>
</table>
### 3. Verifying the Porting<a name="section207mcpsimp"></a>
Now start build, and check whether the kernel image is generated as expected.
## Porting the HDF Driver
## 用户态启动引导<a name="section20665151016586"></a>
1. 用户态进程启动引导总览。
![](figure/overview-of-use-mode-process-startup.png)
系统上电加载内核后,按照以下流程完成系统各个服务和应用的启动:
1. 内核启动init进程,一般在bootloader启动内核时通过设置内核的cmdline来指定init的位置;如上图所示的"init=/init root/dev/xxx"。
2. 2init进程启动后,会挂载tmpfs,procfs,创建基本的dev设备节点,提供最基本的根文件系统。
3. init继续启动ueventd监听内核热插拔事件,为这些设备创建dev设备节点;包括block设备各个分区设备都是通过此事件创建。
4. init进程挂载block设备各个分区(system,vendor),开始扫描各个系统服务的init启动脚本,并拉起各个SA服务。
5. samgr是各个SA的服务注册中心,每个SA启动时,都需要向samgr注册,每个SA会分配一个ID,应用可以通过该ID访问SA。
6. foundation是一个特殊的SA服务进程,提供了用户程序管理框架及基础服务;由该进程负责应用的生命周期管理。
7. 由于应用都需要加载JS的运行环境,涉及大量准备工作,因此appspawn作为应用的孵化器,在接收到foundation里的应用启动请求时,可以直接孵化出应用进程,减少应用启动时间。
2. init。
init启动引导组件配置文件包含了所有需要由init进程启动的系统关键服务的服务名、可执行文件路径、权限和其他信息。每个系统服务各自安装其启动脚本到/system/etc/init目录下。
新芯片平台移植时,平台相关的初始化配置需要增加平台相关的初始化配置文件/vendor/etc/init/init.\{hardware\}.cfg;该文件完成平台相关的初始化设置,如安装ko驱动,设置平台相关的/proc节点信息。
init相关进程代码在//base/startup/init\_lite目录下,该进程是系统第一个进程,无其它依赖。
初始化配置文件具体的开发指导请参考 [init启动引导组件](../subsystems/subsys-boot-init.md)。
## Porting the HDF Driver<a name="section210mcpsimp"></a>
### 1. LCD<a name="section212mcpsimp"></a>
### 1. LCD
This section describes how to port a Liquid Crystal Display (LCD) driver. The hardware driver framework (HDF) designs a driver model for the LCD. To support an LCD, you must compile a driver, generate a model instance in the driver, and register the instance.
This section describes how to port a Liquid Crystal Display \(LCD\) driver. The hardware driver framework \(HDF\) designs a driver model for the LCD. To support an LCD, you must compile a driver, generate a model instance in the driver, and register the instance.
The LCD drivers are stored in the **//drivers/framework/model/display/driver/panel** directory.
- Create a panel driver.
In the **Init** method of the driver, call **RegisterPanel** to register the model instance.
```C
```
int32_t XXXInit(struct HdfDeviceObject *object)
{
struct PanelData *panel = CreateYourPanel();
......@@ -161,11 +208,9 @@ struct HdfDriverEntry g_xxxxDevEntry = {
HDF_INIT(g_xxxxDevEntry);
```
- Configure and load the panel driver.
All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device_info/device_info.hcs** file. Modify the file by adding configurations for the device named **device_lcd** to the host named **display**.
Note: The value of **moduleName** must be the same as that in the panel driver.
- Configure and load the panel driver. All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device\_info/device\_info.hcs** file. Modify the file by adding configurations for the device named **device\_lcd** to the host named **display**. Note: The value of **moduleName** must be the same as that in the panel driver.
```hcs
```
root {
...
display :: host {
......@@ -181,16 +226,17 @@ root {
}
```
For details about driver development, see [LCD](https://gitee.com/openharmony/docs/blob/master/en/device-dev/driver/driver-peripherals-lcd-des.md).
For details about driver development, see [LCD](../driver/driver-peripherals-lcd-des.md).
### 2. Touchscreen<a name="section229mcpsimp"></a>
### 2. Touchscreen
This section describes how to port a touchscreen driver. The touchscreen driver is stored in the **//drivers/framework/model/input/driver/touchscreen** directory. To port a touchscreen driver, register a **ChipDevice** model instance.
- Create a touchscreen driver.
Create the **touch_ic_name.c** file in the directory. Replace **ic_name** with the name of your chip. The file template is as follows:
Create the **touch\_ic\_name.c** file in the directory. Replace **ic\_name** with the name of your chip. The file template is as follows:
```C
```
#include "hdf_touch.h"
static int32_t HdfXXXXChipInit(struct HdfDeviceObject *device)
......@@ -213,21 +259,52 @@ HDF_INIT(g_touchXXXXChipEntry);
```
Implement the following interfaces in **ChipDevice**:
| Interface| Description|
|------|------|
|int32_t (*Init)(ChipDevice *device)| Initializes a touchscreen.|
|int32_t (*Detect)(ChipDevice *device)| Detects a touchscreen.|
|int32_t (*Suspend)(ChipDevice *device)| Suspends a touchscreen.|
|int32_t (*Resume)(ChipDevice *device)| Resumes a touchscreen.|
|int32_t (*DataHandle)(ChipDevice *device)| Reads data from a touchscreen and writes the touch point data to **device > driver > frameData**.|
|int32_t (*UpdateFirmware)(ChipDevice *device)| Upgrades the firmware.|
<a name="table240mcpsimp"></a>
<table><tbody><tr id="row245mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry246mcpsimpp0"><a name="entry246mcpsimpp0"></a><a name="entry246mcpsimpp0"></a>Interface</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry247mcpsimpp0"><a name="entry247mcpsimpp0"></a><a name="entry247mcpsimpp0"></a>Description</p>
</td>
</tr>
<tr id="row248mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry249mcpsimpp0"><a name="entry249mcpsimpp0"></a><a name="entry249mcpsimpp0"></a>int32_t (*Init)(ChipDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry250mcpsimpp0"><a name="entry250mcpsimpp0"></a><a name="entry250mcpsimpp0"></a>Initializes a touchscreen.</p>
</td>
</tr>
<tr id="row251mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry252mcpsimpp0"><a name="entry252mcpsimpp0"></a><a name="entry252mcpsimpp0"></a>int32_t (*Detect)(ChipDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry253mcpsimpp0"><a name="entry253mcpsimpp0"></a><a name="entry253mcpsimpp0"></a>Detects a touchscreen.</p>
</td>
</tr>
<tr id="row254mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry255mcpsimpp0"><a name="entry255mcpsimpp0"></a><a name="entry255mcpsimpp0"></a>int32_t (*Suspend)(ChipDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry256mcpsimpp0"><a name="entry256mcpsimpp0"></a><a name="entry256mcpsimpp0"></a>Suspends a touchscreen.</p>
</td>
</tr>
<tr id="row257mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry258mcpsimpp0"><a name="entry258mcpsimpp0"></a><a name="entry258mcpsimpp0"></a>int32_t (*Resume)(ChipDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry259mcpsimpp0"><a name="entry259mcpsimpp0"></a><a name="entry259mcpsimpp0"></a>Resumes a touchscreen.</p>
</td>
</tr>
<tr id="row260mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry261mcpsimpp0"><a name="entry261mcpsimpp0"></a><a name="entry261mcpsimpp0"></a>int32_t (*DataHandle)(ChipDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry262mcpsimpp0"><a name="entry262mcpsimpp0"></a><a name="entry262mcpsimpp0"></a>Reads data from a touchscreen and writes the touch point data to <strong id="b109171435105216"><a name="b109171435105216"></a><a name="b109171435105216"></a>device</strong> &gt; <strong id="b103219389526"><a name="b103219389526"></a><a name="b103219389526"></a>driver</strong> &gt; <strong id="b0459173945212"><a name="b0459173945212"></a><a name="b0459173945212"></a>frameData</strong>.</p>
</td>
</tr>
<tr id="row263mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry264mcpsimpp0"><a name="entry264mcpsimpp0"></a><a name="entry264mcpsimpp0"></a>int32_t (*UpdateFirmware)(ChipDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry265mcpsimpp0"><a name="entry265mcpsimpp0"></a><a name="entry265mcpsimpp0"></a>Upgrades the firmware.</p>
</td>
</tr>
</tbody>
</table>
- Configure the product and load the driver.
All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device_info/device_info.hcs** file. Modify the file by adding configurations for the device named **device_touch_chip** to the host named **input**.
Note: The value of **moduleName** must be the same as that in the touchscreen driver.
All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device\_info/device\_info.hcs** file. Modify the file by adding configurations for the device named **device\_touch\_chip** to the host named **input**. Note: The value of **moduleName** must be the same as that in the touchscreen driver.
```hcs
```
deviceN :: deviceNode {
policy = 0;
priority = 130;
......@@ -238,31 +315,54 @@ Note: The value of **moduleName** must be the same as that in the touchscreen dr
}
```
For details about driver development, see [TOUCHSCREEN](https://gitee.com/openharmony/docs/blob/master/en/device-dev/driver/driver-peripherals-touch-des.md).
### 3. WLAN
The WLAN driver is divided into two parts. One of the parts manages WLAN devices, and the other part manages WLAN traffic. **HDF WLAN** provides abstraction for the two parts. Currently, only the WLAN with the SDIO interface is supported.
<img src="./figure/hdf_wifi.png" alt="WLAN structure" width="800"/>
To support a chip, implement a **ChipDriver** for it. The major task is to implement the following interfaces provided by **HDF_WLAN_CORE** and **NetDevice**.
| Interface| Header File| Description|
|------|------|------|
| HdfChipDriverFactory| `//drivers/framework/include/wifi/hdf_wlan_chipdriver_manager.h`| Factory of the **ChipDriver**, which is used to support multiple WLAN interfaces of a chip.|
| HdfChipDriver | `//drivers/framework/include/wifi/wifi_module.h`| Manages a specific WLAN interface. Each WLAN interface corresponds to an **HdfChipDriver**.|
|NetDeviceInterFace| `//drivers/framework/include/wifi/net_device.h`| Communicates with the protocol stack, such as sending data and setting the status of network interfaces.|
For details about driver development, see [TOUCHSCREEN](../driver/driver-peripherals-touch-des.md).
### 3. WLAN<a name="section274mcpsimp"></a>
The WLAN driver is divided into two parts. One of the parts manages WLAN devices, and the other part manages WLAN traffic. HDF WLAN provides abstraction for the two parts. Currently, only the WLAN with the SDIO interface is supported.
**Figure 1** WLAN chip<a name="fig16997123013494"></a>
![](figure/wlan-chip.png "wlan-chip")
To support a chip, implement a **ChipDriver** for it. The major task is to implement the following interfaces provided by **HDF\_WLAN\_CORE** and **NetDevice**.
<a name="table280mcpsimp"></a>
<table><tbody><tr id="row286mcpsimp"><td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry287mcpsimpp0"><a name="entry287mcpsimpp0"></a><a name="entry287mcpsimpp0"></a>Interface</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry288mcpsimpp0"><a name="entry288mcpsimpp0"></a><a name="entry288mcpsimpp0"></a>Header File</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry289mcpsimpp0"><a name="entry289mcpsimpp0"></a><a name="entry289mcpsimpp0"></a>Description</p>
</td>
</tr>
<tr id="row290mcpsimp"><td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry291mcpsimpp0"><a name="entry291mcpsimpp0"></a><a name="entry291mcpsimpp0"></a>HdfChipDriverFactory</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="p136856366385"><a name="p136856366385"></a><a name="p136856366385"></a>//drivers/framework/include/wifi/hdf_wlan_chipdriver_manager.h</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry294mcpsimpp0"><a name="entry294mcpsimpp0"></a><a name="entry294mcpsimpp0"></a>Factory of the <strong id="b0602182913593"><a name="b0602182913593"></a><a name="b0602182913593"></a>ChipDriver</strong>, which is used to support multiple WLAN interfaces of a chip.</p>
</td>
</tr>
<tr id="row295mcpsimp"><td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry296mcpsimpp0"><a name="entry296mcpsimpp0"></a><a name="entry296mcpsimpp0"></a>HdfChipDriver</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="p714312457389"><a name="p714312457389"></a><a name="p714312457389"></a>//drivers/framework/include/wifi/wifi_module.h</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry299mcpsimpp0"><a name="entry299mcpsimpp0"></a><a name="entry299mcpsimpp0"></a>Manages a specific WLAN interface. Each WLAN interface corresponds to an <strong id="b1364875755918"><a name="b1364875755918"></a><a name="b1364875755918"></a>HdfChipDriver</strong>.</p>
</td>
</tr>
<tr id="row300mcpsimp"><td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry301mcpsimpp0"><a name="entry301mcpsimpp0"></a><a name="entry301mcpsimpp0"></a>NetDeviceInterFace</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="p015815313819"><a name="p015815313819"></a><a name="p015815313819"></a>//drivers/framework/include/net/net_device.h</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry304mcpsimpp0"><a name="entry304mcpsimpp0"></a><a name="entry304mcpsimpp0"></a>Communicates with the protocol stack, such as sending data and setting the status of network interfaces.</p>
</td>
</tr>
</tbody>
</table>
To port a WLAN driver, perform the following steps:
1. Create an HDF driver.
1. Create an HDF driver. You are advised to place the code file in the **//device/MySoCVendor/peripheral/wifi/chip\_name/** directory. The file template is as follows:
You are advised to place the code file in the **//device/MySoCVendor/peripheral/wifi/chip_name/** directory.
The file template is as follows:
```C
```
static int32_t HdfWlanHisiChipDriverInit(struct HdfDeviceObject *device) {
static struct HdfChipDriverFactory factory = CreateChipDriverFactory();
struct HdfChipDriverManager *driverMgr = HdfWlanGetChipDriverMgr();
......@@ -284,34 +384,96 @@ HDF_INIT(g_hdfXXXChipEntry);
```
Create an **HdfChipDriverFactory** in the **CreateChipDriverFactory**. The interfaces are as follows:
| Interface| Description|
|------|------|
|const char *driverName| Indicates the driver name.|
|int32_t (*InitChip)(struct HdfWlanDevice *device)| Initializes a chip.|
|int32_t (*DeinitChip)(struct HdfWlanDevice *device)| Deinitializes a chip.|
|void (*ReleaseFactory)(struct HdfChipDriverFactory *factory)| Releases the **HdfChipDriverFactory** object.|
|struct HdfChipDriver *(*Build)(struct HdfWlanDevice *device, uint8_t ifIndex)|Creates an **HdfChipDriver**. In the input parameters, **device** indicates the device information, and **ifIndex** indicates the sequence number of this interface in the chip.|
|void (*Release)(struct HdfChipDriver *chipDriver)| Releases the **HdfChipDriver**.
|uint8_t (*GetMaxIFCount)(struct HdfChipDriverFactory *factory)| Obtains the maximum number of interfaces supported by the current chip.|
<a name="table312mcpsimp"></a>
<table><tbody><tr id="row317mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry318mcpsimpp0"><a name="entry318mcpsimpp0"></a><a name="entry318mcpsimpp0"></a>Interface</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry319mcpsimpp0"><a name="entry319mcpsimpp0"></a><a name="entry319mcpsimpp0"></a>Description</p>
</td>
</tr>
<tr id="row320mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry321mcpsimpp0"><a name="entry321mcpsimpp0"></a><a name="entry321mcpsimpp0"></a>const char *driverName</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry322mcpsimpp0"><a name="entry322mcpsimpp0"></a><a name="entry322mcpsimpp0"></a>Indicates the driver name.</p>
</td>
</tr>
<tr id="row323mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry324mcpsimpp0"><a name="entry324mcpsimpp0"></a><a name="entry324mcpsimpp0"></a>int32_t (*InitChip)(struct HdfWlanDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry325mcpsimpp0"><a name="entry325mcpsimpp0"></a><a name="entry325mcpsimpp0"></a>Initializes a chip.</p>
</td>
</tr>
<tr id="row326mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry327mcpsimpp0"><a name="entry327mcpsimpp0"></a><a name="entry327mcpsimpp0"></a>int32_t (*DeinitChip)(struct HdfWlanDevice *device)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry328mcpsimpp0"><a name="entry328mcpsimpp0"></a><a name="entry328mcpsimpp0"></a>Deinitializes a chip.</p>
</td>
</tr>
<tr id="row329mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry330mcpsimpp0"><a name="entry330mcpsimpp0"></a><a name="entry330mcpsimpp0"></a>void (_ReleaseFactory)(struct HdfChipDriverFactory _factory)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry331mcpsimpp0"><a name="entry331mcpsimpp0"></a><a name="entry331mcpsimpp0"></a>Releases the <strong id="b088418304215"><a name="b088418304215"></a><a name="b088418304215"></a>HdfChipDriverFactory</strong> object.</p>
</td>
</tr>
<tr id="row332mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry333mcpsimpp0"><a name="entry333mcpsimpp0"></a><a name="entry333mcpsimpp0"></a>struct HdfChipDriver _(_Build)(struct HdfWlanDevice *device, uint8_t ifIndex)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry334mcpsimpp0"><a name="entry334mcpsimpp0"></a><a name="entry334mcpsimpp0"></a>Creates an <strong id="b1253415231438"><a name="b1253415231438"></a><a name="b1253415231438"></a>HdfChipDriver</strong>. In the input parameters, <strong id="b45408231539"><a name="b45408231539"></a><a name="b45408231539"></a>device</strong> indicates the device information, and <strong id="b1154116231432"><a name="b1154116231432"></a><a name="b1154116231432"></a>ifIndex</strong> indicates the sequence number of this interface in the chip.</p>
</td>
</tr>
<tr id="row335mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry336mcpsimpp0"><a name="entry336mcpsimpp0"></a><a name="entry336mcpsimpp0"></a>void (_Release)(struct HdfChipDriver _chipDriver)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry337mcpsimpp0"><a name="entry337mcpsimpp0"></a><a name="entry337mcpsimpp0"></a>Releases the <strong id="b155367141846"><a name="b155367141846"></a><a name="b155367141846"></a>HdfChipDriver</strong>.</p>
</td>
</tr>
<tr id="row338mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry339mcpsimpp0"><a name="entry339mcpsimpp0"></a><a name="entry339mcpsimpp0"></a>uint8_t (*GetMaxIFCount)(struct HdfChipDriverFactory *factory)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry340mcpsimpp0"><a name="entry340mcpsimpp0"></a><a name="entry340mcpsimpp0"></a>Obtains the maximum number of interfaces supported by the current chip.</p>
</td>
</tr>
</tbody>
</table>
Implement the following interfaces in the **HdfChipDriver**.
|Interface| Description|
|------|------|
|int32_t (*init)(struct HdfChipDriver *chipDriver, NetDevice *netDev)| Initializes the current network interface. The **NetDeviceInterFace** needs to be provided for the **netDev**.|
|int32_t (*deinit)(struct HdfChipDriver *chipDriver, NetDevice *netDev)| Deinitializes the current network interface.|
|struct HdfMac80211BaseOps *ops| Provides the WLAN basic capability interface set.|
|struct HdfMac80211STAOps *staOps| Provides the interface set required for supporting the standalone (STA) mode.|
|struct HdfMac80211APOps *apOps| Provides the interface set required for supporting the access point (AP) mode.|
<a name="table342mcpsimp"></a>
<table><tbody><tr id="row347mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry348mcpsimpp0"><a name="entry348mcpsimpp0"></a><a name="entry348mcpsimpp0"></a>Interface</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry349mcpsimpp0"><a name="entry349mcpsimpp0"></a><a name="entry349mcpsimpp0"></a>Description</p>
</td>
</tr>
<tr id="row350mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry351mcpsimpp0"><a name="entry351mcpsimpp0"></a><a name="entry351mcpsimpp0"></a>int32_t (*init)(struct HdfChipDriver *chipDriver, NetDevice *netDev)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry352mcpsimpp0"><a name="entry352mcpsimpp0"></a><a name="entry352mcpsimpp0"></a>Initializes the current network interface. The <strong id="b936614441419"><a name="b936614441419"></a><a name="b936614441419"></a>NetDeviceInterFace</strong> needs to be provided for the <strong id="b1237215441347"><a name="b1237215441347"></a><a name="b1237215441347"></a>netDev</strong>.</p>
</td>
</tr>
<tr id="row353mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry354mcpsimpp0"><a name="entry354mcpsimpp0"></a><a name="entry354mcpsimpp0"></a>int32_t (*deinit)(struct HdfChipDriver *chipDriver, NetDevice *netDev)</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry355mcpsimpp0"><a name="entry355mcpsimpp0"></a><a name="entry355mcpsimpp0"></a>Deinitializes the current network interface.</p>
</td>
</tr>
<tr id="row356mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry357mcpsimpp0"><a name="entry357mcpsimpp0"></a><a name="entry357mcpsimpp0"></a>struct HdfMac80211BaseOps *ops</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry358mcpsimpp0"><a name="entry358mcpsimpp0"></a><a name="entry358mcpsimpp0"></a>Provides the WLAN basic capability interface set.</p>
</td>
</tr>
<tr id="row359mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry360mcpsimpp0"><a name="entry360mcpsimpp0"></a><a name="entry360mcpsimpp0"></a>struct HdfMac80211STAOps *staOps</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry361mcpsimpp0"><a name="entry361mcpsimpp0"></a><a name="entry361mcpsimpp0"></a>Provides the interface set required for supporting the standalone (STA) mode.</p>
</td>
</tr>
<tr id="row362mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry363mcpsimpp0"><a name="entry363mcpsimpp0"></a><a name="entry363mcpsimpp0"></a>struct HdfMac80211APOps *apOps</p>
</td>
<td class="cellrowborder" valign="top" width="50%"><p id="entry364mcpsimpp0"><a name="entry364mcpsimpp0"></a><a name="entry364mcpsimpp0"></a>Provides the interface set required for supporting the access point (AP) mode.</p>
</td>
</tr>
</tbody>
</table>
2. Compile the configuration file to describe the devices supported by the driver.
Create the chip configuration file **//vendor/MyProductVendor/MyProduct/config/wifi/wlan\_chip\_chip\_name.hcs** in the product configuration directory.
2. Compile the configuration file to describe the devices supported by the driver.
Replace **MyProductVendor**, **MyProduct**, and **chip\_name** in the path with the actual names.
Create the chip configuration file **//vendor/MyProductVendor/MyProduct/config/wifi/wlan_chip_chip_name.hcs** in the product configuration directory.
Replace **MyProductVendor**, **MyProduct**, and **chip_name** in the path with the actual names.
The sample code is as follows:
```hcs
```
root {
wlan_config {
chip_name :& chipList {
......@@ -330,11 +492,9 @@ root {
3. Edit the configuration file and load the driver.
All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device_info/device_info.hcs** file. Modify the file by adding configurations for the device named **device_wlan_chips** to the host named **network**.
Note: The value of **moduleName** must be the same as that in the touchscreen driver.
The sample code is as follows:
All device information about the product is defined in the **//vendor/MyProductVendor/MyProduct/config/device\_info/device\_info.hcs** file. Modify the file by adding configurations for the device named **device\_wlan\_chips** to the host named **network**. Note: The value of **moduleName** must be the same as that in the touchscreen driver.
```hcs
```
deviceN :: deviceNode {
policy = 0;
preload = 2;
......@@ -346,8 +506,8 @@ The sample code is as follows:
4. Build the driver.
- Create a kernel configuration menu.
Create a **Kconfig** file in the **//device/MySoCVendor/peripheral** directory. The file template is as follows:
- Create a kernel configuration menu. Create a **Kconfig** file in the **//device/MySoCVendor/peripheral** directory. The file template is as follows:
```
config DRIVERS_WLAN_XXX
bool "Enable XXX WLAN Host driver"
......@@ -358,20 +518,24 @@ config DRIVERS_WLAN_XXX
```
Add the following sample code to the end of the **//drivers/adapter/khdf/linux/model/network/wifi/Kconfig** file to add the configuration menu to the kernel:
```
source "../../../../../device/MySoCVendor/peripheral/Kconfig"
```
- Create a build script.
Add the following configuration to the end of the **//drivers/adapter/khdf/linux/model/network/wifi/Makefile** file:
Add the following configuration to the end of the **//drivers/adapter/khdf/linux/model/network/wifi/Makefile** file:
```
HDF_DEVICE_ROOT := $(HDF_DIR_PREFIX)/../device
obj-$(CONFIG_DRIVERS_WLAN_XXX) += $(HDF_DEVICE_ROOT)/MySoCVendor/peripheral/build/standard/
```
When **DRIVERS_WLAN_XXX** is enabled in the kernel, **makefile** in **//device/MySoCVendor/peripheral/build/standard/** is called.
When **DRIVERS\_WLAN\_XXX** is enabled in the kernel, **makefile** in **//device/MySoCVendor/peripheral/build/standard/** is called. For more details, see [WLAN Development](../guide/device-wlan-led-outcontrol.md).
### 4. Samples<a name="section11253153018415"></a>
For details about the porting sample, see the DAYU development board adaptation guide.
For more details, see [WLAN Development](https://gitee.com/openharmony/docs/blob/master/en/device-dev/guide/device-wifi.md).
......@@ -2,39 +2,35 @@
- [Mini and Small Systems](quickstart-lite.md)
- [Overview](quickstart-lite-overview.md)
- [Introduction to the Development Boards](quickstart-lite-introduction.md)
- [Hi3861 Development Board](quickstart-lite-introduction-hi3861.md)
- [Hi3516 Development Board](quickstart-lite-introduction-hi3516.md)
- [Hi3518 Development Board](quickstart-lite-introduction-hi3518.md)
- [Introduction](quickstart-lite-introduction.md)
- [Hi3861 Development Board](oem_minitinier_des_3861.md)
- [Hi3516 Development Board](oem_minitinier_des_3516.md)
- [Hi3518 Development Board](oem_minitinier_des_3518.md)
- [Environment Setup](quickstart-lite-env-setup.md)
- [Overview](quickstart-lite-env-setup-des.md)
- [Windows Development Environment](quickstart-lite-env-setup-win.md)
- [Ubuntu Build Environment](quickstart-lite-env-setup-lin.md)
- [FAQ](quickstart-lite-env-setup-faqs.md)
- [Overview](quickstart-lite-env-setup-overview.md)
- [Setting Up Windows Development Environment](quickstart-lite-env-setup-windows.md)
- [Setting Up Ubuntu Development Environment](quickstart-lite-env-setup-linux.md)
- [FAQs](quickstart-lite-env-setup-faqs.md)
- [How to Develop](quickstart-lite-steps.md)
- [Hi3861](quickstart-lite-steps-board3861.md)
- [Setting Up the Environment](quickstart-lite-steps-board3861-setting.md)
- [WLAN Connection](quickstart-lite-steps-board3861-connection.md)
- [Running a Hello World Program](quickstart-lite-steps-board3861-running.md)
- [FAQs](quickstart-lite-steps-board3861-faqs.md)
- [Hi3516](quickstart-lite-steps-board3516.md)
- [Setting Up the Environment](quickstart-lite-steps-board3516-setting.md)
- [Running a Hello OHOS Program](quickstart-lite-steps-board3516-running.md)
- [Developing a Driver](quickstart-lite-steps-board3516-program.md)
- [FAQs](quickstart-lite-steps-board3516-faqs.md)
- [Hi3518](quickstart-lite-steps-board3518.md)
- [Setting Up the Environment](quickstart-lite-steps-board3518-setting.md)
- [Running a Hello OHOS Program](quickstart-lite-steps-board3518-running.md)
- [FAQs](quickstart-lite-steps-board3518-faqs.md)
- [Hi3861](quickstart-lite-steps-hi3861.md)
- [Setting Up the Environment](quickstart-lite-steps-hi3861-setting.md)
- [Setting Up WLAN Connection](quickstart-lite-steps-hi3861-connection.md)
- [Running a Hello World Program](quickstart-lite-steps-hi3861-running.md)
- [FAQs](quickstart-lite-steps-hi3861-faqs.md)
- [Hi3516](quickstart-lite-steps-hi3516.md)
- [Setting Up the Environment](quickstart-lite-steps-hi3516-setting.md)
- [Running a Hello OHOS Program](quickstart-lite-steps-hi3516-running.md)
- [Developing a Driver](quickstart-lite-steps-hi3516-program.md)
- [FAQs](quickstart-lite-steps-hi3516-faqs.md)
- [Hi3518](quickstart-lite-steps-hi3518.md)
- [Setting Up the Environment](quickstart-lite-steps-hi3518-setting.md)
- [Running a Hello OHOS Program](quickstart-lite-steps-hi3518-running.md)
- [FAQs](quickstart-lite-steps-hi3518-faqs.md)
- [Standard System](quickstart-standard.md)
- [Introduction](quickstart-standard-description.md)
- [Introduction](quickstart-standard-overview.md)
- [Setting Up Windows Development Environment](quickstart-standard-windows-environment.md)
- [Setting Up Ubuntu Development Environment in Docker Mode and Building Source Code](quickstart-standard-docker-environment.md)
- [Setting Up Ubuntu Development Environment with Installation Package and Building Source Code](quickstart-standard-package-environment.md)
- [Setting Up Ubuntu Development Environment in Docker Mode](quickstart-standard-docker-environment.md)
- [Setting Up Ubuntu Development Environment with Installation Package](quickstart-standard-package-environment.md)
- [Burning Images](quickstart-standard-burn.md)
- [FAQs](quickstart-standard-faq.md)
\ No newline at end of file
- [Running an Image](quickstart-standard-running.md)
- [FAQs](quickstart-standard-faqs.md)
\ No newline at end of file
......@@ -7,10 +7,8 @@
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 1** Front view of the Hi3516D V300 board<a name="fig11402183715219"></a>
![](figure/3516正面.png)
**Figure 1** Hi3516D V300 front view<a name="fig6340825506"></a>
![](figure/hi3516d-v300-front-view.png "hi3516d-v300-front-view")
## Development Board Specifications<a name="section15192203316533"></a>
......
......@@ -7,13 +7,11 @@
Hi3518E V300 is a next-generation system on chip \(SoC\) designed for the industry-dedicated smart HD IP camera. It introduces a next-generation image signal processor \(ISP\), the H.265 video compression encoder, and the advanced low-power process and architecture design, leading the industry in terms of low bit rate, high image quality, and low power consumption.
**Figure 1** Front view of the Hi3518E V300 board<a name="fig1187174485310"></a>
![](figure/front-view-of-the-hi3518e-v300-board.png "front-view-of-the-hi3518e-v300-board")
**Figure 1** Hi3518E V300 front view<a name="fig73059502010"></a>
![](figure/hi3518e-v300-front-view.png "hi3518e-v300-front-view")
**Figure 2** Rear view of the Hi3518E V300 board<a name="fig73195258113"></a>
![](figure/hi3518正背面.png)
**Figure 2** Hi3518E V300 rear view<a name="fig14828141713116"></a>
![](figure/hi3518e-v300-rear-view.png "hi3518e-v300-rear-view")
## Development Board Specifications<a name="section765112478446"></a>
......
......@@ -9,27 +9,21 @@
The Hi3861 WLAN module is a development board with 2 x 5 cm form factor. It contains a 2.4 GHz WLAN SoC that highly integrates the IEEE 802.11b/g/n baseband and radio frequency \(RF\) circuit. This module provides open and easy-to-use development and debugging environments for running OpenHarmony.
**Figure 1** Appearance of Hi3861 WLAN module<a name="fig74884420237"></a>
![](figure/3861正面.png)
**Figure 1** Appearance of Hi3861 WLAN module<a name="fig5781557185810"></a>
![](figure/appearance-of-hi3861-wlan-module.png "appearance-of-hi3861-wlan-module")
The Hi3861 WLAN module can also be connected to the Hi3861 mother board to expand its peripheral capabilities. The following figure shows the Hi3861 mother board.
**Figure 2** Appearance of the Hi3861 mother board<a name="fig111746288192"></a>
![](figure/en-us_image_0000001174350615.png)
**Figure 2** Appearance of the Hi3861 mother board<a name="fig12182375916"></a>
![](figure/appearance-of-the-hi3861-mother-board.png "appearance-of-the-hi3861-mother-board")
- 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.
- The Hi3861 chip integrates the high-performance 32-bit microprocessor, hardware security engine, and various peripheral interfaces. The peripheral interfaces include the Synchronous Peripheral Interface \(SPI\), Universal Asynchronous Receiver & Transmitter \(UART\), the Inter Integrated Circuit \(I2C\), Pulse Width Modulation \(PWM\), General Purpose Input/Output \(GPIO\) interface, and Analog to Digital Converter \(ADC\). The Hi3861 chip also supports the high-speed Secure Digital Input/Output \(SDIO\) 2.0 interface, with a maximum clock frequency of 50 MHz. This chip has a built-in static random access memory \(SRAM\) and flash memory, so that programs can run independently or run from a flash drive.
- The Hi3861 chip applies to Internet of Things \(IoT\) devices such as smart home appliances.
**Figure 3** Hi3861 functions<a name="f0d52fa2f3b094c688c805a373a6ec970"></a>
![](figure/en-us_image_0000001128311066.png)
**Figure 3** Hi3861 functions<a name="fig1367035113590"></a>
![](figure/hi3861-functions.png "hi3861-functions")
## Resources and Constraints<a name="section82610215014"></a>
......
# FAQ<a name="EN-US_TOPIC_0000001128470858"></a>
# FAQs<a name="EN-US_TOPIC_0000001128470858"></a>
- [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)
......
# Ubuntu Build Environment<a name="EN-US_TOPIC_0000001174350605"></a>
# Setting Up Ubuntu Development Environment<a name="EN-US_TOPIC_0000001174350605"></a>
- [Obtaining Source Code and Tools](#section1897711811517)
- [Obtaining Source Code](#section1545225464016)
- [Installing and Configuring Python](#section1238412211211)
- [Installing gn](#section29216201423)
- [Installing ninja](#section8762358731)
- [Installing LLVM](#section12202192215415)
- [Installing Necessary Libraries and Tools](#section108201740181219)
- [Installing Python3](#section1238412211211)
- [Installing LLVM \(Required only for OpenHarmony\_v1.x\)](#section12202192215415)
- [Installing hb](#section15794154618411)
- [Prerequisites](#section1083283711515)
- [Installation Procedure](#section11518484814)
- [Uninstalling hb](#section3512551574)
- [Installing Other Tools](#section830511218494)
- [Installation Procedure](#section54409586499)
Operating system: 64-bit version of Ubuntu 16.04 or later.
Perform the following steps to set up the build environment:
Perform the following steps to set up the development environment:
1. Obtain source code.
2. Install and configure Python.
3. Install GN.
4. Install Ninja.
5. Install LLVM.
6. Install hb.
2. Install necessary libraries and tools.
3. Install Python3.
4. Install LLVM \(required only for OpenHarmony\_v1.x\).
5. Install hb.
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>- Docker is provided for the Ubuntu build environment, which encapsulates related build tools. If you use Docker to prepare the build environment, you do not need to perform the following steps in this section. Instead, refer to [Using Docker to Prepare the Build Environment](../get-code/gettools-acquire.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. For details, see [Using Docker to Prepare the Build Environment](../get-code/gettools-acquire.md#section107932281315).
>- By default, basic software, such as Samba and Vim, is installed in the system. Adaptation on the software is required to support file sharing between the Linux server and the Windows workstation.
>- For details about the compilation and building subsystem of OpenHarmony, see [Compilation and Building Overview](../subsystems/subsys-build.md).
>- For details about the compilation and building subsystem of OpenHarmony, see [Compilation and Building Overview](../subsystems/subsys-build-mini-lite.md).
## Obtaining Source Code and Tools<a name="section1897711811517"></a>
......@@ -38,70 +33,47 @@ The following table describes the tools and source code required for setting up
**Table 1** Source code and development tools and their obtaining methods
<a name="table6299192712513"></a>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="25.562556255625562%" id="mcps1.2.4.1.1"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>Item</p>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="25.779999999999998%" id="mcps1.2.4.1.1"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>Item</p>
</th>
<th class="cellrowborder" valign="top" width="20.7020702070207%" id="mcps1.2.4.1.2"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>Description</p>
<th class="cellrowborder" valign="top" width="30.819999999999997%" id="mcps1.2.4.1.2"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>Description</p>
</th>
<th class="cellrowborder" valign="top" width="53.73537353735374%" id="mcps1.2.4.1.3"><p id="p12997271757"><a name="p12997271757"></a><a name="p12997271757"></a>How to Obtain</p>
<th class="cellrowborder" valign="top" width="43.4%" id="mcps1.2.4.1.3"><p id="p12997271757"><a name="p12997271757"></a><a name="p12997271757"></a>How to Obtain</p>
</th>
</tr>
</thead>
<tbody><tr id="row45863354112"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p3587173513117"><a name="p3587173513117"></a><a name="p3587173513117"></a>Source code</p>
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p258713581118"><a name="p258713581118"></a><a name="p258713581118"></a>Develops functions.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p16587835171114"><a name="p16587835171114"></a><a name="p16587835171114"></a>For details, see <a href="../get-code/sourcecode-acquire.md">Source Code Acquisition</a>.</p>
</td>
</tr>
<tr id="row430016273514"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p330015271158"><a name="p330015271158"></a><a name="p330015271158"></a>Python3.7+</p>
<tbody><tr id="row45863354112"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p3587173513117"><a name="p3587173513117"></a><a name="p3587173513117"></a>Source code</p>
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p43003270510"><a name="p43003270510"></a><a name="p43003270510"></a>Executes script compilation.</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p258713581118"><a name="p258713581118"></a><a name="p258713581118"></a>Develops functions.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p34760459518"><a name="p34760459518"></a><a name="p34760459518"></a>Internet</p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p16587835171114"><a name="p16587835171114"></a><a name="p16587835171114"></a>See <a href="../get-code/sourcecode-acquire.md">Source Code Acquisition</a>.</p>
</td>
</tr>
<tr id="row1711946154018"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p15588165684216"><a name="p15588165684216"></a><a name="p15588165684216"></a>gn</p>
<tr id="row020505735919"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p1220513576596"><a name="p1220513576596"></a><a name="p1220513576596"></a>Necessary libraries and tools</p>
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p4588135634213"><a name="p4588135634213"></a><a name="p4588135634213"></a>Generates ninja compilation scripts.</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p2206157145919"><a name="p2206157145919"></a><a name="p2206157145919"></a>Used for compilation (such as packaging and image creation).</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p14131813191712"><a name="p14131813191712"></a><a name="p14131813191712"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p920675719597"><a name="p920675719597"></a><a name="p920675719597"></a>Internet</p>
</td>
</tr>
<tr id="row16990164213404"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p1858825613428"><a name="p1858825613428"></a><a name="p1858825613428"></a>ninja</p>
<tr id="row430016273514"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p330015271158"><a name="p330015271158"></a><a name="p330015271158"></a>Python3.7+</p>
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p15844174611816"><a name="p15844174611816"></a><a name="p15844174611816"></a>Executes ninja compilation scripts.</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p43003270510"><a name="p43003270510"></a><a name="p43003270510"></a>Executes script compilation.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p1923373393515"><a name="p1923373393515"></a><a name="p1923373393515"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p34760459518"><a name="p34760459518"></a><a name="p34760459518"></a>Internet</p>
</td>
</tr>
<tr id="row7531362055"><td class="cellrowborder" rowspan="2" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p1467122152710"><a name="p1467122152710"></a><a name="p1467122152710"></a></p>
<p id="p15217227174016"><a name="p15217227174016"></a><a name="p15217227174016"></a>LLVM</p>
<p id="p689515112108"><a name="p689515112108"></a><a name="p689515112108"></a></p>
<tr id="row7531362055"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p1467122152710"><a name="p1467122152710"></a><a name="p1467122152710"></a>LLVM (required only for OpenHarmony_v1.x)</p>
</td>
<td class="cellrowborder" rowspan="2" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p1739432372718"><a name="p1739432372718"></a><a name="p1739432372718"></a></p>
<p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>Functions as the compiler toolchain.</p>
<p id="p108951116109"><a name="p108951116109"></a><a name="p108951116109"></a></p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p1739432372718"><a name="p1739432372718"></a><a name="p1739432372718"></a>Functions as the compiler toolchain.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p9983172015313"><a name="p9983172015313"></a><a name="p9983172015313"></a>For the master and OpenHarmony_v2.x branches and tags, use version 10.0.1:</p>
<p id="p49091358184"><a name="p49091358184"></a><a name="p49091358184"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p59711534202610"><a name="p59711534202610"></a><a name="p59711534202610"></a>Internet</p>
</td>
</tr>
<tr id="row78941113109"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1974322421510"><a name="p1974322421510"></a><a name="p1974322421510"></a>For the OpenHarmony_v1.x branches and tags, use version 9.0.0:</p>
<p id="p198321032101412"><a name="p198321032101412"></a><a name="p198321032101412"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar</a></p>
<tr id="row1644079184919"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p744115914493"><a name="p744115914493"></a><a name="p744115914493"></a>hb</p>
</td>
</tr>
<tr id="row1644079184919"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p744115914493"><a name="p744115914493"></a><a name="p744115914493"></a>hb</p>
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p1244114913492"><a name="p1244114913492"></a><a name="p1244114913492"></a>Compiles the <span id="text344823833918"><a name="text344823833918"></a><a name="text344823833918"></a>OpenHarmony</span> source code.</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p1244114913492"><a name="p1244114913492"></a><a name="p1244114913492"></a>Compiles the <span id="text344823833918"><a name="text344823833918"></a><a name="text344823833918"></a>OpenHarmony</span> source code.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p1463918124619"><a name="p1463918124619"></a><a name="p1463918124619"></a>Internet</p>
</td>
</tr>
<tr id="row27583191444"><td class="cellrowborder" valign="top" width="25.562556255625562%" headers="mcps1.2.4.1.1 "><p id="p875851924420"><a name="p875851924420"></a><a name="p875851924420"></a>Other tools</p>
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p18758019164415"><a name="p18758019164415"></a><a name="p18758019164415"></a>Provide functions required in compilation and building, such as packaging and creating images.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p14758219194415"><a name="p14758219194415"></a><a name="p14758219194415"></a>Internet</p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p1463918124619"><a name="p1463918124619"></a><a name="p1463918124619"></a>Internet</p>
</td>
</tr>
</tbody>
......@@ -115,10 +87,18 @@ The following table describes the tools and source code required for setting up
You need to acquire [source code](../get-code/sourcecode-acquire.md), download it on a Linux server, and decompress it.
## Installing and Configuring Python<a name="section1238412211211"></a>
## Installing Necessary Libraries and Tools<a name="section108201740181219"></a>
Run the following command to install the libraries and tools required for compilation:
```
sudo apt-get install build-essential gcc g++ make zlib* libffi-dev e2fsprogs pkg-config flex bison perl bc openssl libssl-dev libelf-dev libc6-dev-amd64 binutils binutils-dev libdwarf-dev u-boot-tools mtd-utils gcc-arm-linux-gnueabi
```
## Installing Python3<a name="section1238412211211"></a>
1. Start a Linux server.
2. Check the Python version \(Python 3.7 or later is required\).
2. Run the following command to check the Python version:
```
python3 --version
......@@ -184,90 +164,20 @@ You need to acquire [source code](../get-code/sourcecode-acquire.md), download
## Installing gn<a name="section29216201423"></a>
1. Start a Linux server.
2. Download [gn](https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz).
3. Create the **gn** folder in the root directory.
```
mkdir ~/gn
```
4. Decompress the gn installation package to **\~/gn**.
```
tar -xvf gn-linux-x86-1717.tar.gz -C ~/gn
```
5. 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=~/gn:$PATH
```
6. Validate the environment variable.
```
source ~/.bashrc
```
## Installing ninja<a name="section8762358731"></a>
1. Start a Linux server.
2. Download [ninja](https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar).
3. Decompress the ninja installation package to **\~/ninja**.
```
tar -xvf ninja.1.9.0.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=~/ninja:$PATH
```
5. Validate the environment variable.
```
source ~/.bashrc
```
## Installing LLVM \(Required only for OpenHarmony\_v1.x\)<a name="section12202192215415"></a>
## Installing LLVM<a name="section12202192215415"></a>
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>When downloading source code under the OpenHarmony\_v1.x branches or tags, perform the operation procedure described in this section to install LLVM 9.0.0.
>When downloading source code under the Master and OpenHarmony\_v2.x branches or tags, skip this section. The hb automatically downloads the latest version of LLVM.
1. Start a Linux server.
2. [Download LLVM](https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz).
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>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.
2. [Download LLVM](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar).
3. Decompress the LLVM installation package to **\~/llvm**.
```
tar -zxvf llvm.tar.gz -C ~/
```
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>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 ~/
>```
4. Set an environment variable.
```
......@@ -291,7 +201,7 @@ You need to acquire [source code](../get-code/sourcecode-acquire.md), download
### Prerequisites<a name="section1083283711515"></a>
Python 3.7.4 or later has been installed. For details, see [Installing and Configuring Python](#section1238412211211).
Python 3.7.4 or later has been installed. For details, see [Installing Python3](#section1238412211211).
### Installation Procedure<a name="section11518484814"></a>
......@@ -345,16 +255,5 @@ 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](quickstart-lite-env-setup-faqs.md).
## Installing Other Tools<a name="section830511218494"></a>
### Installation Procedure<a name="section54409586499"></a>
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 gcc-arm-linux-gnueabi
```
>If you encounter any problem during the installation, resort to the [FAQs](quickstart-lite-env-setup-faqs.md).
# Windows Development Environment<a name="EN-US_TOPIC_0000001128311056"></a>
# Setting Up Windows Development Environment<a name="EN-US_TOPIC_0000001196067299"></a>
- [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 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.
System requirements:
- OS: 64-bit Windows 10
- User name: cannot contain Chinese characters
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
4. Installing HPM
5. Installing the DevEco Device Tool Plug-in
## Obtaining the Software<a name="en-us_topic_0000001058091994_section1483143015558"></a>
......@@ -26,7 +29,7 @@ DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedu
</th>
<th class="cellrowborder" valign="top" width="20.03%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001058091994_p373085711569"><a name="en-us_topic_0000001058091994_p373085711569"></a><a name="en-us_topic_0000001058091994_p373085711569"></a>Version</p>
</th>
<th class="cellrowborder" valign="top" width="39.98%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001058091994_p197309576566"><a name="en-us_topic_0000001058091994_p197309576566"></a><a name="en-us_topic_0000001058091994_p197309576566"></a>Obtaining Channel</p>
<th class="cellrowborder" valign="top" width="39.98%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001058091994_p197309576566"><a name="en-us_topic_0000001058091994_p197309576566"></a><a name="en-us_topic_0000001058091994_p197309576566"></a>How to Obtain</p>
</th>
</tr>
</thead>
......@@ -43,36 +46,37 @@ DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedu
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p547205817316"><a name="en-us_topic_0000001058091994_p547205817316"></a><a name="en-us_topic_0000001058091994_p547205817316"></a>Programming tool</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p1991315166416"><a name="en-us_topic_0000001058091994_p1991315166416"></a><a name="en-us_topic_0000001058091994_p1991315166416"></a>V3.7.4 to V3.8.x (64-bit)</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p1991315166416"><a name="en-us_topic_0000001058091994_p1991315166416"></a><a name="en-us_topic_0000001058091994_p1991315166416"></a>V3.8.9 or later (64-bit)</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p1599022403"><a name="en-us_topic_0000001058091994_p1599022403"></a><a name="en-us_topic_0000001058091994_p1599022403"></a>Recommended: <a href="https://www.python.org/downloads/release/python-388/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/release/python-388/</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p108321457411"><a name="en-us_topic_0000001058091994_p108321457411"></a><a name="en-us_topic_0000001058091994_p108321457411"></a><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/</a></p>
</td>
</tr>
<tr id="en-us_topic_0000001058091994_row117316576562"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p16405151165717"><a name="en-us_topic_0000001058091994_p16405151165717"></a><a name="en-us_topic_0000001058091994_p16405151165717"></a>Node.js</p>
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p1773185765616"><a name="en-us_topic_0000001058091994_p1773185765616"></a><a name="en-us_topic_0000001058091994_p1773185765616"></a>The npm environment provider</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p573118572567"><a name="en-us_topic_0000001058091994_p573118572567"></a><a name="en-us_topic_0000001058091994_p573118572567"></a>v12.0.0 or later (64-bit)</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p16304104120181"><a name="en-us_topic_0000001058091994_p16304104120181"></a><a name="en-us_topic_0000001058091994_p16304104120181"></a>Any of the following versions:</p>
<a name="en-us_topic_0000001058091994_ul875854471719"></a><a name="en-us_topic_0000001058091994_ul875854471719"></a><ul id="en-us_topic_0000001058091994_ul875854471719"><li>V12.22.5 or later (64-bit)</li><li>V14.17.5 or later (64-bit)</li><li>V16.6.0 or later (64-bit)</li></ul>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p9200911141112"><a name="en-us_topic_0000001058091994_p9200911141112"></a><a name="en-us_topic_0000001058091994_p9200911141112"></a><a href="https://nodejs.org/en/download/" target="_blank" rel="noopener noreferrer">https://nodejs.org/en/download/</a></p>
</td>
</tr>
<tr id="en-us_topic_0000001058091994_row6731105715561"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p2081865318571"><a name="en-us_topic_0000001058091994_p2081865318571"></a><a name="en-us_topic_0000001058091994_p2081865318571"></a>hpm</p>
<tr id="en-us_topic_0000001058091994_row6731105715561"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p2081865318571"><a name="en-us_topic_0000001058091994_p2081865318571"></a><a name="en-us_topic_0000001058091994_p2081865318571"></a>HPM</p>
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p1632215161040"><a name="en-us_topic_0000001058091994_p1632215161040"></a><a name="en-us_topic_0000001058091994_p1632215161040"></a>Package manager</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p773185715566"><a name="en-us_topic_0000001058091994_p773185715566"></a><a name="en-us_topic_0000001058091994_p773185715566"></a>Latest version</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p773185715566"><a name="en-us_topic_0000001058091994_p773185715566"></a><a name="en-us_topic_0000001058091994_p773185715566"></a>V1.3.0 or later</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p14731125745610"><a name="en-us_topic_0000001058091994_p14731125745610"></a><a name="en-us_topic_0000001058091994_p14731125745610"></a>For details, see <a href="#en-us_topic_0000001058091994_section173054793610">Installing hpm</a>.</p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p14731125745610"><a name="en-us_topic_0000001058091994_p14731125745610"></a><a name="en-us_topic_0000001058091994_p14731125745610"></a>For details, see <a href="#en-us_topic_0000001058091994_section173054793610">Installing HPM</a>.</p>
</td>
</tr>
<tr id="en-us_topic_0000001058091994_row13317205645717"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p143411112587"><a name="en-us_topic_0000001058091994_p143411112587"></a><a name="en-us_topic_0000001058091994_p143411112587"></a>DevEco Device Tool</p>
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p1690316506517"><a name="en-us_topic_0000001058091994_p1690316506517"></a><a name="en-us_topic_0000001058091994_p1690316506517"></a>Plug-in for the OpenHarmony source code compilation, programming, and debugging</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p113171956185715"><a name="en-us_topic_0000001058091994_p113171956185715"></a><a name="en-us_topic_0000001058091994_p113171956185715"></a>v2.2 Beta1</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p113171956185715"><a name="en-us_topic_0000001058091994_p113171956185715"></a><a name="en-us_topic_0000001058091994_p113171956185715"></a>V2.2 Beta2</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p3503163074720"><a name="en-us_topic_0000001058091994_p3503163074720"></a><a name="en-us_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/en/ide#download" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/en/ide#download</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p3503163074720"><a name="en-us_topic_0000001058091994_p3503163074720"></a><a name="en-us_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/cn/ide#download_beta" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide#download_beta</a></p>
<p id="en-us_topic_0000001058091994_p23171856135717"><a name="en-us_topic_0000001058091994_p23171856135717"></a><a name="en-us_topic_0000001058091994_p23171856135717"></a>Log in with your HUAWEI ID to download it. You can <a href="https://developer.huawei.com/consumer/en/doc/start/registration-and-verification-0000001053628148" target="_blank" rel="noopener noreferrer">register an account here</a>.</p>
</td>
</tr>
......@@ -86,24 +90,23 @@ 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\)**.
![](figure/en-us_image_0000001174350653.png)
![](figure/installing-visual-studio-code.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.
2. After the installation is complete, open the CLT and run **code --version**. If the version number can be displayed, it indicates that the installation is successful.
## Installing Python<a name="en-us_topic_0000001058091994_section16266553175320"></a>
1. Double-click the Python software package, select **Add Python 3.8 to PATH**, and click **Install Now**.
![](figure/en-us_image_0000001128470908.png)
![](figure/installing-python.png)
2. After the installation is complete, click **Close**.
![](figure/en-us_image_0000001128311104.png)
![](figure/setup-was-successful.png)
3. Open the CLT, and run **python --version** to check the installation result.
![](figure/en-us_image_0000001174350655.png)
![](figure/checking-the-installation-result.png)
4. In the CLT, run the following commands to set the pip source for downloading the dependencies required for later installation:
......@@ -122,17 +125,14 @@ 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.
![](figure/en-us_image_0000001128311096.png)
## Installing hpm<a name="en-us_topic_0000001058091994_section173054793610"></a>
## Installing HPM<a name="en-us_topic_0000001058091994_section173054793610"></a>
Before installing hpm, ensure that Node.js has been installed
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/en/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.
>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.
......@@ -140,13 +140,13 @@ and that your network can access the Internet. If your network requires a proxy
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:
2. Open the CLT and run the following command to install the latest version of HPM:
```
npm install -g @ohos/hpm-cli
```
![](figure/en-us_image_0000001128311100.png)
![](figure/hpm-version.png)
3. After the installation is complete, run the following command to obtain the installation result:
......@@ -154,12 +154,10 @@ and that your network can access the Internet. If your network requires a proxy
hpm -V
```
![](figure/en-us_image_0000001174270735.png)
## Installing the DevEco Device Tool Plug-in<a name="en-us_topic_0000001058091994_section4336315185716"></a>
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.
Before installing DevEco Device Tool, make sure the user name of the host does not contain Chinese characters. Otherwise, the **DevEco Home** page will be stuck loading and the DevEco Device Tool cannot work.
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/en/docs/ide/user-guides/vscode_proxy-0000001074231144) first.
......@@ -167,16 +165,26 @@ DevEco Device Tool will automatically download and install the C/C++ and CodeLLD
>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.
2. DevEco Device Tool checks whether the toolkit on which the installation depends meets the requirements. If the requirements are not met, follow the preceding installation instructions in this section.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>If Visual Studio Code has been installed but fails to be detected, restart your computer.
![](figure/installing-the-deveco-device-tool.png)
3. Click **Install**.
![](figure/install.png)
4. After the installation is complete, click **Close**.
![](figure/en-us_image_0000001128470902.png)
![](figure/installation-complete.png)
3. After the installation is complete, the CLT is automatically closed.
4. Open Visual Studio Code, click the ![](figure/en-us_image_0000001174350651.png) button on the left, and check whether C/C++, CodeLLDB, and DevEco Device Tool are listed in **INSTALLED**.
5. 启动Visual Studio Code,会自动安装DevEco Device Tool依赖的C/C++、CodeLLDB插件。等待安装完成后,点击Visual Studio Code左侧的![](figure/button.png)按钮,检查INSTALLED中,是否已成功安装C/C++、CodeLLDB和DevEco Device Tool。
>![](../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).
![](figure/en-us_image_0000001174270727.png)
![](figure/visual-studio-code.png)
# Environment Setup<a name="EN-US_TOPIC_0000001128311058"></a>
- **[Overview](quickstart-lite-env-setup-des.md)**
- **[Overview](quickstart-lite-env-setup-overview.md)**
- **[Windows Development Environment](quickstart-lite-env-setup-win.md)**
- **[Setting Up Windows Development Environment](quickstart-lite-env-setup-windows.md)**
- **[Ubuntu Build Environment](quickstart-lite-env-setup-lin.md)**
- **[Setting Up Ubuntu Development Environment](quickstart-lite-env-setup-linux.md)**
- **[FAQ](quickstart-lite-env-setup-faqs.md)**
- **[FAQs](quickstart-lite-env-setup-faqs.md)**
# Introduction to the Development Boards<a name="EN-US_TOPIC_0000001174270687"></a>
# Introduction<a name="EN-US_TOPIC_0000001181550103"></a>
- **[Hi3861 Development Board](quickstart-lite-introduction-hi3861.md)**
- **[Hi3861 Development Board](oem_minitinier_des_3861.md)**
- **[Hi3516 Development Board](quickstart-lite-introduction-hi3516.md)**
- **[Hi3516 Development Board](oem_minitinier_des_3516.md)**
- **[Hi3518 Development Board](quickstart-lite-introduction-hi3518.md)**
- **[Hi3518 Development Board](oem_minitinier_des_3518.md)**
# Hi3516<a name="EN-US_TOPIC_0000001128470852"></a>
- **[Setting Up the Environment](quickstart-lite-steps-board3516-setting.md)**
- **[Running a Hello OHOS Program](quickstart-lite-steps-board3516-running.md)**
- **[Developing a Driver](quickstart-lite-steps-board3516-program.md)**
- **[FAQs](quickstart-lite-steps-board3516-faqs.md)**
# Hi3518<a name="EN-US_TOPIC_0000001128311052"></a>
- **[Setting Up the Environment](quickstart-lite-steps-board3518-setting.md)**
- **[Running a Hello OHOS Program](quickstart-lite-steps-board3518-running.md)**
- **[FAQs](quickstart-lite-steps-board3518-faqs.md)**
# Hi3861<a name="EN-US_TOPIC_0000001174350609"></a>
- **[Setting Up the Environment](quickstart-lite-steps-board3861-setting.md)**
- **[WLAN Connection](quickstart-lite-steps-board3861-connection.md)**
- **[Running a Hello World Program](quickstart-lite-steps-board3861-running.md)**
- **[FAQs](quickstart-lite-steps-board3861-faqs.md)**
......@@ -12,7 +12,7 @@
**Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port.
**Figure 1** Failed to open the serial port<a name="fig066333283916"></a>
**Figure 1** Failed to open the serial port<a name="fig1756105874814"></a>
![](figure/failed-to-open-the-serial-port.png "failed-to-open-the-serial-port")
- **Possible Causes**
......@@ -23,20 +23,18 @@
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<a name="fig165994164420"></a>
**Figure 2** Checking whether the serial port is used<a name="fig723433664916"></a>
![](figure/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<a name="fig7911282453"></a>
**Figure 3** Disabling the terminal using the serial port<a name="fig197211713185012"></a>
![](figure/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<a name="fig1138624316485"></a>
![](figure/changjian1.png)
**Figure 4** Restarting burning<a name="fig2196042514"></a>
![](figure/restarting-burning.png "restarting-burning")
## What should I do when Windows-based PC failed to be connected to the board?<a name="section195391036568"></a>
......@@ -45,7 +43,7 @@
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<a name="fig5218920223"></a>
**Figure 5** Failed to obtain the image file due to unavailable connection<a name="fig135261439195819"></a>
![](figure/failed-to-obtain-the-image-file-due-to-unavailable-connection.png "failed-to-obtain-the-image-file-due-to-unavailable-connection")
- **Possible Causes**
......@@ -59,22 +57,22 @@
1. Check whether the network cable is properly connected.
2. Click **Windows Firewall**.
**Figure 6** Network and firewall setting<a name="fig62141417794"></a>
**Figure 6** Network and firewall setting<a name="fig168416458311"></a>
![](figure/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<a name="fig20703151111116"></a>
**Figure 7** Firewall and network protection<a name="fig19866154513414"></a>
![](figure/firewall-and-network-protection.png "firewall-and-network-protection")
4. Select the Visual Studio Code application.
**Figure 8** Selecting the Visual Studio Code application<a name="fig462316612165"></a>
**Figure 8** Selecting the Visual Studio Code application<a name="fig9213244657"></a>
![](figure/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<a name="fig132725269184"></a>
**Figure 9** Allowing the Visual Studio Code application to access the network<a name="fig019395421210"></a>
![](figure/allowing-the-visual-studio-code-application-to-access-the-network.png "allowing-the-visual-studio-code-application-to-access-the-network")
......@@ -97,17 +95,17 @@
- **Symptom**
![](figure/en-us_image_0000001174270715.png)
![](figure/symptom.png)
- **Possible Cause 1**: Python is not installed.
- **Solutions**
Install Python by referring to [Installing and Configuring Python](quickstart-lite-env-setup-lin.md).
Install Python as instructed in [Installing and Configuring Python](quickstart-lite-env-setup-linux.md#section1238412211211).
- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory.
![](figure/en-us_image_0000001128470880.png)
![](figure/reason-for-not-finding-python.png)
- **Solutions**
......@@ -122,7 +120,7 @@
Example:
![](figure/en-us_image_0000001174270713.png)
![](figure/solution-7.png)
## What should I do when no command output is displayed?<a name="section14871149155911"></a>
......@@ -144,29 +142,29 @@
- **Possible Cause 2**
The U-boot of the board is damaged.
The U-Boot of the board is damaged.
- **Solutions**
Burn the U-boot.
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:
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.
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.
>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.
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)
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<a name="en-us_topic_0000001053466255_fig155914681910"></a>
**Figure 10** Serial port displayed after the U-Boot is burnt<a name="en-us_topic_0000001053466255_fig155914681910"></a>
![](figure/serial-port-displayed-after-the-u-boot-is-burnt.png "serial-port-displayed-after-the-u-boot-is-burnt")
# Developing a Driver<a name="EN-US_TOPIC_0000001174350613"></a>
- [Introduction to Driver](#s8efc1952ebfe4d1ea717182e108c29bb)
- [Compiling and Burning](#section660016185110)
- [Building Source Code and Burning Images](#section660016185110)
- [Running an Image](#section333215226219)
- [Follow-up Learning](#section9712145420182)
......@@ -421,25 +421,23 @@ The following operations take a HDF-based UART driver as an example to show how
>The sample code is not automatically compiled by default. You can add it to the compilation script.
## Compiling and Burning<a name="section660016185110"></a>
## Building Source Code and Burning Images<a name="section660016185110"></a>
Perform the [building](quickstart-lite-steps-board3516-running.md#section1077671315253) and [burning](quickstart-lite-steps-board3516-running.md#section1347011412201) as instructed in **Running a Hello OHOS Program**.
Perform the [building](quickstart-lite-steps-hi3516-running.md#section1077671315253) and [burning](quickstart-lite-steps-hi3516-running.md#section1347011412201) as instructed in **Running a Hello OHOS Program**.
## Running an Image<a name="section333215226219"></a>
1. Connect to a serial port.
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>If the connection fails, rectify the fault by referring to [FAQs](quickstart-lite-steps-board3516-faqs.md).
>If the connection fails, rectify the fault by referring to [FAQs](quickstart-lite-steps-hi3516-faqs.md#section14871149155911).
**Figure 1** Serial port connection<a name="en-us_topic_0000001151888681_fig056645018495"></a>
![](figure/chuankou1.png)
**Figure 1** Serial port connection<a name="fig124315964718"></a>
![](figure/serial-port-connection-5.png "serial-port-connection-5")
1. Click **Monitor** to enable the serial port.
2. Press **Enter** repeatedly until **hisilicon** displays.
3. Go to [2](quickstart-lite-steps-board3516-running.md#l5b42e79a33ea4d35982b78a22913b0b1) if the board is started for the first time or the startup parameters need to be modified; go to [3](quickstart-lite-steps-board3516-running.md#ld26f18828aa44c36bfa36be150e60e49) otherwise.
3. Go to step [2](quickstart-lite-steps-hi3516-running.md#l5b42e79a33ea4d35982b78a22913b0b1) if the board is started for the first time or the startup parameters need to be modified; go to step [3](quickstart-lite-steps-hi3516-running.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.
......@@ -484,10 +482,8 @@ Perform the [building](quickstart-lite-steps-board3516-running.md#section107767
3. Run the **reset** command and press **Enter** to restart the board. After the board is restarted, **OHOS** is displayed when you press **Enter**.
**Figure 2** System startup<a name="en-us_topic_0000001151888681_fig10181006376"></a>
![](figure/qi1.png)
**Figure 2** System startup<a name="fig14618415485"></a>
![](figure/system-startup-6.png "system-startup-6")
4. In the root directory, run the **./bin/hello\_uart** command line to execute the demo program. The compilation result is shown in the following example.
......@@ -499,5 +495,5 @@ Perform the [building](quickstart-lite-steps-board3516-running.md#section107767
## Follow-up Learning<a name="section9712145420182"></a>
Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/device-camera.md).
Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/device-iotcamera.md).
......@@ -3,6 +3,8 @@
- [Creating a Program](#section204672145202)
- [Building](#section1077671315253)
- [Burning](#section1347011412201)
- [Programming Flash Memory Through the Network Port](#section1935410617363)
- [Running an Image](#section24721014162010)
- [Running a Program](#section5276734182615)
......@@ -129,7 +131,7 @@ This section describes how to create, compile, burn, and run the first program,
## Building<a name="section1077671315253"></a>
If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/gettools-acquire.md). 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/gettools-acquire.md#section107932281315). If the Linux environment is installed using a software package, go to the root directory of the source code and run the following commands for source code compilation:
```
hb set (Set the building path.)
......@@ -138,7 +140,7 @@ Select ipcamera_hispark_taurus@hisilicon and press Enter.
hb build -f (Start building.)
```
**Figure 1** Settings<a name="fig1211318064712"></a>
**Figure 1** Settings<a name="fig1458988766"></a>
![](figure/settings.png "settings")
The result files are generated in the **out/hispark\_taurus/ipcamera\_hispark\_taurus** directory.
......@@ -150,49 +152,53 @@ The result files are generated in the **out/hispark\_taurus/ipcamera\_hispark\_
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](quickstart-lite-introduction-hi3516.md).
### Programming Flash Memory Through the Network Port<a name="section1935410617363"></a>
To program flash memory through the network port in the Windows or Linux environment:
1. Connect the PC and the target development board through the serial port, network port, and power port. For details, see [Introduction to the Hi3516 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des_3516-0000001152041033).
2. <a name="en-us_topic_0000001056443961_li142386399535"></a>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).
![](figure/en-us_image_0000001174350647.png)
![](figure/record-the-serial-port-number-1.png)
3. Open DevEco Device Tool and go to **Projects** \> **Settings**.
![](figure/2021-01-27_170334.png)
![](figure/settings-2.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, set the programming options.
5. On the **hi3516dv300** tab page, configure the programming options.
- **upload\_port**: Select the serial port number obtained in [2](#en-us_topic_0000001056443961_li142386399535).
- **upload\_port**: Select the serial port number obtained in step [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.
![](figure/en-us_image_0000001128470904.png)
![](figure/hi3516-upload-options.png)
6. <a name="en-us_topic_0000001056443961_li1558813168234"></a>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). 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.
- **upload\_net\_server\_ip**: Select the IP address set in step [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.
![](figure/en-us_image_0000001174270733.png)
![](figure/ip-address-information.png)
8. When you finish modifying, click **Save** in the upper right corner.
9. Open the project file and click ![](figure/2021-01-27_170334-2.png). In the DevEco Device Tool window, choose **PROJECT TASKS** \> **hi3516dv300** \> **Upload** to start programming.
9. Open the project file and go to ![](figure/deveco-device-tool-logo.png) \> **PROJECT TASKS** \> **hi3516dv300** \> **Upload** to start programming.
![](figure/en-us_image_0000001174270729.png)
![](figure/start-burning.png)
10. When the following message is displayed, power off the development board and then power it on.
![](figure/en-us_image_0000001128470906.png)
![](figure/restart-the-development-board-3.png)
11. Start burning. When the following message is displayed, the burning is successful.
11. Start programming. If the following message is displayed, it indicates that the programming is successful.
![](figure/en-us_image_0000001128311098.png)
![](figure/burning-succeeded-4.png)
## Running an Image<a name="section24721014162010"></a>
......@@ -200,12 +206,10 @@ The Hi3516 development board allows you to burn flash memory over the USB port,
1. Connect to a serial port.
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>If the connection fails, rectify the fault by referring to [FAQs](quickstart-lite-steps-board3516-faqs.md).
**Figure 2** Serial port connection<a name="fig056645018495"></a>
>If the connection fails, rectify the fault by referring to [FAQs](quickstart-lite-steps-hi3516-faqs.md).
![](figure/chuankou1.png)
**Figure 2** Serial port connection<a name="fig139171488431"></a>
![](figure/serial-port-connection.png "serial-port-connection")
1. Click **Monitor** to enable the serial port.
2. Press **Enter** repeatedly until **hisilicon** displays.
......@@ -254,16 +258,14 @@ The Hi3516 development board allows you to burn flash memory over the USB port,
3. <a name="ld26f18828aa44c36bfa36be150e60e49"></a>Run the **reset** command and press **Enter** to restart the board. After the board is restarted, **OHOS** is displayed when you press **Enter**.
**Figure 3** System startup<a name="fig10181006376"></a>
![](figure/qi1.png)
**Figure 3** System startup<a name="fig784813366444"></a>
![](figure/system-startup.png "system-startup")
## Running a Program<a name="section5276734182615"></a>
In the root directory, run the **./bin/helloworld** command to operate the demo program. The compilation result is shown in the following example.
**Figure 4** Successful system startup and program execution<a name="fig1341618411997"></a>
**Figure 4** Successful system startup and program execution<a name="fig149821431194515"></a>
![](figure/successful-system-startup-and-program-execution.png "successful-system-startup-and-program-execution")
......@@ -19,10 +19,8 @@
The following figure shows the hardware connections.
**Figure 1** Hardware connections<a name="fig19527104710591"></a>
![](figure/矩形备份-292.png)
**Figure 1** Hardware connections<a name="fig38451744110"></a>
![](figure/hardware-connections-0.png "hardware-connections-0")
### Software<a name="section965634210501"></a>
......@@ -76,7 +74,7 @@ The following table describes the tools required for setting up the general envi
## Installing Linux Build Tools<a name="section182916865219"></a>
>![](../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**.
>- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install **hc-gen**.
>- \(Recommended\) If you obtain the source code via the mirror site or code repository, install **hc-gen**. When installing the compilation tool, ensure that its environment variable path is unique.
### Changing Linux Shell to Bash<a name="section1715027152617"></a>
......
# Hi3516<a name="EN-US_TOPIC_0000001128470852"></a>
- **[Setting Up the Environment](quickstart-lite-steps-hi3516-setting.md)**
- **[Running a Hello OHOS Program](quickstart-lite-steps-hi3516-running.md)**
- **[Developing a Driver](quickstart-lite-steps-hi3516-program.md)**
- **[FAQs](quickstart-lite-steps-hi3516-faqs.md)**
......@@ -13,7 +13,7 @@
**Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port.
**Figure 1** Failed to open the serial port<a name="en-us_topic_0000001053466255_fig066333283916"></a>
![](figure/failed-to-open-the-serial-port-8.png "failed-to-open-the-serial-port-8")
![](figure/failed-to-open-the-serial-port-17.png "failed-to-open-the-serial-port-17")
- **Possible Causes**
......@@ -24,19 +24,17 @@
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<a name="en-us_topic_0000001053466255_fig165994164420"></a>
![](figure/checking-whether-the-serial-port-is-used-9.png "checking-whether-the-serial-port-is-used-9")
![](figure/checking-whether-the-serial-port-is-used-18.png "checking-whether-the-serial-port-is-used-18")
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<a name="en-us_topic_0000001053466255_fig7911282453"></a>
![](figure/disabling-the-terminal-using-the-serial-port-10.png "disabling-the-terminal-using-the-serial-port-10")
![](figure/disabling-the-terminal-using-the-serial-port-19.png "disabling-the-terminal-using-the-serial-port-19")
3. Click **Burn**, select the serial port, and start burning images again.
**Figure 4** Restarting burning<a name="en-us_topic_0000001053466255_fig1138624316485"></a>
![](figure/changjian1-11.png)
**Figure 4** Restarting burning<a name="fig87139519227"></a>
![](figure/restarting-burning-20.png "restarting-burning-20")
## What should I do when Windows-based PC failed to be connected to the board?<a name="section8512971816"></a>
......@@ -46,7 +44,7 @@
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<a name="en-us_topic_0000001053466255_fig5218920223"></a>
![](figure/failed-to-obtain-the-image-file-due-to-unavailable-connection-12.png "failed-to-obtain-the-image-file-due-to-unavailable-connection-12")
![](figure/failed-to-obtain-the-image-file-due-to-unavailable-connection-21.png "failed-to-obtain-the-image-file-due-to-unavailable-connection-21")
- **Possible Causes**
......@@ -59,23 +57,23 @@
1. Check whether the network cable is properly connected.
2. Click **Windows Firewall**.
**Figure 6** Network and firewall setting<a name="en-us_topic_0000001053466255_fig62141417794"></a>
![](figure/network-and-firewall-setting-13.png "network-and-firewall-setting-13")
**Figure 6** Network and firewall setting<a name="fig954464811215"></a>
![](figure/network-and-firewall-setting-22.png "network-and-firewall-setting-22")
3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**.
**Figure 7** Firewall and network protection<a name="en-us_topic_0000001053466255_fig20703151111116"></a>
![](figure/firewall-and-network-protection-14.png "firewall-and-network-protection-14")
**Figure 7** Firewall and network protection<a name="fig158731526101312"></a>
![](figure/firewall-and-network-protection-23.png "firewall-and-network-protection-23")
4. Select the Visual Studio Code application.
**Figure 8** Selecting the Visual Studio Code application<a name="en-us_topic_0000001053466255_fig462316612165"></a>
![](figure/selecting-the-visual-studio-code-application-15.png "selecting-the-visual-studio-code-application-15")
**Figure 8** Selecting the Visual Studio Code application<a name="fig96572537139"></a>
![](figure/selecting-the-visual-studio-code-application-24.png "selecting-the-visual-studio-code-application-24")
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<a name="en-us_topic_0000001053466255_fig132725269184"></a>
![](figure/allowing-the-visual-studio-code-application-to-access-the-network-16.png "allowing-the-visual-studio-code-application-to-access-the-network-16")
**Figure 9** Allowing the Visual Studio Code application to access the network<a name="fig18201217161411"></a>
![](figure/allowing-the-visual-studio-code-application-to-access-the-network-25.png "allowing-the-visual-studio-code-application-to-access-the-network-25")
## What should I do when the image failed to be burnt?<a name="section1767804111198"></a>
......@@ -97,7 +95,7 @@
- **Symptom**
![](figure/en-us_image_0000001174270743.png)
![](figure/error.png)
- **Possible Cause 1**
......@@ -106,11 +104,11 @@
- **Solutions**
Install Python by referring to [Installing and Configuring Python](quickstart-lite-env-setup-lin.md).
Install Python as instructed in [Installing and Configuring Python](quickstart-lite-env-setup-linux.md#section1238412211211).
- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory.
![](figure/en-us_image_0000001174270739.png)
![](figure/error2.png)
- **Solutions**
......@@ -125,7 +123,7 @@
Example:
![](figure/en-us_image_0000001174350661.png)
![](figure/solution-26.png)
## What should I do when no command output is displayed?<a name="en-us_topic_0000001053466255_section14871149155911"></a>
......@@ -142,33 +140,33 @@
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](quickstart-lite-steps-board3518-running.md) in the **Running an Image** section to 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](#section1498892119619) in the **Running an Image** section to change the serial port number.
- **Possible Cause 2**
The U-boot of the board is damaged.
The U-Boot of the board is damaged.
- **Solutions**
Burn the U-boot.
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:
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.
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.
>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.
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)
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/en-us_image_0000001174350659.png)
![](figure/login-serial-port.png)
......@@ -128,7 +128,7 @@ This section describes how to create, compile, burn, and run the first program,
## Building<a name="section234175193114"></a>
If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/gettools-acquire.md). 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/gettools-acquire.md#section107932281315). If the Linux environment is installed using a software package, go to the root directory of the source code and run the following commands for source code compilation:
```
hb set (Set the building path.)
......@@ -139,57 +139,66 @@ hb build -f (Start building.)
The result files are generated in the **out/hispark\_aries/ipcamera\_hispark\_aries** directory.
**Figure 1** Settings<a name="fig4305770509"></a>
![](figure/settings-4.png "settings-4")
**Figure 1** Settings<a name="fig1766174411418"></a>
![](figure/settings-9.png "settings-9")
>![](../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<a name="section7609155824819"></a>
The USB port is the only burning mode supported by the Hi3518 development board.
Programming the flash memory is the process of downloading compiled program files to a chipset development board to provide a basis for subsequent debugging. With the one-click flash memory programming function of DevEco Device Tool, you can program flash memory on development boards quickly and efficiently.
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](quickstart-lite-introduction-hi3518.md).
The Hi3518E V300 development board allows you to program flash memory through the USB port or serial port.
- **Windows system: Supports programming through the USB port or serial port**
- **Linux system: Supports programming through the serial port \(Linux+Windows dual system: Supports programming through the serial port or USB port\)**
Except for environment setup, the operations of programming are the same for Windows and Linux.
The following uses the USB port burning as an example.
1. Connect the PC and the target development board through the serial port and USB port. For details, see [Introduction to the Hi3518 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des_3518-0000001105201138).
2. <a name="en-us_topic_0000001057313128_li46411811196"></a>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).
![](figure/en-us_image_0000001128470900.png)
![](figure/record-the-serial-port-number-10.png)
3. Open DevEco Device Tool and go to **Projects** \> **Settings**.
![](figure/en-us_image_0000001174350649.png)
![](figure/setting-11.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 [2](#en-us_topic_0000001057313128_li46411811196).
- **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.
![](figure/en-us_image_0000001128311090.png)
![](figure/upload-options.png)
6. When you finish modifying, click **Save** in the upper right corner.
7. Open the project file and click ![](figure/2021-01-27_170334-5.png). In the DevEco Device Tool window, choose **PROJECT TASKS** \> **hi3518ev300\_fastboot** \> **Erase** to erase U-Boot.
7. Open the project file, go to ![](figure/deveco-device-toollogo.png) \> **PROJECT TASKS** \> **hi3518ev300\_fastboot** \> **Erase** to erase U-Boot.
![](figure/en-us_image_0000001174270731.png)
![](figure/erase-u-boot.png)
8. When the following message is displayed, power off the development board and then power it on.
![](figure/en-us_image_0000001128311092.png)
![](figure/restart-the-development-board-12.png)
9. If the following message is displayed, it indicates that U-Boot is erased successfully.
![](figure/en-us_image_0000001128311094.png)
![](figure/u-boot-erased-successfully.png)
10. Go to **hi3518ev300** \> **Upload** to start programming.
![](figure/en-us_image_0000001174350641.png)
![](figure/upload-13.png)
11. If the following message is displayed, it indicates that the programming is successful.
![](figure/en-us_image_0000001174350643.png)
![](figure/burning-succeeded-14.png)
## Running an Image<a name="section17612105814480"></a>
......@@ -197,12 +206,10 @@ The USB port is the only burning mode supported by the Hi3518 development board.
1. Connect to a serial port.
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>If the connection fails, rectify the fault by referring to [FAQs](quickstart-lite-steps-board3518-faqs.md).
**Figure 2** Serial port connection<a name="fig056645018495"></a>
>If the connection fails, rectify the fault by referring to [FAQs](quickstart-lite-steps-hi3518-faqs.md#en-us_topic_0000001053466255_section14871149155911).
![](figure/chuankou1-6.png)
**Figure 2** Serial port connection<a name="fig049019841616"></a>
![](figure/serial-port-connection-15.png "serial-port-connection-15")
1. Click **Monitor** to enable the serial port. The **TERMINAL** window is displayed.
2. Press **Enter** repeatedly until **hisilicon** displays.
......@@ -252,11 +259,11 @@ The USB port is the only burning mode supported by the Hi3518 development board.
3. <a name="li6442853122312"></a>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<a name="fig265662981319"></a>
![](figure/successful-system-startup-and-program-execution-7.png "successful-system-startup-and-program-execution-7")
**Figure 3** Successful system startup and program execution<a name="fig2103121215172"></a>
![](figure/successful-system-startup-and-program-execution-16.png "successful-system-startup-and-program-execution-16")
## Follow-up Learning<a name="section9712145420182"></a>
Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/device-iotcamera.md).
Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/device-wlan-sdk.md).
......@@ -2,7 +2,7 @@
- [Environment Requirements](#section1724111409282)
- [Hardware](#section487353718276)
- [Software Requirements](#section17315193935817)
- [Software](#section17315193935817)
- [Installing Linux Build Tools](#section8831868501)
- [Changing Linux Shell to Bash](#section434110241084)
......@@ -19,11 +19,11 @@
The following figure shows the hardware connections.
**Figure 1** Hardware connections<a name="fig19272182991417"></a>
![](figure/hardware-connections-8.png "hardware-connections-8")
**Figure 1** Hardware connections<a name="fig8211468392"></a>
![](figure/hardware-connections-3.png "hardware-connections-3")
### Software Requirements<a name="section17315193935817"></a>
### Software<a name="section17315193935817"></a>
>![](../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).
......
# Hi3518<a name="EN-US_TOPIC_0000001128311052"></a>
- **[Setting Up the Environment](quickstart-lite-steps-hi3518-setting.md)**
- **[Running a Hello OHOS Program](quickstart-lite-steps-hi3518-running.md)**
- **[FAQs](quickstart-lite-steps-hi3518-faqs.md)**
# WLAN Connection<a name="EN-US_TOPIC_0000001174350611"></a>
# Setting Up WLAN Connection<a name="EN-US_TOPIC_0000001174350611"></a>
- [Building](#section191121332125319)
- [Burning Images](#section19458165166)
- [Building Source Code](#section191121332125319)
- [Burning Images](#section3288165814218)
- [Connecting WLAN Module to the Internet.](#section194671619167)
This example shows how to connect the WLAN module to the gateway using attention \(AT\) commands.
## Building<a name="section191121332125319"></a>
## Building Source Code<a name="section191121332125319"></a>
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/sourcecode-acquire.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/gettools-acquire.md#section107932281315). If the Linux environment is installed using a software package, perform the following steps:
1. Open the HUAWEI DevEco Device Tool and choose **View** \> **Terminal**.
**Figure 1** Starting the IDE terminal tool<a name="fig1975813338510"></a>
![](figure/1.png)
**Figure 1** Starting the IDE terminal tool<a name="fig755583241511"></a>
![](figure/starting-the-ide-terminal-tool.png "starting-the-ide-terminal-tool")
On the **TERMINAL** panel, run the ssh command, for example, **ssh** **_user_@_ipaddr_**, to connect to the Linux server.
**Figure 2** TERMINAL panel<a name="fig91165301546"></a>
![](figure/2.png)
**Figure 2** TERMINAL panel<a name="fig14407256101510"></a>
![](figure/terminal-panel.png "terminal-panel")
2. Go to the root directory of the code, run the **hb set** and **.** commands on the **TERMINAL** panel, and select the **wifiiot\_hispark\_pegasus** version.
**Figure 3** Selecting the target build version<a name="fig17727115215612"></a>
![](figure/3.png)
**Figure 3** Selecting the target build version<a name="fig191035701814"></a>
![](figure/selecting-the-target-build-version.png "selecting-the-target-build-version")
3. Run the **hb build** command to start building.
**Figure 4** Running commands on the TERMINAL panel<a name="fig5493164414573"></a>
![](figure/4.png)
**Figure 4** Running commands on the TERMINAL panel<a name="fig10635942111916"></a>
![](figure/running-commands-on-the-terminal-panel.png "running-commands-on-the-terminal-panel")
4. Check whether the building is successful. If yes, **wifiiot\_hispark\_pegasus build success** will be displayed, as shown in the following figure.
**Figure 5** Successful building<a name="fig1262101218463"></a>
![](figure/5.png)
**Figure 5** Successful building<a name="fig195291328182015"></a>
![](figure/successful-building.png "successful-building")
5. Check whether the following files are generated in the **./out/wifiiot/** directory.
......@@ -53,49 +43,54 @@ If the Linux environment is installed using Docker, perform the building by refe
ls -l out/hispark_pegasus/wifiiot_hispark_pegasus/
```
**Figure 6** Directory for storing the generated files<a name="fig38521346164618"></a>
**Figure 6** Directory for storing the generated files<a name="fig112257131214"></a>
![](figure/directory-for-storing-the-generated-files.png "directory-for-storing-the-generated-files")
## Burning Images<a name="section3288165814218"></a>
![](figure/3-0.png)
Programming the flash memory is the process of downloading compiled program files to a chipset development board to provide a basis for subsequent debugging. With the one-click flash memory programming function of DevEco Device Tool, you can program flash memory on development boards quickly and efficiently.
**The Hi3861 V100 development board allows you to program flash memory through the serial port using the burn-serial or hiburn-serial protocol. The hiburn-serial protocol is applicable to both Windows and Linux systems, while the burn-serial is applicable to Linux only.**
## Burning Images<a name="section19458165166"></a>
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>The burn-serial protocol is used for compatibility with the projects of historical versions. It does not differ from hiburn-serial in operations.
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).
The operations for programming flash memory in Windows and Linux are the same. The only difference lies in the environment setup for DevEco Device Tool.
1. Connect the PC and the target development board through the USB port. For details, see [Introduction to the Hi3861 Development Board](quickstart-lite-introduction-hi3861.md).
1. Connect the PC and the target development board through the USB port. For details, see [Introduction to the Hi3861 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des_3861-0000001105041324).
2. <a name="en-us_topic_0000001056563976_li848662117291"></a>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/en/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 Board](https://device.harmonyos.com/en/docs/ide/user-guides/hi3861-drivers-0000001058153433).
![](figure/en-us_image_0000001128311118.png)
![](figure/record-the-serial-port-number.png)
3. Open DevEco Device Tool and go to **Projects** \> **Settings**.
![](figure/en-us_image_0000001128311116.png)
![](figure/setting.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 [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.
- **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001056563976_li848662117291).
- **upload\_protocol**: Select the programming protocol. For Windows, set this parameter to **burn-serial** or **hiburn-serial**. For Linux, set this parameter to **hiburn-serial**.
- **upload\_partitions**: Select the file to be programmed. **hi3861\_app** is selected by default.
![](figure/en-us_image_0000001128470922.png)
![](figure/options.png)
6. When you finish modifying, click **Save** in the upper right corner.
7. Open the project file. In the DevEco Device Tool window, go to **PROJECT TASKS** \> **hi3861** \> **Upload** to start programming.
![](figure/en-us_image_0000001174270749.png)
![](figure/upload.png)
8. When the following information is displayed, press the RST button on the development board to restart it.
![](figure/en-us_image_0000001174270751.png)
![](figure/restart-the-development-board.png)
9. Start burning. When the following message is displayed, the burning is successful.
9. Start programming. If the following message is displayed, it indicates that the programming is successful.
![](figure/en-us_image_0000001174350669.png)
![](figure/burning-succeeded.png)
## Connecting WLAN Module to the Internet.<a name="section194671619167"></a>
......@@ -104,17 +99,13 @@ After completing version building and burning, do as follows to connect the WLAN
1. Click the icon of **DevEco: Serial Monitor** at the bottom of DevEco Studio to keep the connection between the Windows workstation and the WLAN module.
**Figure 7** Opening the DevEco serial port<a name="fig12489182991119"></a>
![](figure/5-1.png)
**Figure 7** Opening the DevEco serial port<a name="fig464411253297"></a>
![](figure/opening-the-deveco-serial-port.png "opening-the-deveco-serial-port")
2. Reset the WLAN module. The message **ready to OS start** is displayed on the **TERMINAL** panel, indicating that the WLAN module is started successfully.
**Figure 8** Successful resetting of the WLAN module <a name="fig496084516332"></a>
![](figure/6.png)
**Figure 8** Successful resetting of the WLAN module <a name="fig3327108143016"></a>
![](figure/successful-resetting-of-the-wlan-module.png "successful-resetting-of-the-wlan-module")
3. Run the following AT commands in sequence via the DevEco serial port terminal to start the STA mode, connect to the specified AP, and enable Dynamic Host Configuration Protocol \(DHCP\).
......@@ -134,9 +125,7 @@ After completing version building and burning, do as follows to connect the WLAN
AT+PING=X.X.X.X # Check the connectivity between the module and the gateway. Replace X.X.X.X with the actual gateway address.
```
**Figure 9** Successful networking of the WLAN module<a name="fig1166371318339"></a>
![](figure/截图.png)
**Figure 9** Successful networking of the WLAN module<a name="fig7672858203010"></a>
![](figure/successful-networking-of-the-wlan-module.png "successful-networking-of-the-wlan-module")
......@@ -73,7 +73,7 @@
Solution 2: If the software source does not contain **zlib**, download the source code from [http://www.zlib.net/](http://www.zlib.net/).
![](figure/10.png)
![](figure/download-zlib.png)
Then run the following commands to install **zlib** offline:
......@@ -134,7 +134,7 @@
- Download the source code from [https://pypi.org/project/pycrypto/\#files](https://pypi.org/project/pycrypto/#files).
![](figure/en-us_image_0000001128470864.png)
![](figure/download-the-source-code.png)
- Save the source code package to the Linux server, decompress the package, and run the **python3 setup.py install** command to install **Crypto**.
- Rebuild an environment.
......@@ -164,7 +164,7 @@
- Download the installation package from [https://pypi.org/project/ecdsa/\#files](https://pypi.org/project/ecdsa/#files).
![](figure/en-us_image_0000001128311072.png)
![](figure/download-ecdsa.png)
- Save the installation package to the Linux server and run the **pip3 install ecdsa-0.15-py2.py3-none-any.whl** command to install **ecdsa**.
- Rebuild an environment.
......@@ -194,7 +194,7 @@
- Download the installation package from [https://pypi.org/project/six/\#files](https://pypi.org/project/six/#files).
![](figure/en-us_image_0000001174270699.png)
![](figure/download-six.png)
- Save the source code to the Linux server and run the **pip3 install six-1.14.0-py2.py3-none-any.whl** command to install **six**.
- Rebuild an environment.
......@@ -243,11 +243,11 @@
- **Possible Cause 1:** Python is not installed.
- **Solutions**
Install Python by referring to [Installing and Configuring Python](quickstart-lite-env-setup-lin.md).
Install Python as instructed in [Installing and Configuring Python](quickstart-lite-env-setup-linux.md#section1238412211211).
- **Possible Cause 2:** The soft link that points to the Python does not exist in the **usr/bin** directory.
![](figure/en-us_image_0000001128311070.png)
![](figure/reason-2.png)
- **Solutions**
......@@ -262,7 +262,7 @@
Example:
![](figure/en-us_image_0000001174350623.png)
![](figure/solution.png)
## What should I do when an error with **lsb\_release** occurs during **kconfiglib** installation?<a name="section691681635814"></a>
......
......@@ -2,8 +2,9 @@
- [Modifying Source Code](#section79601457101015)
- [Debugging and Verification](#section1621064881419)
- [printf](#section1246911301217)
- [Locating Exceptions Using the asm File](#section199621957141014)
- [printf](#section5204547123316)
- [Locating Exceptions Using the ASM File](#section15919111423416)
- [Viewing Execution Result](#section18115713118)
- [Follow-up Learning](#section9712145420182)
......@@ -86,13 +87,13 @@ The source code needs to be modified when fixing bugs or compiling a new service
## Debugging and Verification<a name="section1621064881419"></a>
Currently, there are two debugging and verification methods: using printf to print logs and using asm files to locate **panic** problems. You can select one of them based on your need.
Currently, there are two debugging and verification methods: using printf to print logs and using ASM files to locate **panic** problems. You can select one of them based on your need.
As the service shown is simple, use the printf method. The following describes the two debugging methods.
## printf<a name="section1246911301217"></a>
### printf<a name="section5204547123316"></a>
Add **printf** function to the code, which helps print data to the serial port. You can add log printing in key service paths or service exception locations, as shown in the following figure.
Add the **printf** function to the code, which helps print data to the serial port. You can add log printing in key service paths or service exception locations, as shown in the following figure.
```
void HelloWorld(void)
......@@ -101,7 +102,7 @@ void HelloWorld(void)
}
```
## Locating Exceptions Using the asm File<a name="section199621957141014"></a>
### Locating Exceptions Using the ASM File<a name="section15919111423416"></a>
When the system exits abnormally, the call stack information about the abnormal exit is displayed on the serial port. The following is an example: You can locate the exception by parsing the exception stack information.
......@@ -118,10 +119,10 @@ Call Stack 6 -- 3f5e24 addr:f78fc
********************Call Stack end*******************
```
To parse the call stack information, the **Hi3861\_wifiiot\_app.asm** file is required. This file records the symbol addresses of the functions in the code in the flash memory and the disassembly information. The asm file is built and output together with the version software package and is stored in the **./out/wifiiot/** directory.
To parse the call stack information, the **Hi3861\_wifiiot\_app.asm** file is required. This file records the symbol addresses of the functions in the code in the flash memory and the disassembly information. The ASM file is built and output together with the version software package and is stored in the **./out/wifiiot/** directory.
1. \(Optional\) Save the **CallStack** information to a TXT file for editing.
2. Open the asm file, search for the function address in each call stack, and list the corresponding function. Generally, you only need to find the functions matching the first several stacks to locate exceptions.
1. \(Optional\) Save the call stack information to a TXT file for later editing.
2. Open the ASM file, search for the function address in each call stack, and list the corresponding function. Generally, you only need to find the functions matching the first several stacks to locate exceptions.
```
Call Stack 0 -- 4860d8 addr:f784c -- WadRecvCB
......@@ -133,9 +134,9 @@ To parse the call stack information, the **Hi3861\_wifiiot\_app.asm** file is
Call Stack 6 -- 3f5e24 addr:f78fc
```
3. Determine that an exception occurs in the **WadRecvCB** function based on the call stack information.
3. Based on the above call stack information, it can be determined that an exception occurs in the **WadRecvCB** function.
![](figure/en-us_image_0000001174270737.png)
![](figure/wadrecvcb-function.png)
4. Check and modify the code.
......
......@@ -8,7 +8,7 @@
- [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251)
- [Installing Scons](#section7438245172514)
- [Installing Python Modules](#section88701892341)
- [Installing gcc\_riscv32 \(Compilation Toolchain for WLAN Module\)](#section34435451256)
- [Installing gcc\_riscv32 \(Compiler Toolchain for WLAN Module\)](#section34435451256)
- [Installing the USB-to-Serial Driver](#section1027732411513)
......@@ -23,7 +23,7 @@
The following figure shows the hardware connections.
**Figure 1** Hardware connections<a name="fig12122108211"></a>
**Figure 1** Hardware connections<a name="fig1922334410211"></a>
![](figure/hardware-connections.png "hardware-connections")
### Software<a name="section727451210318"></a>
......@@ -38,9 +38,9 @@ The following table lists the tools required for the Hi3861 development board.
<a name="table6299192712513"></a>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="17.54%" id="mcps1.2.5.1.1"><p id="p162491657102110"><a name="p162491657102110"></a><a name="p162491657102110"></a>Platform</p>
</th>
<th class="cellrowborder" valign="top" width="19.89%" id="mcps1.2.5.1.2"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>Development Tool</p>
<th class="cellrowborder" valign="top" width="23.59%" id="mcps1.2.5.1.2"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>Development Tool</p>
</th>
<th class="cellrowborder" valign="top" width="26.279999999999998%" id="mcps1.2.5.1.3"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>Description</p>
<th class="cellrowborder" valign="top" width="22.58%" id="mcps1.2.5.1.3"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>Description</p>
</th>
<th class="cellrowborder" valign="top" width="36.29%" id="mcps1.2.5.1.4"><p id="p12997271757"><a name="p12997271757"></a><a name="p12997271757"></a>How to Obtain</p>
</th>
......@@ -48,45 +48,45 @@ The following table lists the tools required for the Hi3861 development board.
</thead>
<tbody><tr id="row935218593572"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p105554418586"><a name="p105554418586"></a><a name="p105554418586"></a>Linux server</p>
</td>
<td class="cellrowborder" valign="top" width="19.89%" headers="mcps1.2.5.1.2 "><p id="p45551740589"><a name="p45551740589"></a><a name="p45551740589"></a>Basic software package for compilation and building (required only for Ubuntu 20+)</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p45551740589"><a name="p45551740589"></a><a name="p45551740589"></a>Basic software package for compilation and building (required only for Ubuntu 20+)</p>
</td>
<td class="cellrowborder" valign="top" width="26.279999999999998%" headers="mcps1.2.5.1.3 "><p id="p655594115814"><a name="p655594115814"></a><a name="p655594115814"></a>Provides a basic software package for compilation and building.</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p655594115814"><a name="p655594115814"></a><a name="p655594115814"></a>Provides a basic software package for compilation and building.</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p165558415589"><a name="p165558415589"></a><a name="p165558415589"></a>Internet</p>
</td>
</tr>
<tr id="row1397335913612"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p3711468218"><a name="p3711468218"></a><a name="p3711468218"></a>Linux server</p>
</td>
<td class="cellrowborder" valign="top" width="19.89%" headers="mcps1.2.5.1.2 "><p id="p097355911620"><a name="p097355911620"></a><a name="p097355911620"></a>SCons 3.0.4+</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p097355911620"><a name="p097355911620"></a><a name="p097355911620"></a>SCons 3.0.4+</p>
</td>
<td class="cellrowborder" valign="top" width="26.279999999999998%" headers="mcps1.2.5.1.3 "><p id="p1973195917619"><a name="p1973195917619"></a><a name="p1973195917619"></a>Executes script compilation.</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p1973195917619"><a name="p1973195917619"></a><a name="p1973195917619"></a>Executes script compilation.</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p1722663441514"><a name="p1722663441514"></a><a name="p1722663441514"></a>Internet</p>
</td>
</tr>
<tr id="row1968013216717"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p2681632977"><a name="p2681632977"></a><a name="p2681632977"></a>Linux server</p>
</td>
<td class="cellrowborder" valign="top" width="19.89%" headers="mcps1.2.5.1.2 "><p id="p1991501391312"><a name="p1991501391312"></a><a name="p1991501391312"></a>Python modules: setuptools, Kconfiglib, PyCryptodome, six, and ecdsa</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p1991501391312"><a name="p1991501391312"></a><a name="p1991501391312"></a>Python modules: setuptools, Kconfiglib, PyCryptodome, six, and ecdsa</p>
</td>
<td class="cellrowborder" valign="top" width="26.279999999999998%" headers="mcps1.2.5.1.3 "><p id="p968120325715"><a name="p968120325715"></a><a name="p968120325715"></a>Executes script compilation.</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p968120325715"><a name="p968120325715"></a><a name="p968120325715"></a>Executes script compilation.</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p268116326711"><a name="p268116326711"></a><a name="p268116326711"></a>Internet</p>
</td>
</tr>
<tr id="row020914491313"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p20209749103116"><a name="p20209749103116"></a><a name="p20209749103116"></a>Linux server</p>
</td>
<td class="cellrowborder" valign="top" width="19.89%" headers="mcps1.2.5.1.2 "><p id="p7209104910317"><a name="p7209104910317"></a><a name="p7209104910317"></a>gcc riscv32</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p7209104910317"><a name="p7209104910317"></a><a name="p7209104910317"></a>gcc riscv32</p>
</td>
<td class="cellrowborder" valign="top" width="26.279999999999998%" headers="mcps1.2.5.1.3 "><p id="p102093498311"><a name="p102093498311"></a><a name="p102093498311"></a>Executes script compilation.</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p102093498311"><a name="p102093498311"></a><a name="p102093498311"></a>Executes script compilation.</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p321054953116"><a name="p321054953116"></a><a name="p321054953116"></a>Internet</p>
</td>
</tr>
<tr id="row1596703610215"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p071946112113"><a name="p071946112113"></a><a name="p071946112113"></a>Windows workstation</p>
</td>
<td class="cellrowborder" valign="top" width="19.89%" headers="mcps1.2.5.1.2 "><p id="p1044974291416"><a name="p1044974291416"></a><a name="p1044974291416"></a>CH341SER.EXE</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p1044974291416"><a name="p1044974291416"></a><a name="p1044974291416"></a>CH341SER.EXE</p>
</td>
<td class="cellrowborder" valign="top" width="26.279999999999998%" headers="mcps1.2.5.1.3 "><p id="p94491342131413"><a name="p94491342131413"></a><a name="p94491342131413"></a>USB-to-Serial adapter driver</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p94491342131413"><a name="p94491342131413"></a><a name="p94491342131413"></a>USB-to-Serial adapter driver</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p6449184214148"><a name="p6449184214148"></a><a name="p6449184214148"></a><a href="http://www.wch-ic.com/search?t=downloads&amp;q=ch340g" target="_blank" rel="noopener noreferrer">http://www.wch-ic.com/search?t=downloads&amp;q=ch340g</a></p>
</td>
......@@ -123,7 +123,7 @@ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
scons -v
```
**Figure 2** Successful installation \(SCons version requirement: 3.0.4 or later\)<a name="fig235815252492"></a>
**Figure 2** Successful installation \(SCons version requirement: 3.0.4 or later\)<a name="fig151441613316"></a>
![](figure/successful-installation-(scons-version-requirement-3-0-4-or-later).png "successful-installation-(scons-version-requirement-3-0-4-or-later)")
......@@ -216,7 +216,7 @@ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
### Installing gcc\_riscv32 \(Compilation Toolchain for WLAN Module\)<a name="section34435451256"></a>
### Installing gcc\_riscv32 \(Compiler Toolchain for WLAN Module\)<a name="section34435451256"></a>
>![](../public_sys-resources/icon-notice.gif) **NOTICE:**
>- The Hi3861 platform supports only the static link of the libgcc library. The dynamic link is not recommended because version 3 of the GNU General Public License \(GPLv3\) will be polluted during commercial distribution.
......@@ -353,6 +353,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.
![](figure/en-us_image_0000001174350633.png)
![](figure/serial-port-entry.png)
# Hi3861<a name="EN-US_TOPIC_0000001174350609"></a>
- **[Setting Up the Environment](quickstart-lite-steps-hi3861-setting.md)**
- **[Setting Up WLAN Connection](quickstart-lite-steps-hi3861-connection.md)**
- **[Running a Hello World Program](quickstart-lite-steps-hi3861-running.md)**
- **[FAQs](quickstart-lite-steps-hi3861-faqs.md)**
# How to Develop<a name="EN-US_TOPIC_0000001128470860"></a>
- **[Hi3861](quickstart-lite-steps-board3861.md)**
- **[Hi3861](quickstart-lite-steps-hi3861.md)**
- **[Hi3516](quickstart-lite-steps-board3516.md)**
- **[Hi3516](quickstart-lite-steps-hi3516.md)**
- **[Hi3518](quickstart-lite-steps-board3518.md)**
- **[Hi3518](quickstart-lite-steps-hi3518.md)**
......@@ -2,7 +2,7 @@
- **[Overview](quickstart-lite-overview.md)**
- **[Introduction to the Development Boards](quickstart-lite-introduction.md)**
- **[Introduction](quickstart-lite-introduction.md)**
- **[Environment Setup](quickstart-lite-env-setup.md)**
......
# Burning Images<a name="EN-US_TOPIC_0000001119964704"></a>
# Burning Images<a name="EN-US_TOPIC_0000001153557088"></a>
- [Prerequisites](#section232415263110)
- [Programming Flash Memory Through the Network Port](#section998903784810)
- [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:
Hi3516D V300 supports programming flash memory of the standard 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\)**
- **Linux system: Supports programming through the network port or serial 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).
>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 Hi3516D V300](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681).
## Prerequisites<a name="section232415263110"></a>
### Prerequisites<a name="section1458192114718"></a>
In DevEco Device Tool, select **Import Project** to open the folder where the target file is located. Set **MCU** to **Hi3516DV300** under **HiSilicon\_Arm\_Linux** and **Framework** to **Hb**.
[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**.
![](figure/hisilicon-arm-linux.png)
### Programming Flash Memory Through the Network Port<a name="section134403184287"></a>
### Programming Flash Memory Through the Network Port<a name="section998903784810"></a>
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).
1. Connect the PC and the target development board through the serial port, network port, and power port. For details, see [Introduction to the Hi3516 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_minitinier_des_3516-0000001152041033).
2. <a name="en-us_topic_0000001056443961_li1050616379507"></a>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).
![](figure/en-us_image_0000001114129428.png)
![](figure/record-the-serial-port-number-1.png)
3. Open DevEco Device Tool and go to **Projects** \> **Settings**.
![](figure/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.
<a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_table165522468109"></a>
<table><thead align="left"><tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row955394615107"><th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.1"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p179582053201013"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p179582053201013"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p179582053201013"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.2"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11958125331010"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11958125331010"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11958125331010"></a>Binary</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.3"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p13958115331012"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p13958115331012"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p13958115331012"></a>Memory</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.4"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1395845361014"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1395845361014"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1395845361014"></a>System</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.5"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p595855381010"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p595855381010"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p595855381010"></a>Address</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.6"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p59584533106"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p59584533106"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p59584533106"></a>Length</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.7"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11553246171019"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11553246171019"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11553246171019"></a>Board</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.8"><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p195531146161018"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p195531146161018"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p195531146161018"></a>Type</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row3553154691019"><td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.1 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p17958115371017"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p17958115371017"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p17958115371017"></a>fastboot</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.2 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p89586532106"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p89586532106"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p89586532106"></a>Select <strong id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b1437145020335"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b1437145020335"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b1437145020335"></a>u-boot-hi3516dv300_emmc.bin</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.3 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p8958115314102"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p8958115314102"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p8958115314102"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.4 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p79581153171020"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p79581153171020"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p79581153171020"></a>none</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.5 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6958195341010"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6958195341010"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6958195341010"></a>0x000000</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.6 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p795875318101"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p795875318101"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p795875318101"></a>0x100000</p>
</td>
<td class="cellrowborder" rowspan="7" valign="top" width="12.5%" headers="mcps1.1.9.1.7 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p13951154061115"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p13951154061115"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p13951154061115"></a>Select <strong id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b16219141853414"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b16219141853414"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b16219141853414"></a>hi3516dv300</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.8 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p135531468109"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p135531468109"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p135531468109"></a>NA</p>
</td>
</tr>
<tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row1255314611102"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p995885319102"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p995885319102"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p995885319102"></a>boot</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p88121709145"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p88121709145"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p88121709145"></a>Select <strong id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b136621723153417"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b136621723153417"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b136621723153417"></a>uImage</strong>.</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p109581753101014"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p109581753101014"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p109581753101014"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p10958175313102"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p10958175313102"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p10958175313102"></a>none</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1959185316100"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1959185316100"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1959185316100"></a>0x100000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p10959135314102"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p10959135314102"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p10959135314102"></a>0xf00000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p0554546111013"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p0554546111013"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p0554546111013"></a>NA</p>
</td>
</tr>
<tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row19554104611015"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p139598532103"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p139598532103"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p139598532103"></a>updater</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1781314013140"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1781314013140"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1781314013140"></a>Select <strong id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b9127234183412"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b9127234183412"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b9127234183412"></a>updater.img</strong>.</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p395995311105"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p395995311105"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p395995311105"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p129591153181015"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p129591153181015"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p129591153181015"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p169591532101"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p169591532101"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p169591532101"></a>0x1000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p7959953151017"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p7959953151017"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p7959953151017"></a>0x1400000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p45547467107"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p45547467107"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p45547467107"></a>NA</p>
</td>
</tr>
<tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row65541460107"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6959125319108"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6959125319108"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6959125319108"></a>misc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p481318071415"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p481318071415"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p481318071415"></a>Leave it blank.</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p795918532103"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p795918532103"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p795918532103"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1695919534108"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1695919534108"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1695919534108"></a>none</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12959205317102"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12959205317102"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12959205317102"></a>0x2400000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6959125331017"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6959125331017"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p6959125331017"></a>0x100000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p65546468102"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p65546468102"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p65546468102"></a>NA</p>
</td>
</tr>
<tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row145541746191011"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1595945313105"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1595945313105"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1595945313105"></a>system</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p2813160161420"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p2813160161420"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p2813160161420"></a>Select <strong id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b15994111173812"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b15994111173812"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b15994111173812"></a>system.img</strong>.</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p395985317100"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p395985317100"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p395985317100"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p295955331017"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p295955331017"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p295955331017"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p129591853111013"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p129591853111013"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p129591853111013"></a>0x2500000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p109591753131011"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p109591753131011"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p109591753131011"></a>0xceb00000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p75551646171014"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p75551646171014"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p75551646171014"></a>NA</p>
</td>
</tr>
<tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row655564620109"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12960155351019"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12960155351019"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12960155351019"></a>vendor</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1881360181418"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1881360181418"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1881360181418"></a>Select <strong id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b715941813818"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b715941813818"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b715941813818"></a>vendor.img</strong>.</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p796013532101"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p796013532101"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p796013532101"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p119607538107"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p119607538107"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p119607538107"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11960165321019"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11960165321019"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p11960165321019"></a>0xd1000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p16960653141017"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p16960653141017"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p16960653141017"></a>0x10000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p955584631011"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p955584631011"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p955584631011"></a>NA</p>
</td>
</tr>
<tr id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_row6555646161014"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p196065341017"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p196065341017"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p196065341017"></a>userdata</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p16813140141420"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p16813140141420"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p16813140141420"></a>Select <strong id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b182717279384"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b182717279384"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_b182717279384"></a>userdata.img</strong>.</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p896065318103"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p896065318103"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p896065318103"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12960155361018"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12960155361018"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p12960155361018"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1596013531108"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1596013531108"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p1596013531108"></a>0xe1000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p89601753161016"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p89601753161016"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p89601753161016"></a>0x5b800000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p8556194619109"><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p8556194619109"></a><a name="en-us_topic_0000001056443961_en-us_topic_0000001056443961_p8556194619109"></a>NA</p>
</td>
</tr>
</tbody>
</table>
![](figure/en-us_image_0000001160527611.png)
5. On the **hi3516dv300** tab page, configure the programming options.
![](figure/settings-2.png)
4. 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.
- **upload\_partitions**: Select the files to be burnt. By default, **fastboot**, **boot**, **updater**, **misc**, **system**, **vendor**, and **userdata** are burnt at the same time.
![](figure/en-us_image_0000001117621400.png)
![](figure/upload-options-28.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:
5. Check and set the IP address of the network adapter connected to the development board. For details, see [Setting the IP Address of the Network Port for Programming on Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/set_ipaddress-0000001141825075).
6. 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\_server\_ip**: Select the IP address set in step [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.
![](figure/en-us_image_0000001117463460.png)
8. When you finish modifying, click **Save** in the upper right corner.
9. Open the project file, go to ![](figure/2021-01-27_170334-19.png) \> **PROJECT TASKS** \> **fastboot** \> **Erase** to erase U-boot.
![](figure/en-us_image_0000001163045527.png)
10. When the following message is displayed, power off the development board and then power it on.
![](figure/en-us_image_0000001114129432.png)
![](figure/ip-address-information.png)
11. Start programming. When the following message is displayed, it indicates that the programming is successful.
7. When you finish modifying, click **Save** in the upper right corner.
8. When the following message is displayed, power off the development board and then power it on.
![](figure/en-us_image_0000001113969542.png)
![](figure/restart-the-development-board-3.png)
9. Start programming. If the following message is displayed, it indicates that the programming is successful.
## Next<a name="section5600113114323"></a>
![](figure/burning-succeeded-4.png)
Congratulations! You have completed the quick start for the standard system. Get yourself familiar with OpenHarmony by a [Development Example for Clock App](../guide/device-clock-guide.md).
# Setting Up Ubuntu Development Environment in Docker Mode and Building Source Code<a name="EN-US_TOPIC_0000001119805112"></a>
# Setting Up Ubuntu Development Environment in Docker Mode<a name="EN-US_TOPIC_0000001119805112"></a>
- [Obtaining Standard-System Source Code](#section8761819202511)
- [Prerequisites](#section102871547153314)
......@@ -61,13 +61,13 @@ repo forall -c 'git lfs pull'
1. Obtain the Docker image.
```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.2
```
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.3
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.2
```
......@@ -89,7 +89,7 @@ repo forall -c 'git lfs pull'
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.3
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.2
```
......
......@@ -12,17 +12,15 @@ This document uses the recommended Hi3516D V300 development board as an example.
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<a name="fig3374426164717"></a>
**Figure 1** Getting started for the standard system<a name="fig19162195553211"></a>
![](figure/getting-started-for-the-standard-system.png "getting-started-for-the-standard-system")
## Introduction to the Development Board<a name="en-us_topic_0000001053666242_section047719215429"></a>
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<a name="en-us_topic_0000001053666242_fig11402183715219"></a>
![](figure/3516正面-17.png)
**Figure 2** Hi3516D V300 front view<a name="fig202901538183412"></a>
![](figure/hi3516d-v300-front-view-27.png "hi3516d-v300-front-view-27")
## Development Board Specifications<a name="en-us_topic_0000001053666242_section15192203316533"></a>
......
# Setting Up Ubuntu Development Environment with Installation Package and Building Source Code<a name="EN-US_TOPIC_0000001119804790"></a>
# Setting Up Ubuntu Development Environment with Installation Package<a name="EN-US_TOPIC_0000001119804790"></a>
- [Installing Dependent Tools](#section18431165519244)
- [Obtaining Standard-System Source Code](#section113751052102517)
......@@ -17,7 +17,7 @@ sudo apt-get update && sudo apt-get install binutils git git-lfs gnupg flex biso
```
>![](../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.
>The preceding command is applicable to Ubuntu 18.04. For other Ubuntu versions, modify the preceding installation command based on the installation package name. Python 3.7 or later is required. Python 3.8 is used as an example.
## Obtaining Standard-System Source Code<a name="section113751052102517"></a>
......@@ -92,7 +92,7 @@ Perform the following operations in the Linux environment:
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 [Building Guidelines](../subsystems/subsys-build.md).
>For details about module-specific build operations, see [Building Guidelines](../subsystems/subsys-build-standard-large.md).
3. Burn the image. For details, see [Burning Images](quickstart-standard-burn.md).
# Running an Image<a name="EN-US_TOPIC_0000001142160948"></a>
- [\#EN-US\_TOPIC\_0000001142160948/section153991115191314](#section153991115191314)
After the image burning is complete, perform the following steps to run the system:
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>This operation procedure is required only if this is the first time you burn an image for the standard system.
1. In DevEco Device Tool, click **Monitor** to open the serial port tool.
![](figure/open-the-serial-port-tool.png)
2. Restart the development board. Before the autoboot countdown ends, press any key to enter the system.
![](figure/press-any-key-to-enter-the-system.gif)
3. Run the following commands to set system boot parameters:
```
setenv bootargs 'mem=640M console=ttyAMA0,115200 mmz=anonymous,0,0xA8000000,384M clk_ignore_unused androidboot.selinux=permissive skip_initramfs rootdelay=5 init=/init root=/dev/mmcblk0p5 rootfstype=ext4 rw blkdevparts=mmcblk0:1M(boot),15M(kernel),20M(updater),1M(misc),3307M(system),256M(vendor),-(userdata)'
```
```
setenv bootcmd "mmc read 0x0 0x80000000 0x800 0x4800; bootm 0x80000000";
```
![](figure/start.png)
4. Save the parameter settings.
```
save
```
![](figure/save-the-parameter-settings.png)
5. Restart the development board to start the system.
```
reset
```
![](figure/start-the-system.png)
......@@ -4,17 +4,20 @@
- [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 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.
System requirements:
- OS: 64-bit Windows 10
- User name: cannot contain Chinese characters
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
4. Installing HPM
5. Installing the DevEco Device Tool Plug-in
## Obtaining the Software<a name="en-us_topic_0000001058091994_section1483143015558"></a>
......@@ -26,7 +29,7 @@ DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedu
</th>
<th class="cellrowborder" valign="top" width="20.03%" id="mcps1.1.5.1.3"><p id="en-us_topic_0000001058091994_p373085711569"><a name="en-us_topic_0000001058091994_p373085711569"></a><a name="en-us_topic_0000001058091994_p373085711569"></a>Version</p>
</th>
<th class="cellrowborder" valign="top" width="39.98%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001058091994_p197309576566"><a name="en-us_topic_0000001058091994_p197309576566"></a><a name="en-us_topic_0000001058091994_p197309576566"></a>Obtaining Channel</p>
<th class="cellrowborder" valign="top" width="39.98%" id="mcps1.1.5.1.4"><p id="en-us_topic_0000001058091994_p197309576566"><a name="en-us_topic_0000001058091994_p197309576566"></a><a name="en-us_topic_0000001058091994_p197309576566"></a>How to Obtain</p>
</th>
</tr>
</thead>
......@@ -43,37 +46,37 @@ DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedu
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p547205817316"><a name="en-us_topic_0000001058091994_p547205817316"></a><a name="en-us_topic_0000001058091994_p547205817316"></a>Programming tool</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p1991315166416"><a name="en-us_topic_0000001058091994_p1991315166416"></a><a name="en-us_topic_0000001058091994_p1991315166416"></a>v3.7.4–3.8.x (64-bit)</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p1991315166416"><a name="en-us_topic_0000001058091994_p1991315166416"></a><a name="en-us_topic_0000001058091994_p1991315166416"></a>V3.8.9 or later (64-bit)</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p1599022403"><a name="en-us_topic_0000001058091994_p1599022403"></a><a name="en-us_topic_0000001058091994_p1599022403"></a><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p108321457411"><a name="en-us_topic_0000001058091994_p108321457411"></a><a name="en-us_topic_0000001058091994_p108321457411"></a><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/</a></p>
</td>
</tr>
<tr id="en-us_topic_0000001058091994_row117316576562"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p16405151165717"><a name="en-us_topic_0000001058091994_p16405151165717"></a><a name="en-us_topic_0000001058091994_p16405151165717"></a>Node.js</p>
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p1773185765616"><a name="en-us_topic_0000001058091994_p1773185765616"></a><a name="en-us_topic_0000001058091994_p1773185765616"></a>The npm environment provider</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p573118572567"><a name="en-us_topic_0000001058091994_p573118572567"></a><a name="en-us_topic_0000001058091994_p573118572567"></a>v12.0.0 or later (64-bit)</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p16304104120181"><a name="en-us_topic_0000001058091994_p16304104120181"></a><a name="en-us_topic_0000001058091994_p16304104120181"></a>Any of the following versions:</p>
<a name="en-us_topic_0000001058091994_ul875854471719"></a><a name="en-us_topic_0000001058091994_ul875854471719"></a><ul id="en-us_topic_0000001058091994_ul875854471719"><li>V12.22.5 or later (64-bit)</li><li>V14.17.5 or later (64-bit)</li><li>V16.6.0 or later (64-bit)</li></ul>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p9200911141112"><a name="en-us_topic_0000001058091994_p9200911141112"></a><a name="en-us_topic_0000001058091994_p9200911141112"></a><a href="https://nodejs.org/en/download/" target="_blank" rel="noopener noreferrer">https://nodejs.org/en/download/</a></p>
</td>
</tr>
<tr id="en-us_topic_0000001058091994_row6731105715561"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p2081865318571"><a name="en-us_topic_0000001058091994_p2081865318571"></a><a name="en-us_topic_0000001058091994_p2081865318571"></a>hpm</p>
<tr id="en-us_topic_0000001058091994_row6731105715561"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p2081865318571"><a name="en-us_topic_0000001058091994_p2081865318571"></a><a name="en-us_topic_0000001058091994_p2081865318571"></a>HPM</p>
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p1632215161040"><a name="en-us_topic_0000001058091994_p1632215161040"></a><a name="en-us_topic_0000001058091994_p1632215161040"></a>Package manager</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p773185715566"><a name="en-us_topic_0000001058091994_p773185715566"></a><a name="en-us_topic_0000001058091994_p773185715566"></a>Latest version</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p773185715566"><a name="en-us_topic_0000001058091994_p773185715566"></a><a name="en-us_topic_0000001058091994_p773185715566"></a>V1.3.0 or later</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p14731125745610"><a name="en-us_topic_0000001058091994_p14731125745610"></a><a name="en-us_topic_0000001058091994_p14731125745610"></a>Run the following command:</p>
<pre class="screen" id="en-us_topic_0000001058091994_screen54628167163"><a name="en-us_topic_0000001058091994_screen54628167163"></a><a name="en-us_topic_0000001058091994_screen54628167163"></a>npm install -g @ohos/hpm-cli</pre>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p14731125745610"><a name="en-us_topic_0000001058091994_p14731125745610"></a><a name="en-us_topic_0000001058091994_p14731125745610"></a>For details, see <a href="#en-us_topic_0000001058091994_section173054793610">Installing HPM</a>.</p>
</td>
</tr>
<tr id="en-us_topic_0000001058091994_row13317205645717"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="en-us_topic_0000001058091994_p143411112587"><a name="en-us_topic_0000001058091994_p143411112587"></a><a name="en-us_topic_0000001058091994_p143411112587"></a>DevEco Device Tool</p>
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="en-us_topic_0000001058091994_p1690316506517"><a name="en-us_topic_0000001058091994_p1690316506517"></a><a name="en-us_topic_0000001058091994_p1690316506517"></a>Plug-in for the OpenHarmony source code compilation, programming, and debugging</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p113171956185715"><a name="en-us_topic_0000001058091994_p113171956185715"></a><a name="en-us_topic_0000001058091994_p113171956185715"></a>v2.2 Beta1</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="en-us_topic_0000001058091994_p113171956185715"><a name="en-us_topic_0000001058091994_p113171956185715"></a><a name="en-us_topic_0000001058091994_p113171956185715"></a>V2.2 Beta2</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p3503163074720"><a name="en-us_topic_0000001058091994_p3503163074720"></a><a name="en-us_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/en/ide#download" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/en/ide#download</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="en-us_topic_0000001058091994_p3503163074720"><a name="en-us_topic_0000001058091994_p3503163074720"></a><a name="en-us_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/cn/ide#download_beta" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide#download_beta</a></p>
<p id="en-us_topic_0000001058091994_p23171856135717"><a name="en-us_topic_0000001058091994_p23171856135717"></a><a name="en-us_topic_0000001058091994_p23171856135717"></a>Log in with your HUAWEI ID to download it. You can <a href="https://developer.huawei.com/consumer/en/doc/start/registration-and-verification-0000001053628148" target="_blank" rel="noopener noreferrer">register an account here</a>.</p>
</td>
</tr>
......@@ -87,24 +90,23 @@ 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\)**.
![](figure/en-us_image_0000001057335403.png)
![](figure/installing-visual-studio-code.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.
2. After the installation is complete, open the CLT and run **code --version**. If the version number can be displayed, it indicates that the installation is successful.
## Installing Python<a name="en-us_topic_0000001058091994_section16266553175320"></a>
1. Double-click the Python software package, select **Add Python xx to PATH**, and click **Install Now**.
1. Double-click the Python software package, select **Add Python 3.8 to PATH**, and click **Install Now**.
![](figure/en-us_image_0000001096154076.png)
![](figure/installing-python.png)
2. After the installation is complete, click **Close**.
![](figure/en-us_image_0000001142794291.png)
![](figure/setup-was-successful.png)
3. Open the CLT, and run **python --version** to check the installation result.
![](figure/en-us_image_0000001143154485.png)
![](figure/checking-the-installation-result.png)
4. In the CLT, run the following commands to set the pip source for downloading the dependencies required for later installation:
......@@ -123,17 +125,14 @@ 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.
![](figure/en-us_image_0000001056814287.png)
## Installing hpm<a name="en-us_topic_0000001058091994_section173054793610"></a>
## Installing HPM<a name="en-us_topic_0000001058091994_section173054793610"></a>
Before installing hpm, ensure that Node.js has been installed
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.
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/en/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.
>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.
......@@ -141,13 +140,13 @@ and that your network can access the Internet. If your network requires a proxy
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:
2. Open the CLT and run the following command to install the latest version of HPM:
```
npm install -g @ohos/hpm-cli
```
![](figure/en-us_image_0000001073840162.png)
![](figure/hpm-version.png)
3. After the installation is complete, run the following command to obtain the installation result:
......@@ -155,29 +154,37 @@ and that your network can access the Internet. If your network requires a proxy
hpm -V
```
![](figure/en-us_image_0000001100641602.png)
## Installing the DevEco Device Tool Plug-in<a name="en-us_topic_0000001058091994_section4336315185716"></a>
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.
Before installing DevEco Device Tool, make sure the user name of the host does not contain Chinese characters. Otherwise, the **DevEco Home** page will be stuck loading and the DevEco Device Tool cannot work.
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.
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/en/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.
2. DevEco Device Tool checks whether the toolkit on which the installation depends meets the requirements. If the requirements are not met, follow the preceding installation instructions in this section.
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>If Visual Studio Code has been installed but fails to be detected, restart your computer.
![](figure/installing-the-deveco-device-tool.png)
3. Click **Install**.
![](figure/install.png)
4. After the installation is complete, click **Close**.
![](figure/en-us_image_0000001072468991.png)
![](figure/installation-complete.png)
3. After the installation is complete, the CLT is automatically closed.
4. Open Visual Studio Code, click the ![](figure/en-us_image_0000001072757874.png) button on the left, and check whether C/C++, CodeLLDB, and DevEco Device Tool are listed in **INSTALLED**.
5. 启动Visual Studio Code,会自动安装DevEco Device Tool依赖的C/C++、CodeLLDB插件。等待安装完成后,点击Visual Studio Code左侧的![](figure/button.png)按钮,检查INSTALLED中,是否已成功安装C/C++、CodeLLDB和DevEco Device Tool。
>![](../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).
![](figure/en-us_image_0000001142802505.png)
![](figure/visual-studio-code.png)
# Standard System<a name="EN-US_TOPIC_0000001111221726"></a>
- **[Introduction](quickstart-standard-description.md)**
- **[Introduction](quickstart-standard-overview.md)**
- **[Setting Up Windows Development Environment](quickstart-standard-windows-environment.md)**
- **[Setting Up Ubuntu Development Environment in Docker Mode and Building Source Code](quickstart-standard-docker-environment.md)**
- **[Setting Up Ubuntu Development Environment in Docker Mode](quickstart-standard-docker-environment.md)**
- **[Setting Up Ubuntu Development Environment with Installation Package and Building Source Code](quickstart-standard-package-environment.md)**
- **[Setting Up Ubuntu Development Environment with Installation Package](quickstart-standard-package-environment.md)**
- **[Burning Images](quickstart-standard-burn.md)**
- **[FAQs](quickstart-standard-faq.md)**
- **[Running an Image](quickstart-standard-running.md)**
- **[FAQs](quickstart-standard-faqs.md)**
......@@ -69,7 +69,7 @@ OpenHarmony也提供了一系列可选的系统组件,方便设备开发者按
</td>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><p id="p857711379158"><a name="p857711379158"></a><a name="p857711379158"></a>使用<span id="text5577237181514"><a name="text5577237181514"></a><a name="text5577237181514"></a>OpenHarmony</span>提供的基础能力</p>
</td>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul1577103716159"></a><a name="ul1577103716159"></a><ul id="ul1577103716159"><li><a href="kernel/kernel.md">内核开发指南</a></li><li><a href="driver/Readme-CN.md">驱动开发指南</a></li><li><a href="subsystems/Readme-CN.md">子系统开发指南</a></li><li><a href="security/security-guidelines-overall.md">安全指南</a></li><li><a href="security/security-privacy-protection.md">隐私保护</a></li></ul>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul1577103716159"></a><a name="ul1577103716159"></a><ul id="ul1577103716159"><li><a href="kernel/kernel-mini.md">轻量系统内核开发指南</a></li><li><a href="kernel/kernel-small.md">小型系统内核开发指南</a></li><li><a href="driver/Readme-CN.md">驱动开发指南</a></li><li><a href="subsystems/Readme-CN.md">子系统开发指南</a></li><li><a href="security/security-guidelines-overall.md">安全指南</a></li><li><a href="security/security-privacy-protection.md">隐私保护</a></li></ul>
</td>
</tr>
<tr id="row10602193719152"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p857873713152"><a name="p857873713152"></a><a name="p857873713152"></a>进阶开发</p>
......@@ -86,11 +86,11 @@ OpenHarmony也提供了一系列可选的系统组件,方便设备开发者按
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul157903731520"></a><a name="ul157903731520"></a><ul id="ul157903731520"><li><a href="porting/porting-minichip.md">轻量系统芯片移植指导</a></li><li><a href="porting/porting-smallchip.md">小型系统芯片移植指导</a></li><li><a href="porting/porting-thirdparty.md">三方库移植指导</a></li></ul>
</td>
</tr>
<tr id="row9601737181517"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p25791037131519"><a name="p25791037131519"></a><a name="p25791037131519"></a>贡献Bundle</p>
<tr id="row9601737181517"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p25791037131519"><a name="p25791037131519"></a><a name="p25791037131519"></a>贡献组件</p>
</td>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><p id="p45798376158"><a name="p45798376158"></a><a name="p45798376158"></a><span id="text16579133741518"><a name="text16579133741518"></a><a name="text16579133741518"></a>OpenHarmony</span>贡献Bundle</p>
<td class="cellrowborder" valign="top" width="35.61356135613561%" headers="mcps1.2.4.1.2 "><p id="p45798376158"><a name="p45798376158"></a><a name="p45798376158"></a><span id="text16579133741518"><a name="text16579133741518"></a><a name="text16579133741518"></a>OpenHarmony</span>贡献功能组件</p>
</td>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul957919379156"></a><a name="ul957919379156"></a><ul id="ul957919379156"><li><a href="bundles/oem_bundle_standard_des.md">Bundle开发规范</a></li><li><a href="bundles/bundles-guide.md">Bundle开发指南</a></li><li><a href="bundles/bundles-demo.md">Bundle开发示例</a></li></ul>
<td class="cellrowborder" valign="top" width="35.91359135913591%" headers="mcps1.2.4.1.3 "><a name="ul957919379156"></a><a name="ul957919379156"></a><ul id="ul957919379156"><li><a href="bundles/oem_bundle_standard_des.md">HPM Bundle 组件开发规范</a></li><li><a href="bundles/bundles-guide.md">HPM Bundle 组件开发指南</a></li><li><a href="bundles/bundles-demo.md">HPM Bundle 组件开发示例</a></li></ul>
</td>
</tr>
<tr id="row260193701512"><td class="cellrowborder" valign="top" width="28.472847284728473%" headers="mcps1.2.4.1.1 "><p id="p95794372155"><a name="p95794372155"></a><a name="p95794372155"></a>参考</p>
......@@ -142,25 +142,18 @@ OpenHarmony也提供了一系列可选的系统组件,方便设备开发者按
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul1954915235272"></a><a name="ul1954915235272"></a><ul id="ul1954915235272"><li><a href="kernel/kernel-standard.md">内核开发指南</a></li><li><a href="driver/Readme-CN.md">驱动开发指南</a></li><li><a href="subsystems/Readme-CN.md">子系统开发指南</a></li><li><a href="security/security-guidelines-overall.md">安全指南</a></li><li><a href="security/security-privacy-protection.md">隐私保护</a></li></ul>
</td>
</tr>
<tr id="row1368195345111"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p16681853145115"><a name="p16681853145115"></a><a name="p16681853145115"></a>进阶开发</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1568753135116"><a name="p1568753135116"></a><a name="p1568753135116"></a>结合系统能力开发智能设备</p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul136895314518"></a><a name="ul136895314518"></a><ul id="ul136895314518"><li><a href="guide/device-clock-guide.md">时钟应用开发示例</a></li><li><a href="guide/device-driver-demo.md">平台驱动开发示例</a></li><li><a href="guide/device-outerdriver-demo.md">外设驱动开发示例</a></li></ul>
</td>
</tr>
<tr id="row66915375119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p4696535512"><a name="p4696535512"></a><a name="p4696535512"></a>移植适配</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p185185615284"><a name="p185185615284"></a><a name="p185185615284"></a>对三方库进行移植适配</p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul14724164204819"></a><a name="ul14724164204819"></a><ul id="ul14724164204819"><li><a href="porting/porting-thirdparty.md">三方库移植指导</a></li><li><a href="porting/standard-system-porting-guide.md">标准系统芯片移植指导</a></li></ul>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul14724164204819"></a><a name="ul14724164204819"></a><ul id="ul14724164204819"><li><a href="porting/standard-system-porting-guide.md">标准系统芯片移植指导</a></li></ul>
</td>
</tr>
<tr id="row869853125119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p3691530511"><a name="p3691530511"></a><a name="p3691530511"></a>贡献Bundle</p>
<tr id="row869853125119"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p3691530511"><a name="p3691530511"></a><a name="p3691530511"></a>贡献组件</p>
</td>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1469115335113"><a name="p1469115335113"></a><a name="p1469115335113"></a><span id="text6691253155112"><a name="text6691253155112"></a><a name="text6691253155112"></a>OpenHarmony</span>贡献Bundle</p>
<td class="cellrowborder" valign="top" width="36.053605360536054%" headers="mcps1.2.4.1.2 "><p id="p1469115335113"><a name="p1469115335113"></a><a name="p1469115335113"></a><span id="text6691253155112"><a name="text6691253155112"></a><a name="text6691253155112"></a>OpenHarmony</span>贡献功能组件</p>
</td>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul87045395116"></a><a name="ul87045395116"></a><ul id="ul87045395116"><li><a href="bundles/oem_bundle_standard_des.md">Bundle开发规范</a></li><li><a href="bundles/bundles-guide.md">Bundle开发指南</a></li><li><a href="bundles/bundles-demo.md">Bundle开发示例</a></li></ul>
<td class="cellrowborder" valign="top" width="36.07360736073608%" headers="mcps1.2.4.1.3 "><a name="ul44949625110"></a><a name="ul44949625110"></a><ul id="ul44949625110"><li><a href="bundles/oem_bundle_standard_des.md">HPM Bundle 组件开发规范</a></li><li><a href="bundles/bundles-guide.md">HPM Bundle 组件开发指南</a></li><li><a href="bundles/bundles-demo.md">HPM Bundle 组件开发示例</a></li></ul>
</td>
</tr>
<tr id="row1170153125110"><td class="cellrowborder" valign="top" width="27.872787278727873%" headers="mcps1.2.4.1.1 "><p id="p16701253195118"><a name="p16701253195118"></a><a name="p16701253195118"></a>参考</p>
......
......@@ -150,10 +150,8 @@ hb set
.
```
**图 1** 设置编译界面<a name="fig18712183616135"></a>
![](figure/zh-cn_image_0000001101413884.png)
**图 1** 设置编译界面<a name="fig7947145854013"></a>
![](figure/设置编译界面.png "设置编译界面")
>![](../public_sys-resources/icon-note.gif) **说明:**
>当前开发板平台和编译界面的对应关系如下:
......
......@@ -9,7 +9,7 @@ HUAWEI DevEco Device Tool是OpenHarmony面向智能设备开发者提供的一
Huawei DevEco Device Tool支持 OpenHarmony设备开发的演进路标如下:
![](figure/3-28.png)
![](figure/evolution-roadmap.png)
## 获取应用开发工具(HUAWEI DevEco Studio)<a name="section0904101019258"></a>
......
......@@ -101,7 +101,7 @@ OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及
```
repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony_1.0.1_release --no-repo-verify
repo sync -c
repo forall -c 'git lfs pull'
repo[Release-Notes](../../release-notes/Readme.md) forall -c 'git lfs pull'
```
- OpenHarmony其他版本源码获取方式请参考版本[Release-Notes](../../release-notes/Readme.md)
......@@ -151,10 +151,8 @@ OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及
3. 结果中显示与关键字匹配的发行版,可以进一步根据组件类别等过滤条件(如:适配的开发板,内核)精确筛选。
4. 查找合适的发行版,点击查看发行版的详情介绍。
**图 1** 包管理<a name="fig838103114320"></a>
![](figure/zh-cn_image_0000001119915556.png)
**图 1** 包管理<a name="fig414435103619"></a>
![](figure/包管理.png "包管理")
2. 了解发行版详情。
......@@ -162,10 +160,8 @@ OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及
2. 点击「直接下载」,将发行版下载到本地。
3. 点击「定制组件」,将对发行版包含的组件进行定制(添加/删除)。
**图 2** 发行版示例<a name="fig1329851510414"></a>
![](figure/zh-cn_image_0000001119755646.png)
**图 2** 发行版示例<a name="fig950763112375"></a>
![](figure/发行版示例.png "发行版示例")
3. 定制组件。
1. 进入发行版的定制页面,如下图所示。
......@@ -173,10 +169,8 @@ OpenHarmony是由开放原子开源基金会(OpenAtom Foundation)孵化及
3. 在右边填写您的项目基本信息,包括名称、版本、描述等信息。
4. 点击“下载“,系统会根据您的选择,生成相应的OpenHarmony代码结构文件\(如my\_cust\_dist.zip\),保存至本地文件。
**图 3** 组件定制<a name="fig05036599014"></a>
![](figure/zh-cn_image_0000001166715379.png)
**图 3** 组件定制<a name="fig13979182053817"></a>
![](figure/组件定制.png "组件定制")
4. 下载安装组件。
1. 解压下载的压缩文件,用命令行工具CMD(Linux下的Shell终端)
......
......@@ -56,7 +56,7 @@ device
├── linux # linux版本
│ └── config.gni # linux版本编译工具链和编译选项配置
└── liteos_a # liteos-a版本
└── config.gni # liteos_a版本编译工具链和编译选项配置
└── config.gni # liteos-a版本编译工具链和编译选项配置
```
vendor目录规则:vendor/\{产品解决方案厂商\}/\{产品名称\}。以华为的wifiiot产品为例:
......
......@@ -12,10 +12,8 @@
1. 启动文件startup.S和相应链接配置文件。
2. main. c中的串口初始化和tick中断注册。
**图 1** 启动流程<a name="fig10838105524917"></a>
![](figure/zh-cn_image_0000001073943511.png)
**图 1** 启动流程<a name="fig113647550597"></a>
![](figure/启动流程.png "启动流程")
启动文件startup.S需要确保中断向量表的入口函数(例如reset\_vector)放在RAM的首地址,它由链接配置文件来指定。其中iar、keil和gcc工程的链接配置文件分别为xxx.icf、xxx.sct和xxx.ld,如果startup.S已经完成系统时钟初始化,并且能够引导到main函数,则启动文件不需要进行修改,采用厂商自带的startup.S即可,否则需要实现以上功能。
......@@ -63,6 +61,11 @@ liteos\_m的完整配置能力及默认配置在los\_config.h定义,该头文
<td class="cellrowborder" valign="top" width="65.19%" headers="mcps1.2.3.1.2 "><p id="p1644094201917"><a name="p1644094201917"></a><a name="p1644094201917"></a>队列功能开关,1表示打开,0表示关闭</p>
</td>
</tr>
<tr id="row14294143784110"><td class="cellrowborder" valign="top" width="34.81%" headers="mcps1.2.3.1.1 "><p id="p529573794111"><a name="p529573794111"></a><a name="p529573794111"></a>LOSCFG_BASE_CORE_TSK_LIMIT</p>
</td>
<td class="cellrowborder" valign="top" width="65.19%" headers="mcps1.2.3.1.2 "><p id="p529503704116"><a name="p529503704116"></a><a name="p529503704116"></a>除idle task之外,总的可用task个数限制,可以根据业务使用的task个数来配置,也可以设置一个较大的值,待业务稳定了,查看运行task的个数来进行配置</p>
</td>
</tr>
<tr id="row16440124216198"><td class="cellrowborder" valign="top" width="34.81%" headers="mcps1.2.3.1.1 "><p id="p9440184271915"><a name="p9440184271915"></a><a name="p9440184271915"></a>LOSCFG_BASE_IPC_SEM</p>
</td>
<td class="cellrowborder" valign="top" width="65.19%" headers="mcps1.2.3.1.2 "><p id="p1044024261912"><a name="p1044024261912"></a><a name="p1044024261912"></a>信号量功能开关,1表示打开,0表示关闭</p>
......
......@@ -18,10 +18,8 @@
- 在Kernel模块中,其中硬件相关的代码放在kernel的arch目录中,其余为硬件无关的代码。内核功能集(task、sem等)的实现依赖硬件相关的arch代码,例如任务上下文切换、原子操作等。
- Utils模块作为基础代码块,被其他模块依赖。
**图 1** liteos-m内核模块图<a name="fig10838105524917"></a>
![](figure/zh-cn_image_0000001072304191.png)
**图 1** liteos-m内核模块图<a name="fig1573612275124"></a>
![](figure/liteos-m内核模块图.png "liteos-m内核模块图")
内核的目录结构和说明如下:
......
# 移植概述<a name="ZH-CN_TOPIC_0000001172160289"></a>
驱动主要包含两部分,平台驱动和器件驱动。平台驱动主要包括通常在SOC内的GPIO、I2C、SPI等;器件驱动则主要包含通常在SOC外的器件,如 LCD、TP、WLAN等
驱动主要包含两部分,平台驱动和器件驱动。平台驱动主要包括通常在SOC内的GPIO、I2C、SPI等;器件驱动则主要包含通常在SOC外的器件,如 LCD、TP、WLAN等
**图 1** OpenHarmony 驱动分类<a name="fig11697182018375"></a>
![](figure/分类.png)
**图 1** OpenHarmony 驱动分类<a name="fig08631434121"></a>
![](figure/OpenHarmony-驱动分类.png "OpenHarmony-驱动分类")
HDF驱动被设计为可以跨OS使用的驱动程序,HDF驱动框架会为驱动达成这个目标提供有力的支撑。开发HDF驱动中,请尽可能只使用HDF驱动框架提供的接口,否则会导致驱动丧失跨OS使用的特性。在开始驱动开发前,建议先了解[HDF驱动框架](../driver/driver-hdf-overview.md)
......@@ -23,7 +23,7 @@ LiteOS-A目录规范参考[LiteOS-A 简介](https://gitee.com/openharmony/kernel
LiteOS-A提供系统运行所需的系统初始化流程和定制化配置选项。移植过程中,需要关注初始化流程中跟硬件配置相关的函数。
如下图所示,LiteOS-A的初始化流程主要包含以下步:
如下图所示,LiteOS-A的初始化流程主要包含以下步:
1. 新增target\_config.h文件,并且编写单板内存相关的配置宏DDR\_MEM\_ADDR和DDR\_MEM\_SIZE,分别表示内存起始地址和内存的长度,预链接脚本board.ld.S会根据这两个宏进行展开生成链接脚本board.ld。
2. 新增定义MMU映射全局数组\(g\_archMmuInitMapping\),指定各个内存段属性及虚实映射关系,内核启动阶段根据该表建立内存映射关系。
......@@ -35,10 +35,8 @@ LiteOS-A提供系统运行所需的系统初始化流程和定制化配置选项
整体启动流程如下图所示:
**图 1** 整体启动流程<a name="fig10838105524917"></a>
![](figure/zh-cn_image_0000001126358814.png)
**图 1** 整体启动流程<a name="fig68283211926"></a>
![](figure/整体启动流程.png "整体启动流程")
从图1中可以看到,内核基础适配需要单板进行适配的代码包含三部分:
......@@ -118,17 +116,15 @@ LiteOS-A提供系统运行所需的系统初始化流程和定制化配置选项
- SystemInit函数用于单板用户态业务初始化,典型的初始化场景如图2所示:
**图 1** 业务启动流程<a name="fig15798236163510"></a>
![](figure/zh-cn_image_0000001126198996.png)
**图 2** 业务启动流程<a name="fig1919217914418"></a>
![](figure/业务启动流程.png "业务启动流程")
- main函数用于内核基础初始化和单板内核态业务初始化,流程如下图3所示,整体由内核启动框架主导初始化流程,图中浅蓝色部分为启动框架中可接受外部模块注册启动的阶段。
>![](../public_sys-resources/icon-caution.gif) **注意:**
>同一层级内的模块不能有依赖关系。
**图 2** 内核启动框架<a name="fig32611728133919"></a>
**图 3** 内核启动框架<a name="fig32611728133919"></a>
![](figure/内核启动框架.jpg "内核启动框架")
**表 2** 启动框架层级
......
......@@ -58,18 +58,16 @@ Linux内核移植主要涉及基于linux内核基线合入三方芯片补丁后
## 验证<a name="section17318153325311"></a>
调试init进程、启动shell和运行简单的用户态程序,验证内核移植是否成功。OpenHarmony[小型系统](https://device.harmonyos.com/cn/docs/start/introduce/oem_start_guide-0000001054913231)的OS镜像结构以及linux用户态的启动流程如下图1所示:
调试init进程、启动shell和运行简单的用户态程序,验证内核移植是否成功。OpenHarmony[小型系统](../quick-start/quickstart-lite-overview.md)的OS镜像结构以及linux用户态的启动流程如下图1所示:
**图 1** 基于linux内核的OS镜像结构和用户态程序启动流程<a name="fig1296918391004"></a>
![](figure/zh-cn_image_0000001126354076.png)
**图 1** 基于linux内核的OS镜像结构和用户态程序启动流程<a name="fig91631652715"></a>
![](figure/基于linux内核的OS镜像结构和用户态程序启动流程.png "基于linux内核的OS镜像结构和用户态程序启动流程")
基于上述流程,推荐按以下步骤完成验证:
1. 制作根文件系统镜像。
请参考[新建芯片解决方案和产品解决方案](https://device.harmonyos.com/cn/docs/develop/subsystems/oem_subsys_build_guide-0000001060378721)生成根文件系统镜像rootfs.img。从上图可以看到启动过程与产品配置强相关,在制作rootfs.img过程中请完成如下四种配置:
请参考[新建芯片解决方案和产品解决方案](../subsystems/subsys-build-mini-lite.md)生成根文件系统镜像rootfs.img。从上图可以看到启动过程与产品配置强相关,在制作rootfs.img过程中请完成如下四种配置:
- 组件配置
......@@ -99,17 +97,13 @@ Linux内核移植主要涉及基于linux内核基线合入三方芯片补丁后
若串口有如下版本号日志打印,则表示init程序启动正常:
**图 2** init启动正常日志<a name="fig13510844174415"></a>
![](figure/init.jpg)
**图 2** init启动正常日志<a name="fig1111661083719"></a>
![](figure/init启动正常日志.png "init启动正常日志")
正常进入shell后执行ls命令,串口打印信息如下图:
**图 3** 正常进入shell后输入ls命令串口打印<a name="fig584415944917"></a>
![](figure/shell.jpg)
**图 3** 正常进入shell后输入ls命令串口打印<a name="fig64571257103717"></a>
![](figure/正常进入shell后输入ls命令串口打印.png "正常进入shell后输入ls命令串口打印")
3. 配置NFS。
......
......@@ -10,15 +10,16 @@
- [2. 编译内核](#section182mcpsimp)
- [3. 移植验证](#section207mcpsimp)
- [用户态启动引导](#section20665151016586)
- [HDF驱动移植](#section210mcpsimp)
- [1. LCD](#section212mcpsimp)
- [2. 触摸屏](#section229mcpsimp)
- [3. WLAN](#section274mcpsimp)
- [开发板移植实例](#开发板移植实例)
- [4. 开发移植示例](#section11253153018415)
本文描述了移植一块开发板的通用步骤,和具体芯片相关的详细移植过程无法在此一一列举。后续社区还会陆续发布开发板移植的实例供开发者参考。
## 定义开发板<a name="section132mcpsimp"></a>
本文以移植名为MyProduct的开发板为例讲解移植过程,假定MyProduct是MyProductVendor公司的开发板,使用MySoCVendor公司生产的MySOC芯片作为处理器。
......@@ -100,23 +101,23 @@
},
```
接着需要修改定义产品的配置文件//productdefine/common/products/MyProduct.json将刚刚定义的子系统加入到产品中。
接着需要修改定义产品的配置文件//productdefine/common/products/MyProduct.json将刚刚定义的子系统加入到产品中。
### 2. 编译内核<a name="section182mcpsimp"></a>
OpenHarmony源码中提供了Linux 4.19的内核,归档在`//kernel/linux-4.19`。本节以该内核版本为例,讲解如何编译内核。
OpenHarmony源码中提供了Linux 4.19的内核,归档在//kernel/linux-4.19。本节以该内核版本为例,讲解如何编译内核。
在子系统的定义中,描述了子系统构建的路径path,即`//device/MySOCVendor/MySOC/build`。这一节会在这个目录创建构建脚本,告诉构建系统如何构建内核。
在子系统的定义中,描述了子系统构建的路径path,即\`//device/MySOCVendor/MySOC/build\`。这一节会在这个目录创建构建脚本,告诉构建系统如何构建内核。
建议的目录结构
```
├── build
   ├── kernel
   │ ├── linux
   │ ├──standard_patch_for_4_19.patch // 基于4.19版本内核的补丁
   ├── BUILD.gn
   ├── ohos.build
│ ├── kernel
│ │ ├── linux
│ │ ├──standard_patch_for_4_19.patch // 基于4.19版本内核的补丁
│ ├── BUILD.gn
│ ├── ohos.build
```
BUILD.gn是subsystem构建的唯一入口。
......@@ -146,6 +147,33 @@ BUILD.gn是subsystem构建的唯一入口。
启动编译,验证预期的kernel镜像是否成功生成。
## 用户态启动引导<a name="section20665151016586"></a>
1. 用户态进程启动引导总览。
![](figure/overview-of-use-mode-process-startup.png)
系统上电加载内核后,按照以下流程完成系统各个服务和应用的启动:
1. 内核启动init进程,一般在bootloader启动内核时通过设置内核的cmdline来指定init的位置;如上图所示的"init=/init root/dev/xxx"。
2. 2init进程启动后,会挂载tmpfs,procfs,创建基本的dev设备节点,提供最基本的根文件系统。
3. init继续启动ueventd监听内核热插拔事件,为这些设备创建dev设备节点;包括block设备各个分区设备都是通过此事件创建。
4. init进程挂载block设备各个分区(system,vendor),开始扫描各个系统服务的init启动脚本,并拉起各个SA服务。
5. samgr是各个SA的服务注册中心,每个SA启动时,都需要向samgr注册,每个SA会分配一个ID,应用可以通过该ID访问SA。
6. foundation是一个特殊的SA服务进程,提供了用户程序管理框架及基础服务;由该进程负责应用的生命周期管理。
7. 由于应用都需要加载JS的运行环境,涉及大量准备工作,因此appspawn作为应用的孵化器,在接收到foundation里的应用启动请求时,可以直接孵化出应用进程,减少应用启动时间。
2. init。
init启动引导组件配置文件包含了所有需要由init进程启动的系统关键服务的服务名、可执行文件路径、权限和其他信息。每个系统服务各自安装其启动脚本到/system/etc/init目录下。
新芯片平台移植时,平台相关的初始化配置需要增加平台相关的初始化配置文件/vendor/etc/init/init.\{hardware\}.cfg;该文件完成平台相关的初始化设置,如安装ko驱动,设置平台相关的/proc节点信息。
init相关进程代码在//base/startup/init\_lite目录下,该进程是系统第一个进程,无其它依赖。
初始化配置文件具体的开发指导请参考 [init启动引导组件](../subsystems/subsys-boot-init.md)。
## HDF驱动移植<a name="section210mcpsimp"></a>
### 1. LCD<a name="section212mcpsimp"></a>
......@@ -206,13 +234,7 @@ root {
- 创建触摸屏器件驱动
在目录中创建名为
```
touch_ic_name.c
```
的文件。代码模板如下:注意:请替换ic\_name为你所适配芯片的名称。
在目录中创建名为touch\_ic\_name.c的文件。代码模板如下:注意:请替换ic\_name为你所适配芯片的名称。
```
#include "hdf_touch.h"
......@@ -293,7 +315,7 @@ HDF_INIT(g_touchXXXXChipEntry);
}
```
更详细的驱动开发指导,请参考 [TOUCHSCREEN](../driver/driver-peripherals-touch-des.md)
更详细的驱动开发指导,请参考 [TOUCHSCREEN](../driver/driver-peripherals-touch-des.md)
### 3. WLAN<a name="section274mcpsimp"></a>
......@@ -314,21 +336,21 @@ Wi-Fi驱动分为两部分,一部分负责管理WLAN设备,另一个部分
</tr>
<tr id="row290mcpsimp"><td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry291mcpsimpp0"><a name="entry291mcpsimpp0"></a><a name="entry291mcpsimpp0"></a>HdfChipDriverFactory</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><pre class="codeblock" id="code293mcpsimp"><a name="code293mcpsimp"></a><a name="code293mcpsimp"></a>//drivers/framework/include/wifi/hdf_wlan_chipdriver_manager.h</pre>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="p136856366385"><a name="p136856366385"></a><a name="p136856366385"></a>//drivers/framework/include/wifi/hdf_wlan_chipdriver_manager.h</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry294mcpsimpp0"><a name="entry294mcpsimpp0"></a><a name="entry294mcpsimpp0"></a>ChipDriver的Factory,用于支持一个芯片多个Wi-Fi端口</p>
</td>
</tr>
<tr id="row295mcpsimp"><td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry296mcpsimpp0"><a name="entry296mcpsimpp0"></a><a name="entry296mcpsimpp0"></a>HdfChipDriver</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><pre class="codeblock" id="code298mcpsimp"><a name="code298mcpsimp"></a><a name="code298mcpsimp"></a>//drivers/framework/include/wifi/wifi_module.h</pre>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="p714312457389"><a name="p714312457389"></a><a name="p714312457389"></a>//drivers/framework/include/wifi/wifi_module.h</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry299mcpsimpp0"><a name="entry299mcpsimpp0"></a><a name="entry299mcpsimpp0"></a>每个WLAN端口对应一个HdfChipDriver,用来管理一个特定的WLAN端口</p>
</td>
</tr>
<tr id="row300mcpsimp"><td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry301mcpsimpp0"><a name="entry301mcpsimpp0"></a><a name="entry301mcpsimpp0"></a>NetDeviceInterFace</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><pre class="codeblock" id="code303mcpsimp"><a name="code303mcpsimp"></a><a name="code303mcpsimp"></a>//drivers/framework/include/net/net_device.h</pre>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="p015815313819"><a name="p015815313819"></a><a name="p015815313819"></a>//drivers/framework/include/net/net_device.h</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%"><p id="entry304mcpsimpp0"><a name="entry304mcpsimpp0"></a><a name="entry304mcpsimpp0"></a>与协议栈之间的接口,如发送数据、设置网络接口状态等</p>
</td>
......@@ -338,8 +360,8 @@ Wi-Fi驱动分为两部分,一部分负责管理WLAN设备,另一个部分
建议适配按如下步骤操作:
1.创建HDF驱动建议将代码放置在//device/MySoCVendor/peripheral/wifi/chip\_name/
文件模板如下:
1.创建HDF驱动建议将代码放置在//device/MySoCVendor/peripheral/wifi/chip\_name/,文件模板如下:
```
static int32_t HdfWlanHisiChipDriverInit(struct HdfDeviceObject *device) {
static struct HdfChipDriverFactory factory = CreateChipDriverFactory();
......@@ -361,7 +383,7 @@ struct HdfDriverEntry g_hdfXXXChipEntry = {
HDF_INIT(g_hdfXXXChipEntry);
```
在CreateChipDriverFactory中需要创建一个HdfChipDriverFactory,接口如下:
在CreateChipDriverFactory中需要创建一个HdfChipDriverFactory,接口如下:
<a name="table312mcpsimp"></a>
<table><tbody><tr id="row317mcpsimp"><td class="cellrowborder" valign="top" width="50%"><p id="entry318mcpsimpp0"><a name="entry318mcpsimpp0"></a><a name="entry318mcpsimpp0"></a>接口</p>
......@@ -447,7 +469,8 @@ HdfChipDriver需要实现的接口有
在产品配置目录下创建芯片的配置文件//vendor/MyProductVendor/MyProduct/config/wifi/wlan\_chip\_chip\_name.hcs。
注意: 路径中的vendor\_name、product\_name、chip\_name请替换成实际名称
注意: 路径中的vendor\_name、product\_name、chip\_name请替换成实际名称。
模板如下:
```
......@@ -512,7 +535,7 @@ obj-$(CONFIG_DRIVERS_WLAN_XXX) += $(HDF_DEVICE_ROOT)/MySoCVendor/peripheral/buil
当在内核中开启DRIVERS\_WLAN\_XXX开关时,会调用//device/MySoCVendor/peripheral/build/standard/中的makefile。更多详细的开发手册,请参考[WLAN开发](../guide/oem_wifi_sdk_des.md)
## 开发板移植实例
### 4. 开发移植示例<a name="section11253153018415"></a>
[DAYU开发板](https://gitee.com/openharmony-sig/devboard_device_hihope_build/blob/master/DAYU%20%E5%B9%B3%E5%8F%B0OpenHarmony%20%E9%80%82%E9%85%8D%E6%8C%87%E5%AF%BC%20-202108.pdf)
开发移植示例请参考[DAYU开发板](https://gitee.com/openharmony-sig/devboard_device_hihope_build/blob/master/DAYU%20%E5%B9%B3%E5%8F%B0OpenHarmony%20%E9%80%82%E9%85%8D%E6%8C%87%E5%AF%BC%20-202108.pdf)
......@@ -7,10 +7,8 @@
Hi3516DV300作为新一代行业专用Smart HD IP摄像机SOC,集成新一代ISP\(Image Signal Processor\)、H.265视频压缩编码器,同时集成高性能NNIE引擎,使得Hi3516DV300在低码率、高画质、智能处理和分析、低功耗等方面引领行业水平。
**图 1** Hi3516单板正面外观图<a name="fig11402183715219"></a>
![](figure/3516正面.png)
**图 1** Hi3516单板正面外观图<a name="fig6340825506"></a>
![](figure/Hi3516单板正面外观图.png "Hi3516单板正面外观图")
## 开发板规格<a name="section15192203316533"></a>
......
......@@ -7,13 +7,11 @@
Hi3518EV300作为新一代智慧视觉处理SOC,集成新一代ISP\(Image Signal Processor\)以及H.265视频压缩编码器,同时采用先进低功耗工艺和低功耗架构设计,使其在低码率、高画质、低功耗等方面引领行业水平。
**图 1** Hi3518EV300单板正面外观图<a name="fig1187174485310"></a>
**图 1** Hi3518EV300单板正面外观图<a name="fig73059502010"></a>
![](figure/Hi3518EV300单板正面外观图.png "Hi3518EV300单板正面外观图")
**图 2** Hi3518EV300单板背面外观图<a name="fig73195258113"></a>
![](figure/Hi3518正背面.png)
**图 2** Hi3518EV300单板背面外观图<a name="fig14828141713116"></a>
![](figure/Hi3518EV300单板背面外观图.png "Hi3518EV300单板背面外观图")
## 开发板规格<a name="section765112478446"></a>
......
......@@ -9,27 +9,21 @@
Hi3861 WLAN模组是一片大约2cm\*5cm大小的开发板,是一款高度集成的2.4GHz WLAN SoC芯片,集成IEEE 802.11b/g/n基带和RF(Radio Frequency)电路。支持OpenHarmony,并配套提供开放、易用的开发和调试运行环境。
**图 1** Hi3861 WLAN模组外观图<a name="fig74884420237"></a>
![](figure/3861正面.png)
**图 1** Hi3861 WLAN模组外观图<a name="fig5781557185810"></a>
![](figure/Hi3861-WLAN模组外观图.png "Hi3861-WLAN模组外观图")
另外,Hi3861 WLAN模组还可以通过与Hi3861底板连接,扩充自身的外设能力,底板如下图所示。
**图 2** Hi3861底板外观图<a name="fig111746288192"></a>
![](figure/zh-cn_image_0000001174350615.png)
**图 2** Hi3861底板外观图<a name="fig12182375916"></a>
![](figure/Hi3861底板外观图.png "Hi3861底板外观图")
- 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协议的各种数据速率。
- Hi3861芯片集成高性能32bit微处理器、硬件安全引擎以及丰富的外设接口,外设接口包括SPI(Synchronous Peripheral Interface)、UART(Universal Asynchronous Receiver & Transmitter)、I2C(The Inter Integrated Circuit)、PWM(Pulse Width Modulation)、GPIO(General Purpose Input/Output)和多路ADC(Analog to Digital Converter),同时支持高速SDIO2.0(Secure Digital Input/Output)接口,最高时钟可达50MHz;芯片内置SRAM(Static Random Access Memory)和Flash,可独立运行,并支持在Flash上运行程序。
- Hi3861芯片适用于智能家电等物联网智能终端领域。
**图 3** Hi3861功能框图<a name="f0d52fa2f3b094c688c805a373a6ec970"></a>
![](figure/zh-cn_image_0000001128311066.png)
**图 3** Hi3861功能框图<a name="fig1367035113590"></a>
![](figure/Hi3861功能框图.png "Hi3861功能框图")
## 资源和约束<a name="section82610215014"></a>
......
......@@ -2,29 +2,24 @@
- [获取软件](#section1897711811517)
- [获取源码](#section1545225464016)
- [安装和配置Python](#section1238412211211)
- [安装gn](#section29216201423)
- [安装ninja](#section8762358731)
- [安装LLVM](#section12202192215415)
- [安装必要的库和工具](#section108201740181219)
- [安装Python3](#section1238412211211)
- [安装LLVM\(仅OpenHarmony\_v1.x分支/标签需要\)](#section12202192215415)
- [安装hb](#section15794154618411)
- [前提条件](#section1083283711515)
- [安装方法](#section11518484814)
- [卸载方法](#section3512551574)
- [安装其他工具](#section830511218494)
- [安装方法](#section54409586499)
系统要求:Ubuntu16.04及以上64位系统版本。
编译环境搭建分为如下几步:
编译环境搭建包含如下几步:
1. 获取源码
2. 安装和配置python
3. 安装gn
4. 安装ninja
5. 安装LLVM
6. 安装hb
2. 安装必要的库和工具
3. 安装python3
4. 安装LLVM\(仅OpenHarmony\_v1.x分支/标签需要\)
5. 安装hb
>![](../public_sys-resources/icon-notice.gif) **须知:**
>- 针对Ubuntu编译环境我们提供了对应的Docker,该Docker封装了相关编译工具,选择使用Docker的开发者可跳过此章节。Docker使用可参考[Docker方式获取编译环境](../get-code/gettools-acquire.md#section107932281315)。
......@@ -38,70 +33,47 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
**表 1** Linux服务器开发工具及获取途径
<a name="table6299192712513"></a>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="13.350000000000001%" id="mcps1.2.4.1.1"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>开发工具</p>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="25.779999999999998%" id="mcps1.2.4.1.1"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>开发工具</p>
</th>
<th class="cellrowborder" valign="top" width="24.65%" id="mcps1.2.4.1.2"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>用途</p>
<th class="cellrowborder" valign="top" width="30.819999999999997%" id="mcps1.2.4.1.2"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>用途</p>
</th>
<th class="cellrowborder" valign="top" width="62%" id="mcps1.2.4.1.3"><p id="p12997271757"><a name="p12997271757"></a><a name="p12997271757"></a>获取途径</p>
<th class="cellrowborder" valign="top" width="43.4%" id="mcps1.2.4.1.3"><p id="p12997271757"><a name="p12997271757"></a><a name="p12997271757"></a>获取途径</p>
</th>
</tr>
</thead>
<tbody><tr id="row45863354112"><td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.2.4.1.1 "><p id="p3587173513117"><a name="p3587173513117"></a><a name="p3587173513117"></a>源码</p>
</td>
<td class="cellrowborder" valign="top" width="24.65%" headers="mcps1.2.4.1.2 "><p id="p258713581118"><a name="p258713581118"></a><a name="p258713581118"></a>功能开发</p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p16587835171114"><a name="p16587835171114"></a><a name="p16587835171114"></a>参考<a href="../get-code/sourcecode-acquire.md">源码获取</a></p>
</td>
</tr>
<tr id="row430016273514"><td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.2.4.1.1 "><p id="p330015271158"><a name="p330015271158"></a><a name="p330015271158"></a>Python3.7+</p>
<tbody><tr id="row45863354112"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p3587173513117"><a name="p3587173513117"></a><a name="p3587173513117"></a>源码</p>
</td>
<td class="cellrowborder" valign="top" width="24.65%" headers="mcps1.2.4.1.2 "><p id="p43003270510"><a name="p43003270510"></a><a name="p43003270510"></a>编译构建工具</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p258713581118"><a name="p258713581118"></a><a name="p258713581118"></a>功能开发</p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p34760459518"><a name="p34760459518"></a><a name="p34760459518"></a>通过互联网获取</p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p16587835171114"><a name="p16587835171114"></a><a name="p16587835171114"></a>参考<a href="../get-code/sourcecode-acquire.md">源码获取</a></p>
</td>
</tr>
<tr id="row1711946154018"><td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.2.4.1.1 "><p id="p15588165684216"><a name="p15588165684216"></a><a name="p15588165684216"></a>gn</p>
<tr id="row020505735919"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p1220513576596"><a name="p1220513576596"></a><a name="p1220513576596"></a>必要的库和工具</p>
</td>
<td class="cellrowborder" valign="top" width="24.65%" headers="mcps1.2.4.1.2 "><p id="p4588135634213"><a name="p4588135634213"></a><a name="p4588135634213"></a>产生ninja编译脚本</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p2206157145919"><a name="p2206157145919"></a><a name="p2206157145919"></a>编译所需的必要工具和库(如打包、镜像制作等)</p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p14131813191712"><a name="p14131813191712"></a><a name="p14131813191712"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p920675719597"><a name="p920675719597"></a><a name="p920675719597"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row16990164213404"><td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.2.4.1.1 "><p id="p1858825613428"><a name="p1858825613428"></a><a name="p1858825613428"></a>ninja</p>
<tr id="row430016273514"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p330015271158"><a name="p330015271158"></a><a name="p330015271158"></a>Python3.7+</p>
</td>
<td class="cellrowborder" valign="top" width="24.65%" headers="mcps1.2.4.1.2 "><p id="p15844174611816"><a name="p15844174611816"></a><a name="p15844174611816"></a>执行ninja编译脚本</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p43003270510"><a name="p43003270510"></a><a name="p43003270510"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p1923373393515"><a name="p1923373393515"></a><a name="p1923373393515"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p34760459518"><a name="p34760459518"></a><a name="p34760459518"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row7531362055"><td class="cellrowborder" rowspan="2" valign="top" width="13.350000000000001%" headers="mcps1.2.4.1.1 "><p id="p1467122152710"><a name="p1467122152710"></a><a name="p1467122152710"></a></p>
<p id="p15217227174016"><a name="p15217227174016"></a><a name="p15217227174016"></a>LLVM</p>
<p id="p689515112108"><a name="p689515112108"></a><a name="p689515112108"></a></p>
<tr id="row7531362055"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p1467122152710"><a name="p1467122152710"></a><a name="p1467122152710"></a>LLVM(仅OpenHarmony_v1.x分支/标签需要)</p>
</td>
<td class="cellrowborder" rowspan="2" valign="top" width="24.65%" headers="mcps1.2.4.1.2 "><p id="p1739432372718"><a name="p1739432372718"></a><a name="p1739432372718"></a></p>
<p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>编译工具链</p>
<p id="p108951116109"><a name="p108951116109"></a><a name="p108951116109"></a></p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p1739432372718"><a name="p1739432372718"></a><a name="p1739432372718"></a>编译工具链</p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p9983172015313"><a name="p9983172015313"></a><a name="p9983172015313"></a>Master及OpenHarmony_v2.x分支/标签,请使用以下10.0.1版本:</p>
<p id="p49091358184"><a name="p49091358184"></a><a name="p49091358184"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p59711534202610"><a name="p59711534202610"></a><a name="p59711534202610"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row78941113109"><td class="cellrowborder" valign="top" headers="mcps1.2.4.1.1 "><p id="p1974322421510"><a name="p1974322421510"></a><a name="p1974322421510"></a>OpenHarmony_v1.x分支/标签,请使用以下9.0.0版本:</p>
<p id="p198321032101412"><a name="p198321032101412"></a><a name="p198321032101412"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar</a></p>
<tr id="row1644079184919"><td class="cellrowborder" valign="top" width="25.779999999999998%" headers="mcps1.2.4.1.1 "><p id="p744115914493"><a name="p744115914493"></a><a name="p744115914493"></a>hb</p>
</td>
</tr>
<tr id="row1644079184919"><td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.2.4.1.1 "><p id="p744115914493"><a name="p744115914493"></a><a name="p744115914493"></a>hb</p>
</td>
<td class="cellrowborder" valign="top" width="24.65%" headers="mcps1.2.4.1.2 "><p id="p1244114913492"><a name="p1244114913492"></a><a name="p1244114913492"></a><span id="text565372520148"><a name="text565372520148"></a><a name="text565372520148"></a>OpenHarmony</span>编译构建命令行工具</p>
<td class="cellrowborder" valign="top" width="30.819999999999997%" headers="mcps1.2.4.1.2 "><p id="p1244114913492"><a name="p1244114913492"></a><a name="p1244114913492"></a><span id="text565372520148"><a name="text565372520148"></a><a name="text565372520148"></a>OpenHarmony</span>编译构建命令行工具</p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p1463918124619"><a name="p1463918124619"></a><a name="p1463918124619"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row27583191444"><td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.2.4.1.1 "><p id="p875851924420"><a name="p875851924420"></a><a name="p875851924420"></a>其他工具</p>
</td>
<td class="cellrowborder" valign="top" width="24.65%" headers="mcps1.2.4.1.2 "><p id="p18758019164415"><a name="p18758019164415"></a><a name="p18758019164415"></a>编译构建中依赖的其他工具(如打包、镜像制作等)</p>
</td>
<td class="cellrowborder" valign="top" width="62%" headers="mcps1.2.4.1.3 "><p id="p14758219194415"><a name="p14758219194415"></a><a name="p14758219194415"></a>通过互联网获取</p>
<td class="cellrowborder" valign="top" width="43.4%" headers="mcps1.2.4.1.3 "><p id="p1463918124619"><a name="p1463918124619"></a><a name="p1463918124619"></a>通过互联网获取</p>
</td>
</tr>
</tbody>
......@@ -115,10 +87,18 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
开发者需要在Linux服务器上下载并解压一套源代码,请参见[源码获取](../get-code/sourcecode-acquire.md)
## 安装和配置Python<a name="section1238412211211"></a>
## 安装必要的库和工具<a name="section108201740181219"></a>
使用如下apt-get命令安装编译所需的必要的库和工具:
```
sudo apt-get install build-essential gcc g++ make zlib* libffi-dev e2fsprogs pkg-config flex bison perl bc openssl libssl-dev libelf-dev libc6-dev-amd64 binutils binutils-dev libdwarf-dev u-boot-tools mtd-utils gcc-arm-linux-gnueabi
```
## 安装Python3<a name="section1238412211211"></a>
1. 打开Linux编译服务器终端。
2. 输入如下命令,查看python版本号,需使用python3.7以上版本。
2. 输入如下命令,查看python版本号
```
python3 --version
......@@ -184,90 +164,20 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
## 安装gn<a name="section29216201423"></a>
1. 打开Linux编译服务器终端。
2. [下载gn工具](https://repo.huaweicloud.com/harmonyos/compiler/gn/1717/linux/gn-linux-x86-1717.tar.gz)
3. 在根目录下创建gn文件夹。
```
mkdir ~/gn
```
4. 解压gn安装包至\~/gn路径下。
```
tar -xvf gn-linux-x86-1717.tar.gz -C ~/gn
```
5. 设置环境变量。
```
vim ~/.bashrc
```
将以下命令拷贝到.bashrc文件的最后一行,保存并退出。
```
export PATH=~/gn:$PATH
```
6. 生效环境变量。
```
source ~/.bashrc
```
## 安装ninja<a name="section8762358731"></a>
1. 打开Linux编译服务器终端。
2. [下载ninja工具](https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar)
3. 解压ninja安装包至\~/ninja路径下。
```
tar -xvf ninja.1.9.0.tar -C ~/
```
4. 设置环境变量。
```
vim ~/.bashrc
```
将以下命令拷贝到.bashrc文件的最后一行,保存并退出。
```
export PATH=~/ninja:$PATH
```
5. 生效环境变量。
```
source ~/.bashrc
```
## 安装LLVM\(仅OpenHarmony\_v1.x分支/标签需要\)<a name="section12202192215415"></a>
## 安装LLVM<a name="section12202192215415"></a>
>![](../public_sys-resources/icon-notice.gif) **须知:**
>如果下载的源码为OpenHarmony\_v1.x分支/标签, 请按下面的步骤安装9.0.0版本的llvm。
>如果下载的源码为Master及OpenHarmony\_v2.x分支/标签,可直接跳过本小节,hb会自动下载最新的llvm。
1. 打开Linux编译服务器终端。
2. [下载LLVM工具](https://repo.huaweicloud.com/harmonyos/compiler/clang/10.0.1-62608/linux/llvm.tar.gz)
>![](../public_sys-resources/icon-note.gif) **说明:**
>针对OpenHarmony\_v1.x分支/标签,使用此链接[下载LLVM工具](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar)。
2. [下载LLVM工具](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-36191/linux/llvm-linux-9.0.0-36191.tar)
3. 解压LLVM安装包至\~/llvm路径下。
```
tar -zxvf llvm.tar.gz -C ~/
```
>![](../public_sys-resources/icon-note.gif) **说明:**
>针对OpenHarmony\_v1.x分支/标签,使用如下命令解压:
>```
>tar -xvf llvm-linux-9.0.0-36191.tar -C ~/
>```
4. 设置环境变量。
```
......@@ -291,7 +201,7 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
### 前提条件<a name="section1083283711515"></a>
请先安装Python 3.7.4及以上版本,请见[安装和配置Python](#section1238412211211)
请先安装Python 3.7.4及以上版本,请见[安装Python3](#section1238412211211)
### 安装方法<a name="section11518484814"></a>
......@@ -347,14 +257,3 @@ python3 -m pip uninstall ohos-build
>![](../public_sys-resources/icon-notice.gif) **须知:**
>如果安装hb的过程中遇到问题,请参见下文[常见问题](quickstart-lite-env-setup-faqs.md)进行解决。
## 安装其他工具<a name="section830511218494"></a>
### 安装方法<a name="section54409586499"></a>
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 gcc-arm-linux-gnueabi
```
# Windows开发环境准备<a name="ZH-CN_TOPIC_0000001128311056"></a>
# Windows开发环境准备<a name="ZH-CN_TOPIC_0000001196067299"></a>
- [获取软件](#zh-cn_topic_0000001058091994_section1483143015558)
- [安装Visual Studio Code](#zh-cn_topic_0000001058091994_section71401018163318)
......@@ -7,7 +7,10 @@
- [安装hpm](#zh-cn_topic_0000001058091994_section173054793610)
- [安装DevEco Device Tool插件](#zh-cn_topic_0000001058091994_section4336315185716)
系统要求:Windows 10 64位系统。
系统要求:
- Windows 10 64位系统。
- 系统的用户名不能含有中文字符。
DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展,安装分为如下几步:
......@@ -34,7 +37,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p12332194816317"><a name="zh-cn_topic_0000001058091994_p12332194816317"></a><a name="zh-cn_topic_0000001058091994_p12332194816317"></a>代码编辑工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p711918919618"><a name="zh-cn_topic_0000001058091994_p711918919618"></a><a name="zh-cn_topic_0000001058091994_p711918919618"></a>V1.53及以上 64位版本。</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p711918919618"><a name="zh-cn_topic_0000001058091994_p711918919618"></a><a name="zh-cn_topic_0000001058091994_p711918919618"></a>V1.53及以上64位版本。</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p2721438193710"><a name="zh-cn_topic_0000001058091994_p2721438193710"></a><a name="zh-cn_topic_0000001058091994_p2721438193710"></a><a href="https://code.visualstudio.com/Download" target="_blank" rel="noopener noreferrer">https://code.visualstudio.com/Download</a></p>
</td>
......@@ -43,16 +46,17 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p547205817316"><a name="zh-cn_topic_0000001058091994_p547205817316"></a><a name="zh-cn_topic_0000001058091994_p547205817316"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>V3.7.4~V3.8.x 64位版本</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>V3.8.9及以上64位版本</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p1599022403"><a name="zh-cn_topic_0000001058091994_p1599022403"></a><a name="zh-cn_topic_0000001058091994_p1599022403"></a>推荐下载:<a href="https://www.python.org/downloads/release/python-388/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/release/python-388/</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p108321457411"><a name="zh-cn_topic_0000001058091994_p108321457411"></a><a name="zh-cn_topic_0000001058091994_p108321457411"></a><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/</a></p>
</td>
</tr>
<tr id="zh-cn_topic_0000001058091994_row117316576562"><td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001058091994_p16405151165717"><a name="zh-cn_topic_0000001058091994_p16405151165717"></a><a name="zh-cn_topic_0000001058091994_p16405151165717"></a>Node.js</p>
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p1773185765616"><a name="zh-cn_topic_0000001058091994_p1773185765616"></a><a name="zh-cn_topic_0000001058091994_p1773185765616"></a>提供npm环境</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p573118572567"><a name="zh-cn_topic_0000001058091994_p573118572567"></a><a name="zh-cn_topic_0000001058091994_p573118572567"></a>v12.0.0及以上 64位版本</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p16304104120181"><a name="zh-cn_topic_0000001058091994_p16304104120181"></a><a name="zh-cn_topic_0000001058091994_p16304104120181"></a>以下版本三选一:</p>
<a name="zh-cn_topic_0000001058091994_ul875854471719"></a><a name="zh-cn_topic_0000001058091994_ul875854471719"></a><ul id="zh-cn_topic_0000001058091994_ul875854471719"><li>V12.22.5及以上64位版本</li><li>V14.17.5及以上64版本</li><li>V16.6.0及以上64位版本</li></ul>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p9200911141112"><a name="zh-cn_topic_0000001058091994_p9200911141112"></a><a name="zh-cn_topic_0000001058091994_p9200911141112"></a><a href="https://nodejs.org/zh-cn/download/" target="_blank" rel="noopener noreferrer">https://nodejs.org/zh-cn/download/</a></p>
</td>
......@@ -61,7 +65,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p1632215161040"><a name="zh-cn_topic_0000001058091994_p1632215161040"></a><a name="zh-cn_topic_0000001058091994_p1632215161040"></a>包管理工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p773185715566"><a name="zh-cn_topic_0000001058091994_p773185715566"></a><a name="zh-cn_topic_0000001058091994_p773185715566"></a>最新版</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p773185715566"><a name="zh-cn_topic_0000001058091994_p773185715566"></a><a name="zh-cn_topic_0000001058091994_p773185715566"></a>V1.3.0及以上</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p14731125745610"><a name="zh-cn_topic_0000001058091994_p14731125745610"></a><a name="zh-cn_topic_0000001058091994_p14731125745610"></a>请参考<a href="#zh-cn_topic_0000001058091994_section173054793610">安装hpm</a></p>
</td>
......@@ -70,9 +74,9 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p1690316506517"><a name="zh-cn_topic_0000001058091994_p1690316506517"></a><a name="zh-cn_topic_0000001058091994_p1690316506517"></a>OpenHarmony源码的编译、烧录、调试插件工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p113171956185715"><a name="zh-cn_topic_0000001058091994_p113171956185715"></a><a name="zh-cn_topic_0000001058091994_p113171956185715"></a>v2.2 Beta1</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p113171956185715"><a name="zh-cn_topic_0000001058091994_p113171956185715"></a><a name="zh-cn_topic_0000001058091994_p113171956185715"></a>V2.2 Beta2</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p3503163074720"><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/cn/ide#download" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide#download</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p3503163074720"><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/cn/ide#download_beta" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide#download_beta</a></p>
<p id="zh-cn_topic_0000001058091994_p23171856135717"><a name="zh-cn_topic_0000001058091994_p23171856135717"></a><a name="zh-cn_topic_0000001058091994_p23171856135717"></a>下载前,请使用华为开发者帐号登录,如未注册,请先<a href="https://developer.huawei.com/consumer/cn/doc/start/registration-and-verification-0000001053628148" target="_blank" rel="noopener noreferrer">注册华为开发者帐号</a></p>
</td>
</tr>
......@@ -86,24 +90,23 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
1. 双击Visual Studio Code软件包进行安装。安装过程中,请勾选“添加到PATH(重启后生效)”。
![](figure/zh-cn_image_0000001174350653.png)
![](figure/installing-visual-studio-code.png)
2. 安装完成后,重启计算机,使Visual Studio Code的环境变量生效。
3. 打开命令行工具,输入**code --version**命令,可以正常显示版本号说明安装成功。
2. 安装完成后,打开命令行工具,输入**code --version**命令,可以正常显示版本号说明安装成功。
## 安装Python<a name="zh-cn_topic_0000001058091994_section16266553175320"></a>
1. 双击Python安装包进行安装,勾选“**Add Python 3.8 to PATH**”,然后点击**Install Now**开始安装。
![](figure/zh-cn_image_0000001128470908.png)
![](figure/installing-python.png)
2. 等待安装完成后,点击**Close**
![](figure/zh-cn_image_0000001128311104.png)
![](figure/setup-was-successful.png)
3. 打开命令行工具,输入python --version,检查安装结果。
![](figure/zh-cn_image_0000001174350655.png)
![](figure/checking-the-installation-result.png)
4. 在命令行工具中,分别执行如下命令设置pip源,用于后续安装DevEco Device Tool过程中下载依赖的组件包。
......@@ -122,9 +125,6 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
1. 点击下载后的软件包进行安装,全部按照默认设置点击**Next**,直至**Finish**。安装过程中,Node.js会自动在系统的path环境变量中配置node.exe的目录路径。
2. 重新打开命令行工具,输入“node -v“命令,能正常查询Node.js的版本号,说明Node.js安装成功。
![](figure/zh-cn_image_0000001128311096.png)
## 安装hpm<a name="zh-cn_topic_0000001058091994_section173054793610"></a>
该方式需先确保**Node.js**安装成功。
......@@ -146,7 +146,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
npm install -g @ohos/hpm-cli
```
![](figure/zh-cn_image_0000001128311100.png)
![](figure/hpm-version.png)
3. 安装完成后,执行如下命令(V为大写字母)检查hpm安装结果。
......@@ -154,12 +154,10 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
hpm -V
```
![](figure/zh-cn_image_0000001174270735.png)
## 安装DevEco Device Tool插件<a name="zh-cn_topic_0000001058091994_section4336315185716"></a>
安装DevEco Device Tool插件,**主机的用户名不能包含中文字符**,否则可能导致运行出现错误
安装DevEco Device Tool插件,**主机的用户名不能包含中文字符**,否则在运行DevEco Device Tool时,DevEco Home界面会一直处于Loading状态,导致不能正常使用
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)
......@@ -167,16 +165,26 @@ DevEco Device Tool正常运行需要依赖于C/C++和CodeLLDB插件,在安装
>安装DevEco Device Tool时,请先关闭Visual Studio Code。
1. 解压DevEco Device Tool插件压缩包,双击安装包程序进行安装。
2. 安装过程中,会自动安装DevEco Device Tool所需的依赖文件(如C/C++和CodeLLDB插件)和执行程序。
2. DevEco Device Tool会检测安装依赖的工具包是否符合要求。如果不符合要求,请按照本章节前面的内容进行安装。
>![](../public_sys-resources/icon-note.gif) **说明:**
>如果已经安装Visual Studio Code,但依然检测不到,可重启电脑解决。
![](figure/installing-the-deveco-device-tool.png)
3. 点击**Install**进行安装。
![](figure/install.png)
4. 等待安装完成后,点击Close关闭安装界面。
![](figure/zh-cn_image_0000001128470902.png)
![](figure/installation-complete.png)
3. 安装完成后,会自动关闭命令行工具窗口。
4. 启动Visual Studio Code,点击左侧的![](figure/zh-cn_image_0000001174350651.png)按钮,检查INSTALLED中,是否已成功安装C/C++、CodeLLDB和DevEco Device Tool。
5. 启动Visual Studio Code,会自动安装DevEco Device Tool依赖的C/C++、CodeLLDB插件。等待安装完成后,点击Visual Studio Code左侧的![](figure/button.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)。
![](figure/zh-cn_image_0000001174270727.png)
![](figure/visual-studio-code.png)
......@@ -12,7 +12,7 @@
点击烧写并选择串口后,出现Error: Opening COMxx: Access denied。
**图 1** 打开串口失败图<a name="fig066333283916"></a>
**图 1** 打开串口失败图<a name="fig1756105874814"></a>
![](figure/打开串口失败图.png "打开串口失败图")
- **可能原因**
......@@ -23,20 +23,18 @@
1. 按图依次选择下拉框,查找带有serial-xx的终端
**图 2** 查找是否存在占用串口的终端<a name="fig165994164420"></a>
**图 2** 查找是否存在占用串口的终端<a name="fig723433664916"></a>
![](figure/查找是否存在占用串口的终端.png "查找是否存在占用串口的终端")
2. 点击标号中的垃圾桶图标,关闭串口。
**图 3** 关闭串口终端<a name="fig7911282453"></a>
**图 3** 关闭串口终端<a name="fig197211713185012"></a>
![](figure/关闭串口终端.png "关闭串口终端")
3. 重新点击烧写,选择串口并开始烧写程序
**图 4** 重新启动烧写任务<a name="fig1138624316485"></a>
![](figure/changjian1.png)
**图 4** 重新启动烧写任务<a name="fig2196042514"></a>
![](figure/重新启动烧写任务.png "重新启动烧写任务")
## Windows电脑与单板网络连接失败<a name="section195391036568"></a>
......@@ -45,7 +43,7 @@
点击烧写并选择串口后,无法获取文件。
**图 5** 网络不通,单板无法获取文件图<a name="fig5218920223"></a>
**图 5** 网络不通,单板无法获取文件图<a name="fig135261439195819"></a>
![](figure/网络不通-单板无法获取文件图.png "网络不通-单板无法获取文件图")
- **可能原因**
......@@ -59,22 +57,22 @@
1. 检查网线是否连接。
2. 点击Windows防火墙。
**图 6** 网络防火墙设置图<a name="fig62141417794"></a>
**图 6** 网络防火墙设置图<a name="fig168416458311"></a>
![](figure/网络防火墙设置图.png "网络防火墙设置图")
3. 点击“允许应用通过防火墙”。
**图 7** 防火墙和网络保护界面图<a name="fig20703151111116"></a>
**图 7** 防火墙和网络保护界面图<a name="fig19866154513414"></a>
![](figure/防火墙和网络保护界面图.png "防火墙和网络保护界面图")
4. 查找Visual Studio Code应用。
**图 8** 查找Visual Studio Code应用图<a name="fig462316612165"></a>
**图 8** 查找Visual Studio Code应用图<a name="fig9213244657"></a>
![](figure/查找Visual-Studio-Code应用图.png "查找Visual-Studio-Code应用图")
5. 勾选Visual Studio Code的专用和公用网络的访问权限。
**图 9** 允许Visual Studio Code应用访问网络<a name="fig132725269184"></a>
**图 9** 允许Visual Studio Code应用访问网络<a name="fig019395421210"></a>
![](figure/允许Visual-Studio-Code应用访问网络.png "允许Visual-Studio-Code应用访问网络")
......@@ -97,7 +95,7 @@
- **现象描述**
![](figure/zh-cn_image_0000001174270715.png)
![](figure/Symptom.png)
- **可能原因1**
......@@ -110,7 +108,7 @@
- **可能原因2**
![](figure/zh-cn_image_0000001128470880.png)
![](figure/reason-for-not-finding-python.png)
- **解决办法**
......@@ -125,7 +123,7 @@
例:
![](figure/zh-cn_image_0000001174270713.png)
![](figure/solution-6.png)
## 串口无回显<a name="section14871149155911"></a>
......
......@@ -432,10 +432,8 @@
>![](../public_sys-resources/icon-notice.gif) **须知:**
>若无法连接串口,请参考[常见问题](quickstart-lite-steps-hi3516-faqs.md#section14871149155911)进行排查。
**图 1** 连接串口图<a name="zh-cn_topic_0000001151888681_fig056645018495"></a>
![](figure/chuankou1.png)
**图 1** 连接串口图<a name="fig124315964718"></a>
![](figure/连接串口图-4.png "连接串口图-4")
1. 单击**Monitor**打开串口。
2. 连续输入回车直到串口显示"hisilicon"。
......@@ -484,10 +482,8 @@
3. 输入**“reset”**指令并回车,重启单板,启动成功如下图,输入回车串口显示OHOS字样。
**图 2** 系统启动图<a name="zh-cn_topic_0000001151888681_fig10181006376"></a>
![](figure/qi1.png)
**图 2** 系统启动图<a name="fig14618415485"></a>
![](figure/系统启动图-5.png "系统启动图-5")
4. 根目录下,在命令行输入指令“**./bin/hello\_uart**”执行写入的demo程序,显示成功结果如下所示。
......
......@@ -3,6 +3,8 @@
- [新建应用程序](#section204672145202)
- [编译](#section1077671315253)
- [烧录](#section1347011412201)
- [使用网口烧录](#section1935410617363)
- [镜像运行](#section24721014162010)
- [执行应用程序](#section5276734182615)
......@@ -138,7 +140,7 @@ hb set(设置编译路径)
hb build -f(执行编译)
```
**图 1** 设置图例<a name="fig1211318064712"></a>
**图 1** 设置图例<a name="fig1458988766"></a>
![](figure/设置图例.png "设置图例")
结果文件生成在out/hispark\_taurus/ipcamera\_hispark\_taurus目录下。
......@@ -150,49 +152,53 @@ hb build -f(执行编译)
Hi3516开发板的代码烧录支持USB烧录、网口烧录和串口烧录三种方式。此处仅以网口烧录为例进行说明。
1. 请连接好电脑和待烧录开发板,以Hi3516DV300为例,需要同时连接串口、网口和电源,具体可参考[Hi3516开发板介绍](oem_minitinier_des_3516.md)
### 使用网口烧录<a name="section1935410617363"></a>
Hi3516DV300开发板使用网口烧录方式,支持Windows和Linux系统。
1. 请连接好电脑和待烧录开发板,需要同时连接串口、网口和电源,具体可参考[Hi3516DV300开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3516-0000001152041033)
2. <a name="zh-cn_topic_0000001056443961_li142386399535"></a>打开电脑的设备管理器,查看并记录对应的串口号。
>![](../public_sys-resources/icon-note.gif) **说明:**
>如果对应的串口异常,请根据[Hi3516/Hi3518系列开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。
>如果对应的串口异常,请根据[Hi3516DV300/Hi3518EV300开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。
![](figure/zh-cn_image_0000001174350647.png)
![](figure/record-the-serial-port-number-1.png)
3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。
![](figure/2021-01-27_170334.png)
![](figure/settings.png)
4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3516系列开发板进行适配,无需单独修改。
4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3516DV300开发板进行适配,无需单独修改。
5. 在“hi3516dv300”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。
- upload\_port:选择步骤[2](#zh-cn_topic_0000001056443961_li142386399535)中查询的串口号。
- upload\_protocol:选择烧录协议,固定选择“hiburn-net”。
- upload\_partitions:选择待烧录的文件,默认情况下会同时烧录fastboot、kernel、rootfs和userfs。
![](figure/zh-cn_image_0000001128470904.png)
![](figure/hi3516-upload-options.png)
6. <a name="zh-cn_topic_0000001056443961_li1558813168234"></a>检查和设置连接开发板后的网络适配器的IP地址信息,设置方法请参考[设置Hi3516网口烧录的IP地址信息](https://device.harmonyos.com/cn/docs/ide/user-guides/set_ipaddress-0000001141825075)
6. 检查和设置连接开发板后的网络适配器的IP地址信息,设置方法请参考[设置Hi3516DV300网口烧录的IP地址信息](https://device.harmonyos.com/cn/docs/ide/user-guides/set_ipaddress-0000001141825075)
7. 设置网口烧录的IP地址信息,设置如下选项:
- upload\_net\_server\_ip:选择[6](#zh-cn_topic_0000001056443961_li1558813168234)中设置的IP地址信息。例如192.168.1.2
- 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
![](figure/zh-cn_image_0000001174270733.png)
![](figure/ip-address-information.png)
8. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。
9. 打开工程文件,点击![](figure/2021-01-27_170334-2.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击hi3516dv300下的**Upload**按钮,启动烧录。
9. 打开工程文件,点击![](figure/deveco-device-tool-logo.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击hi3516dv300下的**Upload**按钮,启动烧录。
![](figure/zh-cn_image_0000001174270729.png)
![](figure/start-burning.png)
10. 启动烧录后,显示如下提示信息时,请重启开发板(下电再上电)。
![](figure/zh-cn_image_0000001128470906.png)
![](figure/restart-the-development-board-2.png)
11. 重新上电后,启动烧录,界面提示如下信息时,表示烧录成功。
![](figure/zh-cn_image_0000001128311098.png)
![](figure/burning-succeeded-3.png)
## 镜像运行<a name="section24721014162010"></a>
......@@ -202,10 +208,8 @@ Hi3516开发板的代码烧录支持USB烧录、网口烧录和串口烧录三
>![](../public_sys-resources/icon-notice.gif) **须知:**
>若无法连接串口,请参考[常见问题](quickstart-lite-steps-hi3516-faqs.md)进行排查。
**图 2** 连接串口图<a name="fig056645018495"></a>
![](figure/chuankou1.png)
**图 2** 连接串口图<a name="fig139171488431"></a>
![](figure/连接串口图.png "连接串口图")
1. 单击**Monitor**打开串口。
2. 连续输入回车直到串口显示"hisilicon"。
......@@ -254,16 +258,14 @@ Hi3516开发板的代码烧录支持USB烧录、网口烧录和串口烧录三
3. <a name="ld26f18828aa44c36bfa36be150e60e49"></a>输入**“reset”**指令并回车,重启单板,启动成功如下图,输入回车串口显示OHOS字样。
**图 3** 系统启动图<a name="fig10181006376"></a>
![](figure/qi1.png)
**图 3** 系统启动图<a name="fig784813366444"></a>
![](figure/系统启动图.png "系统启动图")
## 执行应用程序<a name="section5276734182615"></a>
根目录下,在命令行输入指令“**./bin/helloworld**”执行写入的demo程序,显示成功结果如下图所示。
**图 4** 启动并成功执行应用程序图<a name="fig1341618411997"></a>
**图 4** 启动并成功执行应用程序图<a name="fig149821431194515"></a>
![](figure/启动并成功执行应用程序图.png "启动并成功执行应用程序图")
......@@ -19,10 +19,8 @@
各硬件连接关系如下图所示。
**图 1** 硬件连线图<a name="fig19527104710591"></a>
![](figure/矩形备份-292.png)
**图 1** 硬件连线图<a name="fig38451744110"></a>
![](figure/硬件连线图-0.png "硬件连线图-0")
### 软件要求<a name="section965634210501"></a>
......@@ -76,7 +74,7 @@ Hi3516开发板对Linux服务器通用环境配置需要的工具及其获取途
## 安装Linux服务器工具<a name="section182916865219"></a>
>![](../public_sys-resources/icon-notice.gif) **须知:**
>- 如果通过“HPM组件方式”或“HPM包管理器命令行工具方式”获取源码,不需要安装LLVM、hc-gen编译工具。
>- 如果通过“HPM组件方式”或“HPM包管理器命令行工具方式”获取源码,不需要安装hc-gen编译工具。
>- (推荐)如果通过“镜像站点方式”或“代码仓库方式”获取源码,需要安装hc-gen编译工具。安装hc-gen编译工具时,请确保编译工具的环境变量路径唯一。
### 将Linux shell改为bash<a name="section1715027152617"></a>
......
......@@ -13,7 +13,7 @@
点击烧写并选择串口后,出现Error: Opening COMxx: Access denied。
**图 1** 打开串口失败图<a name="zh-cn_topic_0000001053466255_fig066333283916"></a>
![](figure/打开串口失败图-7.png "打开串口失败图-7")
![](figure/打开串口失败图-15.png "打开串口失败图-15")
- **可能原因**
......@@ -24,19 +24,17 @@
1. 按图依次选择下拉框,查找带有serial-xx的终端
**图 2** 查找是否存在占用串口的终端<a name="zh-cn_topic_0000001053466255_fig165994164420"></a>
![](figure/查找是否存在占用串口的终端-8.png "查找是否存在占用串口的终端-8")
![](figure/查找是否存在占用串口的终端-16.png "查找是否存在占用串口的终端-16")
2. 点击标号中的垃圾桶图标,关闭串口。
**图 3** 关闭串口终端<a name="zh-cn_topic_0000001053466255_fig7911282453"></a>
![](figure/关闭串口终端-9.png "关闭串口终端-9")
![](figure/关闭串口终端-17.png "关闭串口终端-17")
3. 重新点击烧写,选择串口并开始烧写程序
**图 4** 重新启动烧写任务<a name="zh-cn_topic_0000001053466255_fig1138624316485"></a>
![](figure/changjian1-10.png)
**图 4** 重新启动烧写任务<a name="fig87139519227"></a>
![](figure/重新启动烧写任务-18.png "重新启动烧写任务-18")
## Windows电脑与单板网络连接失败<a name="section8512971816"></a>
......@@ -46,7 +44,7 @@
点击烧写并选择串口后,无法获取文件。
**图 5** 网络不通,单板无法获取文件图<a name="zh-cn_topic_0000001053466255_fig5218920223"></a>
![](figure/网络不通-单板无法获取文件图-11.png "网络不通-单板无法获取文件图-11")
![](figure/网络不通-单板无法获取文件图-19.png "网络不通-单板无法获取文件图-19")
- **可能原因**
......@@ -59,23 +57,23 @@
1. 检查网线是否连接。
2. 点击Windows防火墙。
**图 6** 网络防火墙设置图<a name="zh-cn_topic_0000001053466255_fig62141417794"></a>
![](figure/网络防火墙设置图-12.png "网络防火墙设置图-12")
**图 6** 网络防火墙设置图<a name="fig954464811215"></a>
![](figure/网络防火墙设置图-20.png "网络防火墙设置图-20")
3. 点击“允许应用通过防火墙”。
**图 7** 防火墙和网络保护界面图<a name="zh-cn_topic_0000001053466255_fig20703151111116"></a>
![](figure/防火墙和网络保护界面图-13.png "防火墙和网络保护界面图-13")
**图 7** 防火墙和网络保护界面图<a name="fig158731526101312"></a>
![](figure/防火墙和网络保护界面图-21.png "防火墙和网络保护界面图-21")
4. 查找Visual Studio Code应用。
**图 8** 查找Visual Studio Code应用图<a name="zh-cn_topic_0000001053466255_fig462316612165"></a>
![](figure/查找Visual-Studio-Code应用图-14.png "查找Visual-Studio-Code应用图-14")
**图 8** 查找Visual Studio Code应用图<a name="fig96572537139"></a>
![](figure/查找Visual-Studio-Code应用图-22.png "查找Visual-Studio-Code应用图-22")
5. 勾选Visual Studio Code的专用和公用网络的访问权限。
**图 9** 允许Visual Studio Code应用访问网络<a name="zh-cn_topic_0000001053466255_fig132725269184"></a>
![](figure/允许Visual-Studio-Code应用访问网络-15.png "允许Visual-Studio-Code应用访问网络-15")
**图 9** 允许Visual Studio Code应用访问网络<a name="fig18201217161411"></a>
![](figure/允许Visual-Studio-Code应用访问网络-23.png "允许Visual-Studio-Code应用访问网络-23")
## 烧写失败<a name="section1767804111198"></a>
......@@ -97,7 +95,7 @@
- **现象描述**
![](figure/zh-cn_image_0000001174270743.png)
![](figure/error.png)
- **可能原因1**
......@@ -110,7 +108,7 @@
- **可能原因2**
![](figure/zh-cn_image_0000001174270739.png)
![](figure/error2.png)
- **解决办法**
......@@ -125,7 +123,7 @@
例:
![](figure/zh-cn_image_0000001174350661.png)
![](figure/solution-24.png)
## 串口无回显<a name="zh-cn_topic_0000001053466255_section14871149155911"></a>
......@@ -169,6 +167,6 @@
3. 烧写完成后,登录串口如下图所示。
![](figure/zh-cn_image_0000001174350659.png)
![](figure/login-serial-port.png)
......@@ -139,57 +139,66 @@ hb build -f(执行编译)
结果文件生成在out/hispark\_aries/ipcamera\_hispark\_aries目录下。
**图 1** 设置图例<a name="fig4305770509"></a>
![](figure/设置图例-4.png "设置图例-4")
**图 1** 设置图例<a name="fig1766174411418"></a>
![](figure/设置图例-8.png "设置图例-8")
>![](../public_sys-resources/icon-notice.gif) **须知:**
>Hi3518EV300单板的U-boot文件获取路径:device/hisilicon/hispark\_aries/sdk\_liteos/uboot/out/boot/u-boot-hi3518ev300.bin
## 烧录<a name="section7609155824819"></a>
Hi3518开发板的代码烧录仅支持USB烧录方式
烧录是指将编译后的程序文件下载到芯片开发板上的动作,为后续的程序调试提供基础。DevEco Device Tool提供一键烧录功能,操作简单,能快捷、高效的完成程序烧录,提升烧录的效率
1. 请连接好电脑和待烧录开发板,以Hi3518EV300为例,需要同时连接串口和USB口,具体可参考[Hi3518开发板介绍](oem_minitinier_des_3518.md)
Hi3518EV300开发板的代码烧录支持USB烧录和串口烧录两种方式,其中:
- **Windows系统:支持USB烧录和串口烧录。**
- **Linux系统:支持串口烧录,如果采用的是Linux+Windows双系统,也支持USB烧录。**
同一种烧录方式(如串口烧录),在Windows和Linux环境下的烧录操作完全一致,区别仅在于DevEco Device Tool环境搭建不同。
此处仅以USB烧录为例进行说明。
1. 请连接好电脑和待烧录开发板,需要同时连接串口和USB口,具体可参考[Hi3518EV300开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3518-0000001105201138)
2. <a name="zh-cn_topic_0000001057313128_li46411811196"></a>打开电脑的设备管理器,查看并记录对应的串口号。
>![](../public_sys-resources/icon-note.gif) **说明:**
>如果对应的串口异常,请根据[Hi3516/Hi3518系列开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。
>如果对应的串口异常,请根据[Hi3516DV300/Hi3518EV300开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。
![](figure/zh-cn_image_0000001128470900.png)
![](figure/record-the-serial-port-number-9.png)
3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。
![](figure/zh-cn_image_0000001174350649.png)
![](figure/setting-10.png)
4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3518系列开发板进行适配,无需单独修改。
4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3518EV300开发板进行适配,无需单独修改。
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。
![](figure/zh-cn_image_0000001128311090.png)
![](figure/upload-options.png)
6. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。
7. 打开工程文件,点击![](figure/2021-01-27_170334-5.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击hi3518ev300\_fastboot下的**Erase**按钮,擦除U-Boot。
7. 打开工程文件,点击![](figure/deveco-device-toollogo.png)图标,打开DevEco Device Tool界面,在“PROJECT TASKS”中,点击hi3518ev300\_fastboot下的**Erase**按钮,擦除U-Boot。
![](figure/zh-cn_image_0000001174270731.png)
![](figure/erase-u-Boot.png)
8. 执行**Erase**擦除操作后,显示如下提示信息时,请重启开发板(下电再上电)。
![](figure/zh-cn_image_0000001128311092.png)
![](figure/restart-the-development-board-11.png)
9. 重新上电后,显示如下信息时,表示擦除U-Boot成功。
![](figure/zh-cn_image_0000001128311094.png)
![](figure/u-boot-erased-successfully.png)
10. 擦除完成后,点击hi3518ev300下的**Upload**按钮,启动烧录。
![](figure/zh-cn_image_0000001174350641.png)
![](figure/upload-12.png)
11. 启动烧录后,界面提示如下信息时,表示烧录成功。
![](figure/zh-cn_image_0000001174350643.png)
![](figure/burning-succeeded-13.png)
## 镜像运行<a name="section17612105814480"></a>
......@@ -199,10 +208,8 @@ Hi3518开发板的代码烧录仅支持USB烧录方式。
>![](../public_sys-resources/icon-notice.gif) **须知:**
>若无法连接串口,请参考[常见问题](quickstart-lite-steps-hi3518-faqs.md#zh-cn_topic_0000001053466255_section14871149155911)进行排查。
**图 2** 连接串口图<a name="fig056645018495"></a>
![](figure/chuankou1-6.png)
**图 2** 连接串口图<a name="fig049019841616"></a>
![](figure/连接串口图-14.png "连接串口图-14")
1. 单击**Monitor**打开串口。
2. 连续输入回车直到串口显示"hisilicon"。
......@@ -252,7 +259,7 @@ Hi3518开发板的代码烧录仅支持USB烧录方式。
3. <a name="li6442853122312"></a>若启动时显示**"hisilicon \#**字样,请输入**“reset”**指令,等待系统自启动进入系统,系统启动后,显示**“OHOS”**字样,输入**”./bin/helloworld”**并回车,显示成功结果如下图所示。
**图 3** 启动成功并执行应用程序图<a name="fig265662981319"></a>
**图 3** 启动成功并执行应用程序图<a name="fig2103121215172"></a>
![](figure/启动成功并执行应用程序图.png "启动成功并执行应用程序图")
......
......@@ -19,9 +19,9 @@
各硬件连接关系如下图所示。
**图 1** 硬件连线图<a name="fig19272182991417"></a>
![](figure/硬件连线图-7.png "硬件连线图-7")
**图 1** 硬件连线图<a name="fig8211468392"></a>
![](figure/硬件连线图-3.png "硬件连线图-3")
### 软件要求<a name="section17315193935817"></a>
......
# WLAN联网(编译、烧录)<a name="ZH-CN_TOPIC_0000001174350611"></a>
- [编译](#section191121332125319)
- [镜像烧录](#section19458165166)
- [镜像烧录](#section3288165814218)
- [WLAN模组联网](#section194671619167)
本示例将演示如何通过AT命令完成WLAN模组与网关联网。
......@@ -14,38 +14,28 @@
1. 打开DevEco Device Tool工具,点击“View \> Terminal”,进入终端界面。
**图 1** IDE终端工具打开方法<a name="fig1975813338510"></a>
![](figure/1.png)
**图 1** IDE终端工具打开方法<a name="fig755583241511"></a>
![](figure/IDE终端工具打开方法.png "IDE终端工具打开方法")
在终端界面使用ssh命令连接linux服务器,如“ssh user@ipaddr”。
**图 2** 终端界面示意图<a name="fig91165301546"></a>
![](figure/2.png)
**图 2** 终端界面示意图<a name="fig14407256101510"></a>
![](figure/终端界面示意图.png "终端界面示意图")
2. 进入代码根路径,并在终端窗口,执行脚本命令“hb set”、“.”,选择需要编译的版本“wifiiot\_hispark\_pegasus”。
**图 3** 在终端界面选择目标构建版本示意图<a name="fig17727115215612"></a>
![](figure/3.png)
**图 3** 在终端界面选择目标构建版本示意图<a name="fig191035701814"></a>
![](figure/在终端界面选择目标构建版本示意图.png "在终端界面选择目标构建版本示意图")
3. 执行“hb build”启动版本构建。
**图 4** 在终端界面执行编译命令示意图<a name="fig5493164414573"></a>
![](figure/4.png)
**图 4** 在终端界面执行编译命令示意图<a name="fig10635942111916"></a>
![](figure/在终端界面执行编译命令示意图.png "在终端界面执行编译命令示意图")
4. 编译结束后,如果出现“wifiiot\_hispark\_pegasus build success”字样,则证明构建成功,如下图所示。
**图 5** 编译成功示意图<a name="fig1262101218463"></a>
![](figure/5.png)
**图 5** 编译成功示意图<a name="fig195291328182015"></a>
![](figure/编译成功示意图.png "编译成功示意图")
5. 构建成功后,会在./out/wifiiot/路径中生成以下文件,使用如下命令可以查看,至此编译构建流程结束。
......@@ -53,49 +43,54 @@
ls -l out/hispark_pegasus/wifiiot_hispark_pegasus/
```
**图 6** 编译文件存放目录示意图<a name="fig38521346164618"></a>
**图 6** 编译文件存放目录示意图<a name="fig112257131214"></a>
![](figure/编译文件存放目录示意图.png "编译文件存放目录示意图")
## 镜像烧录<a name="section3288165814218"></a>
![](figure/3-0.png)
烧录是指将编译后的程序文件下载到芯片开发板上的动作,为后续的程序调试提供基础。DevEco Device Tool提供一键烧录功能,操作简单,能快捷、高效的完成程序烧录,提升烧录的效率。
**Hi3861V100开发板支持串口烧录方式,其中Windows系统串口烧录协议包括burn-serial和hiburn-serial,Linux系统串口烧录协议为hiburn-serial。**
## 镜像烧录<a name="section19458165166"></a>
>![](../public_sys-resources/icon-note.gif) **说明:**
>Windows下的两种烧录协议**burn-serial**和**hiburn-serial**,在操作上没有区别,**burn-serial**协议主要是为了兼容历史版本工程。
Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,工具的基本使用请参考[DevEco Device Tool使用指南](https://device.harmonyos.com/cn/docs/ide/user-guides/service_introduction-0000001050166905),烧录过程包含如下步骤
Hi3861V100在Windows和Linux环境下的烧录操作完全一致,区别仅在于DevEco Device Tool环境搭建不同
1. 请连接好电脑和待烧录开发板,需要连接USB口,具体可参考[Hi3861开发板介绍](oem_minitinier_des_3861.md)
1. 请连接好电脑和待烧录开发板,需要连接USB口,具体可参考[Hi3861V100开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3861-0000001105041324)
2. <a name="zh-cn_topic_0000001056563976_li848662117291"></a>打开电脑的设备管理器,查看并记录对应的串口号。
>![](../public_sys-resources/icon-note.gif) **说明:**
>如果对应的串口异常,请根据[Hi3861系列开发板串口驱动安装](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3861-drivers-0000001058153433)安装USB转串口的驱动程序。
>如果对应的串口异常,请根据[Hi3861V100开发板串口驱动安装](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3861-drivers-0000001058153433)安装USB转串口的驱动程序。
![](figure/zh-cn_image_0000001128311118.png)
![](figure/record-the-serial-port-number.png)
3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。
![](figure/zh-cn_image_0000001128311116.png)
![](figure/setting.png)
4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3861系列开发板进行适配,无需单独修改。
4. 在“Partition Configuration”页签,设置待烧录文件信息,默认情况下,DevEco Device Tool已针对Hi3861V100开发板进行适配,无需单独修改。
5. 在“hi3861”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。
- upload\_port:选择步骤[2](#zh-cn_topic_0000001056563976_li848662117291)中查询的串口号。
- upload\_protocol:选择烧录协议,固定选择“burn-serial”。
- upload\_protocol:选择烧录协议,Windows系统可以选择“burn-serial”或“hiburn-serial”,Linux系统只能选择“hiburn-serial”。
- upload\_partitions:选择待烧录的文件,默认选择hi3861\_app。
![](figure/zh-cn_image_0000001128470922.png)
![](figure/options.png)
6. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。
7. 打开工程文件,在DevEco Device Tool界面的“PROJECT TASKS”中,点击hi3861下的**Upload**按钮,启动烧录。
![](figure/zh-cn_image_0000001174270749.png)
![](figure/upload.png)
8. 启动烧录后,显示如下提示信息时,请按开发板上的RST按钮重启开发板。
![](figure/zh-cn_image_0000001174270751.png)
![](figure/restart-the-development-board.png)
9. 重新上电后,启动烧录,界面提示如下信息时,表示烧录成功。
![](figure/zh-cn_image_0000001174350669.png)
![](figure/burning-succeeded.png)
## WLAN模组联网<a name="section194671619167"></a>
......@@ -104,17 +99,13 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,
1. 保持Windows工作台和WLAN模组的连接状态,在DevEco工具最下方,点击“DevEco:Serial Monitor”按钮。
**图 7** 打开DevEco串口终端示意图<a name="fig12489182991119"></a>
![](figure/5-1.png)
**图 7** 打开DevEco串口终端示意图<a name="fig464411253297"></a>
![](figure/打开DevEco串口终端示意图.png "打开DevEco串口终端示意图")
2. 复位WLAN模组,终端界面显示“ready to OS start”,则启动成功。
**图 8** WLAN复位成功示意图<a name="fig496084516332"></a>
![](figure/6.png)
**图 8** WLAN复位成功示意图<a name="fig3327108143016"></a>
![](figure/WLAN复位成功示意图.png "WLAN复位成功示意图")
3. 在DevEco的串口终端中,依次执行如下AT命令,启动STA模式,连接指定AP热点,并开启DHCP功能。
......@@ -134,9 +125,7 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,
AT+PING=X.X.X.X # 检查模组与网关的联通性,其中X.X.X.X需替换为实际的网关地址
```
**图 9** WLAN模组联网成功示意图<a name="fig1166371318339"></a>
![](figure/截图.png)
**图 9** WLAN模组联网成功示意图<a name="fig7672858203010"></a>
![](figure/WLAN模组联网成功示意图.png "WLAN模组联网成功示意图")
......@@ -73,7 +73,7 @@
方法2:如果软件源中没有该软件,请从“www.zlib.net”下载版本代码,并离线安装。
![](figure/10.png)
![](figure/download-zlib.png)
完成下载后,通过以下命令安装:
......@@ -134,7 +134,7 @@
通过网页[https://pypi.org/project/pycrypto/\#files](https://pypi.org/project/pycrypto/#files),下载源码。
![](figure/zh-cn_image_0000001128470864.png)
![](figure/Download-the-source-code.png)
将源码放置在Linux服务器中,解压,并安装“python3 setup.py install”。
......@@ -165,7 +165,7 @@
通过网页[https://pypi.org/project/ecdsa/\#files](https://pypi.org/project/ecdsa/#files),下载安装包。
![](figure/zh-cn_image_0000001128311072.png)
![](figure/download-ecdsa.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),下载安装包。
![](figure/zh-cn_image_0000001174270699.png)
![](figure/download-six.png)
将源码放置在Linux服务器中,并安装“pip3 install six-1.14.0-py2.py3-none-any.whl”。
......@@ -253,7 +253,7 @@
- **可能原因2**
![](figure/zh-cn_image_0000001128311070.png)
![](figure/reason-2.png)
- **解决办法**
......@@ -268,7 +268,7 @@
例:
![](figure/zh-cn_image_0000001174350623.png)
![](figure/solution.png)
## 安装 kconfiglib时,遇到lsb\_release错误<a name="section691681635814"></a>
......
......@@ -138,7 +138,7 @@ Call Stack 6 -- 3f5e24 addr:f78fc
3. 根据以上调用栈信息,可以定位WadRecvCB函数中出现了异常。
![](figure/zh-cn_image_0000001134641222.png)
![](figure/WadRecvCB-function.png)
4. 完成代码排查及修改。
......
......@@ -23,7 +23,7 @@
各硬件连接关系如下图所示。
**图 1** 硬件连线图<a name="fig12122108211"></a>
**图 1** 硬件连线图<a name="fig1922334410211"></a>
![](figure/硬件连线图.png "硬件连线图")
### 软件要求<a name="section727451210318"></a>
......@@ -38,9 +38,9 @@ Hi3861开发板需要的工具如下表所示。
<a name="table6299192712513"></a>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="17.54%" id="mcps1.2.5.1.1"><p id="p162491657102110"><a name="p162491657102110"></a><a name="p162491657102110"></a>平台类型</p>
</th>
<th class="cellrowborder" valign="top" width="23.62%" id="mcps1.2.5.1.2"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>开发工具</p>
<th class="cellrowborder" valign="top" width="23.59%" id="mcps1.2.5.1.2"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>开发工具</p>
</th>
<th class="cellrowborder" valign="top" width="22.55%" id="mcps1.2.5.1.3"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>用途</p>
<th class="cellrowborder" valign="top" width="22.58%" id="mcps1.2.5.1.3"><p id="p429918274517"><a name="p429918274517"></a><a name="p429918274517"></a>用途</p>
</th>
<th class="cellrowborder" valign="top" width="36.29%" id="mcps1.2.5.1.4"><p id="p12997271757"><a name="p12997271757"></a><a name="p12997271757"></a>获取途径</p>
</th>
......@@ -48,45 +48,45 @@ Hi3861开发板需要的工具如下表所示。
</thead>
<tbody><tr id="row935218593572"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p105554418586"><a name="p105554418586"></a><a name="p105554418586"></a>Linux服务器</p>
</td>
<td class="cellrowborder" valign="top" width="23.62%" headers="mcps1.2.5.1.2 "><p id="p45551740589"><a name="p45551740589"></a><a name="p45551740589"></a>编译基础软件包(仅ubuntu 20+需要)</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p45551740589"><a name="p45551740589"></a><a name="p45551740589"></a>编译基础软件包(仅ubuntu 20+需要)</p>
</td>
<td class="cellrowborder" valign="top" width="22.55%" headers="mcps1.2.5.1.3 "><p id="p655594115814"><a name="p655594115814"></a><a name="p655594115814"></a>编译依赖的基础软件包</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p655594115814"><a name="p655594115814"></a><a name="p655594115814"></a>编译依赖的基础软件包</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p165558415589"><a name="p165558415589"></a><a name="p165558415589"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row1397335913612"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p3711468218"><a name="p3711468218"></a><a name="p3711468218"></a>Linux服务器</p>
</td>
<td class="cellrowborder" valign="top" width="23.62%" headers="mcps1.2.5.1.2 "><p id="p097355911620"><a name="p097355911620"></a><a name="p097355911620"></a>SCons3.0.4+</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p097355911620"><a name="p097355911620"></a><a name="p097355911620"></a>SCons3.0.4+</p>
</td>
<td class="cellrowborder" valign="top" width="22.55%" headers="mcps1.2.5.1.3 "><p id="p1973195917619"><a name="p1973195917619"></a><a name="p1973195917619"></a>编译构建工具</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p1973195917619"><a name="p1973195917619"></a><a name="p1973195917619"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p1722663441514"><a name="p1722663441514"></a><a name="p1722663441514"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row1968013216717"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p2681632977"><a name="p2681632977"></a><a name="p2681632977"></a>Linux服务器</p>
</td>
<td class="cellrowborder" valign="top" width="23.62%" headers="mcps1.2.5.1.2 "><p id="p1991501391312"><a name="p1991501391312"></a><a name="p1991501391312"></a>python模块:setuptools、kconfiglib、pycryptodome、six、ecdsa</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p1991501391312"><a name="p1991501391312"></a><a name="p1991501391312"></a>python模块:setuptools、kconfiglib、pycryptodome、six、ecdsa</p>
</td>
<td class="cellrowborder" valign="top" width="22.55%" headers="mcps1.2.5.1.3 "><p id="p968120325715"><a name="p968120325715"></a><a name="p968120325715"></a>编译构建工具</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p968120325715"><a name="p968120325715"></a><a name="p968120325715"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p268116326711"><a name="p268116326711"></a><a name="p268116326711"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row020914491313"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p20209749103116"><a name="p20209749103116"></a><a name="p20209749103116"></a>Linux服务器</p>
</td>
<td class="cellrowborder" valign="top" width="23.62%" headers="mcps1.2.5.1.2 "><p id="p7209104910317"><a name="p7209104910317"></a><a name="p7209104910317"></a>gcc riscv32</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p7209104910317"><a name="p7209104910317"></a><a name="p7209104910317"></a>gcc riscv32</p>
</td>
<td class="cellrowborder" valign="top" width="22.55%" headers="mcps1.2.5.1.3 "><p id="p102093498311"><a name="p102093498311"></a><a name="p102093498311"></a>编译构建工具</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p102093498311"><a name="p102093498311"></a><a name="p102093498311"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p321054953116"><a name="p321054953116"></a><a name="p321054953116"></a>通过互联网获取</p>
</td>
</tr>
<tr id="row1596703610215"><td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.2.5.1.1 "><p id="p071946112113"><a name="p071946112113"></a><a name="p071946112113"></a>Windows工作台</p>
</td>
<td class="cellrowborder" valign="top" width="23.62%" headers="mcps1.2.5.1.2 "><p id="p1044974291416"><a name="p1044974291416"></a><a name="p1044974291416"></a>CH341SER.EXE</p>
<td class="cellrowborder" valign="top" width="23.59%" headers="mcps1.2.5.1.2 "><p id="p1044974291416"><a name="p1044974291416"></a><a name="p1044974291416"></a>CH341SER.EXE</p>
</td>
<td class="cellrowborder" valign="top" width="22.55%" headers="mcps1.2.5.1.3 "><p id="p94491342131413"><a name="p94491342131413"></a><a name="p94491342131413"></a>USB转串口驱动</p>
<td class="cellrowborder" valign="top" width="22.58%" headers="mcps1.2.5.1.3 "><p id="p94491342131413"><a name="p94491342131413"></a><a name="p94491342131413"></a>USB转串口驱动</p>
</td>
<td class="cellrowborder" valign="top" width="36.29%" headers="mcps1.2.5.1.4 "><p id="p6449184214148"><a name="p6449184214148"></a><a name="p6449184214148"></a><a href="http://www.wch.cn/search?q=ch340g&amp;t=downloads" target="_blank" rel="noopener noreferrer">http://www.wch.cn/search?q=ch340g&amp;t=downloads</a></p>
</td>
......@@ -123,7 +123,7 @@ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
scons -v
```
**图 2** SCons安装成功界面,版本要求3.0.4以上<a name="fig235815252492"></a>
**图 2** SCons安装成功界面,版本要求3.0.4以上<a name="fig151441613316"></a>
![](figure/SCons安装成功界面-版本要求3-0-4以上.png "SCons安装成功界面-版本要求3-0-4以上")
......@@ -219,7 +219,7 @@ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
### 安装gcc\_riscv32(WLAN模组类编译工具链)<a name="section34435451256"></a>
>![](../public_sys-resources/icon-notice.gif) **须知:**
>- Hi3861平台仅支持使用libgcc运行时库的静态链接,不建议开发者使用libgcc运行时库的动态链接,会导致商业分发时被GPL V3污染
>- Hi3861平台仅支持使用libgcc运行时库的静态链接,不建议开发者使用libgcc运行时库的动态链接,以免产品需遵从GPLV3许可证
>- 通过下述步骤2-15,我们编译好了gcc\_riscv32 镜像,提供给开发者[直接下载](https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz)使用。直接下载 gcc\_riscv32 镜像的开发者可省略下述2-15步。
1. 打开Linux编译服务器终端。
......@@ -353,6 +353,6 @@ sudo apt-get install build-essential gcc g++ make zlib* libffi-dev
2. 点击安装包,安装驱动程序。
3. 驱动安装完成后,重新插拔USB接口,串口信息显示如下图所示。
![](figure/zh-cn_image_0000001174350633.png)
![](figure/serial-port-entry.png)
# 镜像烧录<a name="ZH-CN_TOPIC_0000001119964704"></a>
# 镜像烧录<a name="ZH-CN_TOPIC_0000001153557088"></a>
- [前提条件](#section232415263110)
- [使用网口烧录](#section998903784810)
- [前提条件](#section63941724112115)
- [使用网口烧录](#section112807166589)
标准系统烧录,在V2.2 Beta1及以上版本支持。
Hi3516DV300支持烧录标准系统,其烧录方式包括USB烧录、网口烧录和串口烧录三种方式,其中:
- **Windows系统:支持USB烧录、网口烧录和串口烧录**
- **Windows系统:支持USB烧录、网口烧录和串口烧录**
- **Linux系统:支持串口烧录和网口烧录。**
同一种烧录方式(如网口烧录),在Windows和Linux环境下的烧录操作完全一致,区别仅在于DevEco Device Tool环境搭建不同。
......@@ -15,184 +16,53 @@ Hi3516DV300支持烧录标准系统,其烧录方式包括USB烧录、网口烧
>![](../public_sys-resources/icon-note.gif) **说明:**
>当前Hi3516DV300开发板支持通过网口、USB、串口三种方式烧录OpenHarmony标准系统。本文以网口方式为例讲解烧录操作,其他两种烧录方式请参照[Hi3516DV300烧录指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_upload-0000001052148681)。
## 前提条件<a name="section63941724112115"></a>
## 前提条件<a name="section232415263110"></a>
在DevEco Device Tool中,选择**Import Project**打开待烧录文件所在文件夹,其中MCU选择**HiSilicon\_Arm\_Linux**下的Hi3516DV300,Framework选择“Hb”。
在DevEco Device Tool中[打开一个工程](https://device.harmonyos.com/cn/docs/ide/user-guides/open_project-0000001071680043),该工程文件夹选择待烧录文件所在文件夹即可。其中开发板类型固定选择Hi3516DV300,Framework选择“Hb”。
![](figure/hisilicon-arm-linux.png)
## 使用网口烧录<a name="section112807166589"></a>
### 使用网口烧录<a name="section998903784810"></a>
Hi3516DV300开发板使用网口录方式,支持Windows和Linux系统。
Hi3516DV300开发板使用网口录方式,支持Windows和Linux系统。
1. 请连接好电脑和待烧录开发板,需要同时连接串口、网口和电源,具体可参考[Hi3516DV300开发板介绍](https://device.harmonyos.com/cn/docs/start/introduce/oem_minitinier_des_3516-0000001152041033)
2. <a name="zh-cn_topic_0000001180633781_li1050616379507"></a>打开电脑的设备管理器,查看并记录对应的串口号。
2. <a name="zh-cn_topic_0000001056443961_li1050616379507"></a>打开电脑的设备管理器,查看并记录对应的串口号。
>![](../public_sys-resources/icon-note.gif) **说明:**
>如果对应的串口异常,请根据[Hi3516DV300/Hi3518EV300开发板串口驱动安装指导](https://device.harmonyos.com/cn/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695)安装USB转串口的驱动程序。
![](figure/zh-cn_image_0000001180513891.png)
![](figure/record-the-serial-port-number-1.png)
3. 打开DevEco Device Tool,在Projects中,点击**Settings**打开工程配置界面。
![](figure/2021-01-27_170334-17.png)
4.**Partition Configuration**页签中,按照下表内容填写烧录文件信息,包括:
<a name="zh-cn_topic_0000001180633781_table18494162555410"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001180633781_row15492132518545"><th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.1"><p id="zh-cn_topic_0000001180633781_p174911825135413"><a name="zh-cn_topic_0000001180633781_p174911825135413"></a><a name="zh-cn_topic_0000001180633781_p174911825135413"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.2"><p id="zh-cn_topic_0000001180633781_p114911625165414"><a name="zh-cn_topic_0000001180633781_p114911625165414"></a><a name="zh-cn_topic_0000001180633781_p114911625165414"></a>Binary</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.3"><p id="zh-cn_topic_0000001180633781_p1749112515417"><a name="zh-cn_topic_0000001180633781_p1749112515417"></a><a name="zh-cn_topic_0000001180633781_p1749112515417"></a>Memory</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.4"><p id="zh-cn_topic_0000001180633781_p1749182575420"><a name="zh-cn_topic_0000001180633781_p1749182575420"></a><a name="zh-cn_topic_0000001180633781_p1749182575420"></a>System</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.5"><p id="zh-cn_topic_0000001180633781_p174921325135414"><a name="zh-cn_topic_0000001180633781_p174921325135414"></a><a name="zh-cn_topic_0000001180633781_p174921325135414"></a>Address</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.6"><p id="zh-cn_topic_0000001180633781_p749242515415"><a name="zh-cn_topic_0000001180633781_p749242515415"></a><a name="zh-cn_topic_0000001180633781_p749242515415"></a>Length</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.7"><p id="zh-cn_topic_0000001180633781_p164921925115416"><a name="zh-cn_topic_0000001180633781_p164921925115416"></a><a name="zh-cn_topic_0000001180633781_p164921925115416"></a>Board</p>
</th>
<th class="cellrowborder" valign="top" width="12.5%" id="mcps1.1.9.1.8"><p id="zh-cn_topic_0000001180633781_p0492132595412"><a name="zh-cn_topic_0000001180633781_p0492132595412"></a><a name="zh-cn_topic_0000001180633781_p0492132595412"></a>Type</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001180633781_row949214259543"><td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.1 "><p id="zh-cn_topic_0000001180633781_p194922259548"><a name="zh-cn_topic_0000001180633781_p194922259548"></a><a name="zh-cn_topic_0000001180633781_p194922259548"></a>fastboot</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.2 "><p id="zh-cn_topic_0000001180633781_p749222515411"><a name="zh-cn_topic_0000001180633781_p749222515411"></a><a name="zh-cn_topic_0000001180633781_p749222515411"></a>选择“u-boot-hi3516dv300_emmc.bin”</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.3 "><p id="zh-cn_topic_0000001180633781_p1749213258540"><a name="zh-cn_topic_0000001180633781_p1749213258540"></a><a name="zh-cn_topic_0000001180633781_p1749213258540"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.4 "><p id="zh-cn_topic_0000001180633781_p1749220254548"><a name="zh-cn_topic_0000001180633781_p1749220254548"></a><a name="zh-cn_topic_0000001180633781_p1749220254548"></a>none</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.5 "><p id="zh-cn_topic_0000001180633781_p144921825125418"><a name="zh-cn_topic_0000001180633781_p144921825125418"></a><a name="zh-cn_topic_0000001180633781_p144921825125418"></a>0x000000</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.6 "><p id="zh-cn_topic_0000001180633781_p549272518547"><a name="zh-cn_topic_0000001180633781_p549272518547"></a><a name="zh-cn_topic_0000001180633781_p549272518547"></a>0x100000</p>
</td>
<td class="cellrowborder" rowspan="7" valign="top" width="12.5%" headers="mcps1.1.9.1.7 "><p id="zh-cn_topic_0000001180633781_p9492125205411"><a name="zh-cn_topic_0000001180633781_p9492125205411"></a><a name="zh-cn_topic_0000001180633781_p9492125205411"></a>固定选择“hi3516dv300”</p>
</td>
<td class="cellrowborder" valign="top" width="12.5%" headers="mcps1.1.9.1.8 "><p id="zh-cn_topic_0000001180633781_p1549282518548"><a name="zh-cn_topic_0000001180633781_p1549282518548"></a><a name="zh-cn_topic_0000001180633781_p1549282518548"></a>NA</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001180633781_row94933253545"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="zh-cn_topic_0000001180633781_p1749311252542"><a name="zh-cn_topic_0000001180633781_p1749311252542"></a><a name="zh-cn_topic_0000001180633781_p1749311252542"></a>boot</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="zh-cn_topic_0000001180633781_p18493162515543"><a name="zh-cn_topic_0000001180633781_p18493162515543"></a><a name="zh-cn_topic_0000001180633781_p18493162515543"></a>选择“uImage”</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="zh-cn_topic_0000001180633781_p1249332512548"><a name="zh-cn_topic_0000001180633781_p1249332512548"></a><a name="zh-cn_topic_0000001180633781_p1249332512548"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="zh-cn_topic_0000001180633781_p114931825155414"><a name="zh-cn_topic_0000001180633781_p114931825155414"></a><a name="zh-cn_topic_0000001180633781_p114931825155414"></a>none</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="zh-cn_topic_0000001180633781_p1249392565417"><a name="zh-cn_topic_0000001180633781_p1249392565417"></a><a name="zh-cn_topic_0000001180633781_p1249392565417"></a>0x100000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="zh-cn_topic_0000001180633781_p84932253541"><a name="zh-cn_topic_0000001180633781_p84932253541"></a><a name="zh-cn_topic_0000001180633781_p84932253541"></a>0xf00000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="zh-cn_topic_0000001180633781_p13493142515412"><a name="zh-cn_topic_0000001180633781_p13493142515412"></a><a name="zh-cn_topic_0000001180633781_p13493142515412"></a>NA</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001180633781_row649362515548"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="zh-cn_topic_0000001180633781_p749317258546"><a name="zh-cn_topic_0000001180633781_p749317258546"></a><a name="zh-cn_topic_0000001180633781_p749317258546"></a>updater</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="zh-cn_topic_0000001180633781_p749372519545"><a name="zh-cn_topic_0000001180633781_p749372519545"></a><a name="zh-cn_topic_0000001180633781_p749372519545"></a>选择“updater.img”</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="zh-cn_topic_0000001180633781_p34931825165414"><a name="zh-cn_topic_0000001180633781_p34931825165414"></a><a name="zh-cn_topic_0000001180633781_p34931825165414"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="zh-cn_topic_0000001180633781_p104932253549"><a name="zh-cn_topic_0000001180633781_p104932253549"></a><a name="zh-cn_topic_0000001180633781_p104932253549"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="zh-cn_topic_0000001180633781_p1149310255541"><a name="zh-cn_topic_0000001180633781_p1149310255541"></a><a name="zh-cn_topic_0000001180633781_p1149310255541"></a>0x1000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="zh-cn_topic_0000001180633781_p194936251542"><a name="zh-cn_topic_0000001180633781_p194936251542"></a><a name="zh-cn_topic_0000001180633781_p194936251542"></a>0x1400000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="zh-cn_topic_0000001180633781_p1849352575412"><a name="zh-cn_topic_0000001180633781_p1849352575412"></a><a name="zh-cn_topic_0000001180633781_p1849352575412"></a>NA</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001180633781_row1149316252542"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="zh-cn_topic_0000001180633781_p114931925205416"><a name="zh-cn_topic_0000001180633781_p114931925205416"></a><a name="zh-cn_topic_0000001180633781_p114931925205416"></a>misc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="zh-cn_topic_0000001180633781_p149318253541"><a name="zh-cn_topic_0000001180633781_p149318253541"></a><a name="zh-cn_topic_0000001180633781_p149318253541"></a>空白,不用选择</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="zh-cn_topic_0000001180633781_p64931825145418"><a name="zh-cn_topic_0000001180633781_p64931825145418"></a><a name="zh-cn_topic_0000001180633781_p64931825145418"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="zh-cn_topic_0000001180633781_p1149372535411"><a name="zh-cn_topic_0000001180633781_p1149372535411"></a><a name="zh-cn_topic_0000001180633781_p1149372535411"></a>none</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="zh-cn_topic_0000001180633781_p64931253544"><a name="zh-cn_topic_0000001180633781_p64931253544"></a><a name="zh-cn_topic_0000001180633781_p64931253544"></a>0x2400000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="zh-cn_topic_0000001180633781_p194932025195413"><a name="zh-cn_topic_0000001180633781_p194932025195413"></a><a name="zh-cn_topic_0000001180633781_p194932025195413"></a>0x100000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="zh-cn_topic_0000001180633781_p1649332565414"><a name="zh-cn_topic_0000001180633781_p1649332565414"></a><a name="zh-cn_topic_0000001180633781_p1649332565414"></a>NA</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001180633781_row16494182510545"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="zh-cn_topic_0000001180633781_p64948251549"><a name="zh-cn_topic_0000001180633781_p64948251549"></a><a name="zh-cn_topic_0000001180633781_p64948251549"></a>system</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="zh-cn_topic_0000001180633781_p104948254549"><a name="zh-cn_topic_0000001180633781_p104948254549"></a><a name="zh-cn_topic_0000001180633781_p104948254549"></a>选择“system.img”</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="zh-cn_topic_0000001180633781_p5494122517543"><a name="zh-cn_topic_0000001180633781_p5494122517543"></a><a name="zh-cn_topic_0000001180633781_p5494122517543"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="zh-cn_topic_0000001180633781_p84948259549"><a name="zh-cn_topic_0000001180633781_p84948259549"></a><a name="zh-cn_topic_0000001180633781_p84948259549"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="zh-cn_topic_0000001180633781_p1249432519541"><a name="zh-cn_topic_0000001180633781_p1249432519541"></a><a name="zh-cn_topic_0000001180633781_p1249432519541"></a>0x2500000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="zh-cn_topic_0000001180633781_p154941125205415"><a name="zh-cn_topic_0000001180633781_p154941125205415"></a><a name="zh-cn_topic_0000001180633781_p154941125205415"></a>0xceb00000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="zh-cn_topic_0000001180633781_p24941925205415"><a name="zh-cn_topic_0000001180633781_p24941925205415"></a><a name="zh-cn_topic_0000001180633781_p24941925205415"></a>NA</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001180633781_row10494202535417"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="zh-cn_topic_0000001180633781_p3494225175414"><a name="zh-cn_topic_0000001180633781_p3494225175414"></a><a name="zh-cn_topic_0000001180633781_p3494225175414"></a>vendor</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="zh-cn_topic_0000001180633781_p6494192516544"><a name="zh-cn_topic_0000001180633781_p6494192516544"></a><a name="zh-cn_topic_0000001180633781_p6494192516544"></a>选择“vendor.img”</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="zh-cn_topic_0000001180633781_p549492595415"><a name="zh-cn_topic_0000001180633781_p549492595415"></a><a name="zh-cn_topic_0000001180633781_p549492595415"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="zh-cn_topic_0000001180633781_p1494122595420"><a name="zh-cn_topic_0000001180633781_p1494122595420"></a><a name="zh-cn_topic_0000001180633781_p1494122595420"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="zh-cn_topic_0000001180633781_p04941925115412"><a name="zh-cn_topic_0000001180633781_p04941925115412"></a><a name="zh-cn_topic_0000001180633781_p04941925115412"></a>0xd1000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="zh-cn_topic_0000001180633781_p749416252545"><a name="zh-cn_topic_0000001180633781_p749416252545"></a><a name="zh-cn_topic_0000001180633781_p749416252545"></a>0x10000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="zh-cn_topic_0000001180633781_p134941725175414"><a name="zh-cn_topic_0000001180633781_p134941725175414"></a><a name="zh-cn_topic_0000001180633781_p134941725175414"></a>NA</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001180633781_row349412251547"><td class="cellrowborder" valign="top" headers="mcps1.1.9.1.1 "><p id="zh-cn_topic_0000001180633781_p19494122585417"><a name="zh-cn_topic_0000001180633781_p19494122585417"></a><a name="zh-cn_topic_0000001180633781_p19494122585417"></a>userdata</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.2 "><p id="zh-cn_topic_0000001180633781_p14494192514543"><a name="zh-cn_topic_0000001180633781_p14494192514543"></a><a name="zh-cn_topic_0000001180633781_p14494192514543"></a>选择“userdata.img”</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.3 "><p id="zh-cn_topic_0000001180633781_p15494725175416"><a name="zh-cn_topic_0000001180633781_p15494725175416"></a><a name="zh-cn_topic_0000001180633781_p15494725175416"></a>emmc</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.4 "><p id="zh-cn_topic_0000001180633781_p154946254549"><a name="zh-cn_topic_0000001180633781_p154946254549"></a><a name="zh-cn_topic_0000001180633781_p154946254549"></a>ext3/4</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.5 "><p id="zh-cn_topic_0000001180633781_p204941225155420"><a name="zh-cn_topic_0000001180633781_p204941225155420"></a><a name="zh-cn_topic_0000001180633781_p204941225155420"></a>0xe1000000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.6 "><p id="zh-cn_topic_0000001180633781_p1449482515413"><a name="zh-cn_topic_0000001180633781_p1449482515413"></a><a name="zh-cn_topic_0000001180633781_p1449482515413"></a>0x5b800000</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.1.9.1.7 "><p id="zh-cn_topic_0000001180633781_p0494182535420"><a name="zh-cn_topic_0000001180633781_p0494182535420"></a><a name="zh-cn_topic_0000001180633781_p0494182535420"></a>NA</p>
</td>
</tr>
</tbody>
</table>
![](figure/zh-cn_image_0000001180633813.png)
5. 在“hi3516dv300”页签,设置烧录选项,包括upload\_port、upload\_partitions和upload\_protocol。
- upload\_port:选择步骤[2](#zh-cn_topic_0000001180633781_li1050616379507)中查询的串口号。
![](figure/settings.png)
4. 在“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。
- upload\_partitions:选择待烧录的文件,默认情况下会同时烧录fastboot、boot、updater、misc、system、vendor和userdata。
![](figure/zh-cn_image_0000001134474510.png)
![](figure/upload-options-26.png)
6. 检查和设置连接开发板后的网络适配器的IP地址信息,设置方法请参考[设置Hi3516DV300网口烧录的IP地址信息](https://device.harmonyos.com/cn/docs/ide/user-guides/set_ipaddress-0000001141825075)
7. 设置网口烧录的IP地址信息,设置如下选项:
5. 检查和设置连接开发板后的网络适配器的IP地址信息,设置方法请参考[设置Hi3516DV300网口烧录的IP地址信息](https://device.harmonyos.com/cn/docs/ide/user-guides/set_ipaddress-0000001141825075)
6. 设置网口烧录的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
![](figure/zh-cn_image_0000001180633847.png)
![](figure/ip-address-information.png)
8. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。
9. 启动烧录后,显示如下提示信息时,请重启开发板(下电再上电)。
7. 所有的配置都修改完成后,在工程配置页签的顶部,点击**Save**进行保存。
8. 启动烧录后,显示如下提示信息时,请重启开发板(下电再上电)。
![](figure/zh-cn_image_0000001134634288.png)
![](figure/restart-the-development-board-2.png)
10. 重新上电后,启动烧录,界面提示如下信息时,表示烧录成功。
9. 重新上电后,启动烧录,界面提示如下信息时,表示烧录成功。
![](figure/zh-cn_image_0000001180513893.png)
![](figure/burning-succeeded-3.png)
......@@ -61,13 +61,13 @@ repo forall -c 'git lfs pull'
1. 获取Docker镜像。
```
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3
docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.2
```
2. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。
```
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.3
docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.2
```
......@@ -89,7 +89,7 @@ repo forall -c 'git lfs pull'
3. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。
```
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.3
docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.2
```
......
......@@ -12,17 +12,15 @@
标准系统快速入门流程如下图所示,其中“搭建Ubuntu环境及编译”环节可根据实际情况选择docker方式或工具包方式其中一种即可。
**图 1** 标准环境快速入门流程<a name="fig3374426164717"></a>
**图 1** 标准环境快速入门流程<a name="fig19162195553211"></a>
![](figure/标准环境快速入门流程.png "标准环境快速入门流程")
## 开发板简介<a name="zh-cn_topic_0000001053666242_section047719215429"></a>
Hi3516DV300作为新一代行业专用Smart HD IP摄像机SOC,集成新一代ISP\(Image Signal Processor\)、H.265视频压缩编码器,同时集成高性能NNIE引擎,使得Hi3516DV300在低码率、高画质、智能处理和分析、低功耗等方面引领行业水平。
**图 2** Hi3516单板正面外观图<a name="zh-cn_topic_0000001053666242_fig11402183715219"></a>
![](figure/3516正面-16.png)
**图 2** Hi3516单板正面外观图<a name="fig202901538183412"></a>
![](figure/Hi3516单板正面外观图-25.png "Hi3516单板正面外观图-25")
## 开发板规格<a name="zh-cn_topic_0000001053666242_section15192203316533"></a>
......
......@@ -17,7 +17,7 @@ sudo apt-get update && sudo apt-get install binutils git git-lfs gnupg flex biso
```
>![](../public_sys-resources/icon-note.gif) **说明:**
>以上安装命令适用于Ubuntu18.04,其他版本请根据安装包名称采用对应的安装命令。
>以上安装命令适用于Ubuntu18.04,其他版本请根据安装包名称采用对应的安装命令。其中Python要求安装Python 3.7及以上版本,此处以Python 3.8为例。
## 获取标准系统源码<a name="section113751052102517"></a>
......
# 镜像运行<a name="ZH-CN_TOPIC_0000001142160948"></a>
- [镜像运行](#section153991115191314)
- [下一步](#section5600113114323)
## 镜像运行<a name="section153991115191314"></a>
- [\#ZH-CN\_TOPIC\_0000001142160948/section153991115191314](#section153991115191314)
烧录完成后通过以下步骤运行系统:
......@@ -12,11 +9,11 @@
1. 在DevEco Device Tool中,点击Monitor,打开串口工具。
![](figure/zh-cn_image_0000001142616226.png)
![](figure/open-the-serial-port-tool.png)
2. 重启开发板,在倒计时结束前,按任意键进入系统。
![](figure/1-18.gif)
![](figure/press-any-key-to-enter-the-system.gif)
3. 通过以下两条命令设置启动参数。
......@@ -28,7 +25,7 @@
setenv bootcmd "mmc read 0x0 0x80000000 0x800 0x4800; bootm 0x80000000";
```
![](figure/启动.png)
![](figure/start.png)
4. 保存参数设置。
......@@ -36,7 +33,7 @@
save
```
![](figure/启动1.png)
![](figure/Save-the-parameter-settings.png)
5. 重启开发板,完成系统启动。
......@@ -44,10 +41,6 @@
reset
```
![](figure/启动2.png)
## 下一步<a name="section5600113114323"></a>
![](figure/start-the-system.png)
恭喜!您已经完成了OpenHarmony标准系统的快速入门,接下来可[开发一个小示例](../guide/device-clock-guide.md),进一步熟悉OpenHarmony的开发。
......@@ -7,7 +7,10 @@
- [安装hpm](#zh-cn_topic_0000001058091994_section173054793610)
- [安装DevEco Device Tool插件](#zh-cn_topic_0000001058091994_section4336315185716)
系统要求:Windows 10 64位系统。
系统要求:
- Windows 10 64位系统。
- 系统的用户名不能含有中文字符。
DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展,安装分为如下几步:
......@@ -43,7 +46,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p547205817316"><a name="zh-cn_topic_0000001058091994_p547205817316"></a><a name="zh-cn_topic_0000001058091994_p547205817316"></a>编译构建工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>V3.8及以上64位版本</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p1991315166416"><a name="zh-cn_topic_0000001058091994_p1991315166416"></a><a name="zh-cn_topic_0000001058091994_p1991315166416"></a>V3.8.9及以上64位版本</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p108321457411"><a name="zh-cn_topic_0000001058091994_p108321457411"></a><a name="zh-cn_topic_0000001058091994_p108321457411"></a><a href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer">https://www.python.org/downloads/</a></p>
</td>
......@@ -52,7 +55,8 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p1773185765616"><a name="zh-cn_topic_0000001058091994_p1773185765616"></a><a name="zh-cn_topic_0000001058091994_p1773185765616"></a>提供npm环境</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p573118572567"><a name="zh-cn_topic_0000001058091994_p573118572567"></a><a name="zh-cn_topic_0000001058091994_p573118572567"></a>v12.0.0及以上64位版本</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p16304104120181"><a name="zh-cn_topic_0000001058091994_p16304104120181"></a><a name="zh-cn_topic_0000001058091994_p16304104120181"></a>以下版本三选一:</p>
<a name="zh-cn_topic_0000001058091994_ul875854471719"></a><a name="zh-cn_topic_0000001058091994_ul875854471719"></a><ul id="zh-cn_topic_0000001058091994_ul875854471719"><li>V12.22.5及以上64位版本</li><li>V14.17.5及以上64版本</li><li>V16.6.0及以上64位版本</li></ul>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p9200911141112"><a name="zh-cn_topic_0000001058091994_p9200911141112"></a><a name="zh-cn_topic_0000001058091994_p9200911141112"></a><a href="https://nodejs.org/zh-cn/download/" target="_blank" rel="noopener noreferrer">https://nodejs.org/zh-cn/download/</a></p>
</td>
......@@ -61,7 +65,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p1632215161040"><a name="zh-cn_topic_0000001058091994_p1632215161040"></a><a name="zh-cn_topic_0000001058091994_p1632215161040"></a>包管理工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p773185715566"><a name="zh-cn_topic_0000001058091994_p773185715566"></a><a name="zh-cn_topic_0000001058091994_p773185715566"></a>最新版</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p773185715566"><a name="zh-cn_topic_0000001058091994_p773185715566"></a><a name="zh-cn_topic_0000001058091994_p773185715566"></a>V1.3.0及以上</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p14731125745610"><a name="zh-cn_topic_0000001058091994_p14731125745610"></a><a name="zh-cn_topic_0000001058091994_p14731125745610"></a>请参考<a href="#zh-cn_topic_0000001058091994_section173054793610">安装hpm</a></p>
</td>
......@@ -70,9 +74,9 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
</td>
<td class="cellrowborder" valign="top" width="20.5%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001058091994_p1690316506517"><a name="zh-cn_topic_0000001058091994_p1690316506517"></a><a name="zh-cn_topic_0000001058091994_p1690316506517"></a>OpenHarmony源码的编译、烧录、调试插件工具</p>
</td>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p113171956185715"><a name="zh-cn_topic_0000001058091994_p113171956185715"></a><a name="zh-cn_topic_0000001058091994_p113171956185715"></a>v2.2 Beta2</p>
<td class="cellrowborder" valign="top" width="20.03%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001058091994_p113171956185715"><a name="zh-cn_topic_0000001058091994_p113171956185715"></a><a name="zh-cn_topic_0000001058091994_p113171956185715"></a>V2.2 Beta2</p>
</td>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p3503163074720"><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/cn/ide#download" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide#download</a></p>
<td class="cellrowborder" valign="top" width="39.98%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001058091994_p3503163074720"><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a name="zh-cn_topic_0000001058091994_p3503163074720"></a><a href="https://device.harmonyos.com/cn/ide#download_beta" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide#download_beta</a></p>
<p id="zh-cn_topic_0000001058091994_p23171856135717"><a name="zh-cn_topic_0000001058091994_p23171856135717"></a><a name="zh-cn_topic_0000001058091994_p23171856135717"></a>下载前,请使用华为开发者帐号登录,如未注册,请先<a href="https://developer.huawei.com/consumer/cn/doc/start/registration-and-verification-0000001053628148" target="_blank" rel="noopener noreferrer">注册华为开发者帐号</a></p>
</td>
</tr>
......@@ -86,7 +90,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
1. 双击Visual Studio Code软件包进行安装。安装过程中,请勾选“添加到PATH(重启后生效)”。
![](figure/zh-cn_image_0000001057335403.png)
![](figure/installing-visual-studio-code.png)
2. 安装完成后,打开命令行工具,输入**code --version**命令,可以正常显示版本号说明安装成功。
......@@ -94,15 +98,15 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
1. 双击Python安装包进行安装,勾选“**Add Python 3.8 to PATH**”,然后点击**Install Now**开始安装。
![](figure/zh-cn_image_0000001138841358.png)
![](figure/installing-python.png)
2. 等待安装完成后,点击**Close**
![](figure/zh-cn_image_0000001142794291.png)
![](figure/setup-was-successful.png)
3. 打开命令行工具,输入python --version,检查安装结果。
![](figure/zh-cn_image_0000001130278040.png)
![](figure/checking-the-installation-result.png)
4. 在命令行工具中,分别执行如下命令设置pip源,用于后续安装DevEco Device Tool过程中下载依赖的组件包。
......@@ -142,7 +146,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
npm install -g @ohos/hpm-cli
```
![](figure/zh-cn_image_0000001073840162.png)
![](figure/hpm-version.png)
3. 安装完成后,执行如下命令(V为大写字母)检查hpm安装结果。
......@@ -153,7 +157,7 @@ DevEco Device Tool以插件方式提供,基于Visual Studio Code进行扩展
## 安装DevEco Device Tool插件<a name="zh-cn_topic_0000001058091994_section4336315185716"></a>
安装DevEco Device Tool插件,**主机的用户名不能包含中文字符**,否则可能导致运行出现错误
安装DevEco Device Tool插件,**主机的用户名不能包含中文字符**,否则在运行DevEco Device Tool时,DevEco Home界面会一直处于Loading状态,导致不能正常使用
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)
......@@ -166,21 +170,21 @@ DevEco Device Tool正常运行需要依赖于C/C++和CodeLLDB插件,在安装
>![](../public_sys-resources/icon-note.gif) **说明:**
>如果已经安装Visual Studio Code,但依然检测不到,可重启电脑解决。
![](figure/zh-cn_image_0000001184531449.png)
![](figure/installing-the-deveco-device-tool.png)
3. 点击**Install**进行安装。
![](figure/zh-cn_image_0000001137332702.png)
![](figure/install.png)
4. 等待安装完成后,点击Close关闭安装界面。
![](figure/zh-cn_image_0000001138853234.png)
![](figure/installation-complete.png)
5. 启动Visual Studio Code,会自动安装DevEco Device Tool依赖的C/C++、CodeLLDB插件。等待安装完成后,点击Visual Studio Code左侧的![](figure/zh-cn_image_0000001072757874.png)按钮,检查INSTALLED中,是否已成功安装C/C++、CodeLLDB和DevEco Device Tool。
5. 启动Visual Studio Code,会自动安装DevEco Device Tool依赖的C/C++、CodeLLDB插件。等待安装完成后,点击Visual Studio Code左侧的![](figure/button.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)。
![](figure/zh-cn_image_0000001142802505.png)
![](figure/visual-studio-code.png)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册