提交 81eb09e8 编写于 作者: N NEEN

!58 Docs Update

* !1 modify
* Description: update docs
上级 4352fe01
# FAQ:标题(简要描述问题关键信息)<a name="ZH-CN_TOPIC_0000001051065413"></a>
FAQ页面介绍开发过程中遇到的各类问题及解决方法,帮助更多开发者快速消除此类开发障碍。
## 简单类问题写作模板<a name="section1211416018447"></a>
简要描述在完成哪些操作时,遇到的问题现象,以及解决方法。
## 复杂类问题写作模板<a name="section13861135611514"></a>
**现象描述**
- 使用的系统软件、硬件版本?
- 在完成哪些操作时,遇到了什么样的问题?
- 可能显示什么错误消息?
- 如果可能,请提供屏幕截图。
**可能原因**
分析哪些原因导致此问题,如果有多个原因,请使用项目列表一一列举。
1. XXX
2. XXX
**处理步骤**
- 如果有多个解决方案,请按照复杂性排序,并提供什么场景下选择哪种解决方案。
- 如果可能,请提供屏幕截图,帮助理解步骤完成标准。
- 代码如有打印输出,请提示打印输出内容_,帮助理解步骤完成标准_。
1. XXX
2. XXX
# 教程:标题(对应的任务名称)<a name="ZH-CN_TOPIC_0000001050785644"></a>
教程页面介绍如何完成一个复杂的任务开发、功能开发、APP开发。通常教程页面会将开发过程拆解为多个小节,每个小节由一系列步骤组成。同时,教程中一般需要提供代码示例并进行介绍,便于用户了解具体的功能实现。
对于教程中可能涉及到的基本概念,简单的概念可以直接介绍,更深度的概念和主题推荐查阅文档对应专题。
撰写教程页面时,在“others“目录下面创建新的MarkDown文件。
## 总览<a name="section187784618017"></a>
_写作内容:介绍开发者学习本教程后将完成什么样的任务,实现什么样的功能和效果。__例如,可以是移植教程、实现一个功能开发教程等。_如果可实现多个目标,建议使用项目符号列表。
_如果可能,请提供图片或短视频展示实现效果。_
## 开发准备<a name="section14914182112"></a>
- _完成该功能需要的软件、硬件、工具及对应版本信息。_
- _需要获取的相关权限说明。_
## XXX(关键任务一)<a name="section1439712384145"></a>
_将教程分解为几个顺序的关键任务或并列不同的场景任务。_
1. XXXX。
```
//代码示例
```
2. XXXX。
_所有的操作步骤,遵循如下写作要求:_
1. _步骤明确操作场景和目的,__步骤中执行的主体要描述清楚。_
2. _步骤中如果涉及接口调用,需要清晰给出使用的接口及其使用说明,示例代码。_
3. _涉及到工具界面的步骤,可以提供界面截图,帮助理解步骤完成标准。_
4. _保证代码的逻辑和语法的正确性。_
5. _代码中关键步骤要有注释说明。_
6. 代码如有打印输出,请单独提示打印输出内容_,帮助理解步骤完成标准_。
## XXX(关键任务二)<a name="section1228811105115"></a>
1. XXXX。
## 下一步<a name="section096591885116"></a>
介绍本教程可能关联的后续开发任务,如果没有请删除此内容。
......@@ -52,8 +52,8 @@
鼓励开发者在学习、开发过程中,总结经验并创建技术内容帮助更多开发者快速上手。推荐输出各类How to教程、常见问题FAQ等。请参考如下写作模板:
- [How to教程](zh-cn_topic_0000001050785644.md)
- [FAQ](FAQ.md)
- [How to教程](tutorial-title-task-name.md)
- [FAQ](faq-template.md)
内容写作模板归档在Docs文档仓下contribute文件夹中。
......@@ -36,16 +36,16 @@ You can download the source code or the corresponding solutions from the image l
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p79291938252"><a name="p79291938252"></a><a name="p79291938252"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p10929236258"><a name="p10929236258"></a><a name="p10929236258"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 1</a>, <a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p10929236258"><a name="p10929236258"></a><a name="p10929236258"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p992993202517"><a name="p992993202517"></a><a name="p992993202517"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA-256 Verification Code</a></p>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p992993202517"><a name="p992993202517"></a><a name="p992993202517"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA-256 Verification Code</a></p>
</td>
</tr>
<tr id="row6929934252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.2.5.1.1 "><p id="p0929163132512"><a name="p0929163132512"></a><a name="p0929163132512"></a>Hi3861 solutions (binary)</p>
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p392913162517"><a name="p392913162517"></a><a name="p392913162517"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p592912312511"><a name="p592912312511"></a><a name="p592912312511"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/wifiiot-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 1</a>, <a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/wifiiot-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p592912312511"><a name="p592912312511"></a><a name="p592912312511"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/wifiiot-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p199296318252"><a name="p199296318252"></a><a name="p199296318252"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/wifiiot-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA-256 Verification Code</a></p>
</td>
......@@ -54,25 +54,25 @@ You can download the source code or the corresponding solutions from the image l
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p49291935254"><a name="p49291935254"></a><a name="p49291935254"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1792943152517"><a name="p1792943152517"></a><a name="p1792943152517"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 1</a>, <a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1792943152517"><a name="p1792943152517"></a><a name="p1792943152517"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1392983162514"><a name="p1392983162514"></a><a name="p1392983162514"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA-256 Verification Code</a></p>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1392983162514"><a name="p1392983162514"></a><a name="p1392983162514"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA-256 Verification Code</a></p>
</td>
</tr>
<tr id="row199306317255"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.2.5.1.1 "><p id="p1693063122511"><a name="p1693063122511"></a><a name="p1693063122511"></a>Hi3516 solutions (binary)</p>
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p169301335252"><a name="p169301335252"></a><a name="p169301335252"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1393012302510"><a name="p1393012302510"></a><a name="p1393012302510"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 1</a>, <a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1393012302510"><a name="p1393012302510"></a><a name="p1393012302510"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1393083102517"><a name="p1393083102517"></a><a name="p1393083102517"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA-256 Verification Code</a></p>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1393083102517"><a name="p1393083102517"></a><a name="p1393083102517"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA-256 Verification Code</a></p>
</td>
</tr>
<tr id="row13795111119551"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.2.5.1.1 "><p id="p679516111552"><a name="p679516111552"></a><a name="p679516111552"></a>RELEASE-NOTES</p>
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p13796201120553"><a name="p13796201120553"></a><a name="p13796201120553"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p8796911155518"><a name="p8796911155518"></a><a name="p8796911155518"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/RELEASE-NOTES.txt" target="_blank" rel="noopener noreferrer">Site 1</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p8796911155518"><a name="p8796911155518"></a><a name="p8796911155518"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/RELEASE-NOTES.txt" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p16796011205518"><a name="p16796011205518"></a><a name="p16796011205518"></a>-</p>
</td>
......
......@@ -21,7 +21,7 @@ Download the compilation toolchain from image sites listed in the following tabl
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="p47941224122519"><a name="p47941224122519"></a><a name="p47941224122519"></a>9.0.0-34042</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p1379532412256"><a name="p1379532412256"></a><a name="p1379532412256"></a><a href="http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">Site 1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p1379532412256"><a name="p1379532412256"></a><a name="p1379532412256"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="p15795112414255"><a name="p15795112414255"></a><a name="p15795112414255"></a>64a518b50422b6f1ba8f6f56a5e303fb8448a311211ba10c385ad307a1d2546f</p>
</td>
......@@ -30,7 +30,7 @@ Download the compilation toolchain from image sites listed in the following tabl
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="p1679522412514"><a name="p1679522412514"></a><a name="p1679522412514"></a>7.3.0</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p13795192412258"><a name="p13795192412258"></a><a name="p13795192412258"></a><a href="http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p13795192412258"><a name="p13795192412258"></a><a name="p13795192412258"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="p7795124152510"><a name="p7795124152510"></a><a name="p7795124152510"></a>614ee086ead1a4fd7384332b85dd62707801f323de60dfdb61503f473d470a24</p>
</td>
......@@ -39,7 +39,7 @@ Download the compilation toolchain from image sites listed in the following tabl
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="p127951624182514"><a name="p127951624182514"></a><a name="p127951624182514"></a>1523</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p47957245252"><a name="p47957245252"></a><a name="p47957245252"></a><a href="http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">Site 1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p47957245252"><a name="p47957245252"></a><a name="p47957245252"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="p9795192402516"><a name="p9795192402516"></a><a name="p9795192402516"></a>50a5a5ba5877dd0ec8afcb23d3dd4d966a16403c29cd80a4002230241d32ef34</p>
</td>
......@@ -48,7 +48,7 @@ Download the compilation toolchain from image sites listed in the following tabl
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="p17952245256"><a name="p17952245256"></a><a name="p17952245256"></a>1.9.0</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p12796172442519"><a name="p12796172442519"></a><a name="p12796172442519"></a><a href="http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">Site 1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p12796172442519"><a name="p12796172442519"></a><a name="p12796172442519"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="p479692492515"><a name="p479692492515"></a><a name="p479692492515"></a>b4a4ba21e94ff77634e1f88697a00b6f498fdbc0b40d7649df1b246b285874f9</p>
</td>
......@@ -57,7 +57,7 @@ Download the compilation toolchain from image sites listed in the following tabl
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="p8796424152514"><a name="p8796424152514"></a><a name="p8796424152514"></a>0.65</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p7796624192517"><a name="p7796624192517"></a><a name="p7796624192517"></a><a href="http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">Site 1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">Site 2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="p7796624192517"><a name="p7796624192517"></a><a name="p7796624192517"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">Site</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="p679682402514"><a name="p679682402514"></a><a name="p679682402514"></a>fcfee489371947a464fe41a4b45a897b9a44155891a957f15bad2e157c750162</p>
</td>
......
......@@ -419,6 +419,9 @@ Compile and burn images by referring to [Compiling Code](developing-the-first-e
1. Connect to a serial port.
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>If the sconnection fails, rectify the fault by referring to problem 5 in the [FAQs](faqs-0.md) section.
**Figure 1** Serial port connection<a name="en-us_topic_0000001052906247_fig056645018495"></a>
......@@ -428,12 +431,12 @@ Compile and burn images by referring to [Compiling Code](developing-the-first-e
2. Enter the serial port number "com11" and press **Enter** until **hisillicon** is displayed.
3. Go to step 2 if the board is started for the first time or the startup parameters need to be modified; go to step 3 otherwise.
2. \(Mandatory when the board is started for the first time\) Modify the bootcmd and bootargs parameters of U-Boot. You need to perform this step only once if the parameters need not to be modified during the operation. The board automatically starts after it is reset.
2. \(Mandatory when the board is started for the first time\) Modify the bootcmd and bootargs parameters of U-boot. You need to perform this step only once if the parameters need not to be modified during the operation. The board automatically starts after it is reset.
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>The default waiting time in the U-Boot is 2s. You can press **Enter** to interrupt the waiting and run the **reset** command to restart the system after "hisillicon" is displayed.
>The default waiting time in the U-boot is 2s. You can press **Enter** to interrupt the waiting and run the **reset** command to restart the system after "hisillicon" is displayed.
**Table 1** Startup parameters of the U-Boot
**Table 1** Startup parameters of the U-boot
<a name="en-us_topic_0000001052906247_table432481061214"></a>
<table><tbody><tr id="en-us_topic_0000001052906247_row532461021219"><th class="firstcol" valign="top" width="8.39%" id="mcps1.2.3.1.1"><p id="en-us_topic_0000001052906247_p1238114718129"><a name="en-us_topic_0000001052906247_p1238114718129"></a><a name="en-us_topic_0000001052906247_p1238114718129"></a>Command</p>
......@@ -453,7 +456,7 @@ Compile and burn images by referring to [Compiling Code](developing-the-first-e
<p id="en-us_topic_0000001052906247_p8402475121"><a name="en-us_topic_0000001052906247_p8402475121"></a><a name="en-us_topic_0000001052906247_p8402475121"></a><strong id="en-us_topic_0000001052906247_b815584925312"><a name="en-us_topic_0000001052906247_b815584925312"></a><a name="en-us_topic_0000001052906247_b815584925312"></a>rootaddr=10 M, rootsize=15 M rw</strong> indicates the start address and size of the rootfs.img file to be burnt, respectively. The file size must be the same as that of the compiled file in the IDE.</p>
<p id="en-us_topic_0000001052906247_p54034712120"><a name="en-us_topic_0000001052906247_p54034712120"></a><a name="en-us_topic_0000001052906247_p54034712120"></a><strong id="en-us_topic_0000001052906247_b2600155013264"><a name="en-us_topic_0000001052906247_b2600155013264"></a><a name="en-us_topic_0000001052906247_b2600155013264"></a>saveenv</strong> means to save the current configuration.</p>
<p id="en-us_topic_0000001052906247_p2401247131212"><a name="en-us_topic_0000001052906247_p2401247131212"></a><a name="en-us_topic_0000001052906247_p2401247131212"></a><strong id="en-us_topic_0000001052906247_b1427444612265"><a name="en-us_topic_0000001052906247_b1427444612265"></a><a name="en-us_topic_0000001052906247_b1427444612265"></a>reset</strong> means to reset the board.</p>
<p id="en-us_topic_0000001052906247_p1440164791213"><a name="en-us_topic_0000001052906247_p1440164791213"></a><a name="en-us_topic_0000001052906247_p1440164791213"></a><strong id="en-us_topic_0000001052906247_b725515390267"><a name="en-us_topic_0000001052906247_b725515390267"></a><a name="en-us_topic_0000001052906247_b725515390267"></a>(Optional) go 0x80000000</strong> indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press <strong id="en-us_topic_0000001052906247_b1420714384268"><a name="en-us_topic_0000001052906247_b1420714384268"></a><a name="en-us_topic_0000001052906247_b1420714384268"></a>Enter</strong> in the countdown phase of the U-Boot startup to interrupt the automatic startup.</p>
<p id="en-us_topic_0000001052906247_p1440164791213"><a name="en-us_topic_0000001052906247_p1440164791213"></a><a name="en-us_topic_0000001052906247_p1440164791213"></a><strong id="en-us_topic_0000001052906247_b725515390267"><a name="en-us_topic_0000001052906247_b725515390267"></a><a name="en-us_topic_0000001052906247_b725515390267"></a>(Optional) go 0x80000000</strong> indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press <strong id="en-us_topic_0000001052906247_b1420714384268"><a name="en-us_topic_0000001052906247_b1420714384268"></a><a name="en-us_topic_0000001052906247_b1420714384268"></a>Enter</strong> in the countdown phase of the U-boot startup to interrupt the automatic startup.</p>
</td>
</tr>
</tbody>
......
......@@ -4,7 +4,7 @@ This section describes how to modify, compile, burn, and run the first program,
## Acquiring Source Code<a name="section215953714245"></a>
You need to acquire [Hi3516 source code](http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz) and download it on a Linux server. For more obtaining methods, see [Source Code Acquisition](../get-code/source-code-acquisition.md).
You need to acquire [Hi3516 source code](https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz) and download it on a Linux server. For more obtaining methods, see [Source Code Acquisition](../get-code/source-code-acquisition.md).
## Modifying a Program<a name="s8efc1952ebfe4d1ea717182e108c29bb"></a>
......@@ -114,6 +114,9 @@ This method applies only to development boards that have network ports, for exam
1. Connect to a serial port.
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>If the sconnection fails, rectify the fault by referring to problem 5 in the [FAQs](faqs-0.md) section.
**Figure 9** Serial port connection<a name="fig056645018495"></a>
......@@ -123,12 +126,12 @@ This method applies only to development boards that have network ports, for exam
2. Enter the serial port number "com11" and press **Enter** until **hisillicon** is displayed.
3. Go to step 2 if the board is started for the first time or the startup parameters need to be modified; go to step 3 otherwise.
2. \(Mandatory when the board is started for the first time\) Modify the bootcmd and bootargs parameters of U-Boot. You need to perform this step only once if the parameters need not to be modified during the operation. The board automatically starts after it is reset.
2. \(Mandatory when the board is started for the first time\) Modify the bootcmd and bootargs parameters of U-boot. You need to perform this step only once if the parameters need not to be modified during the operation. The board automatically starts after it is reset.
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>The default waiting time in the U-Boot is 2s. You can press **Enter** to interrupt the waiting and run the **reset** command to restart the system after "hisillicon" is displayed.
>The default waiting time in the U-boot is 2s. You can press **Enter** to interrupt the waiting and run the **reset** command to restart the system after "hisillicon" is displayed.
**Table 1** Startup parameters of the U-Boot
**Table 1** Startup parameters of the U-boot
<a name="table432481061214"></a>
<table><tbody><tr id="row532461021219"><th class="firstcol" valign="top" width="8.39%" id="mcps1.2.3.1.1"><p id="p1238114718129"><a name="p1238114718129"></a><a name="p1238114718129"></a>Command</p>
......@@ -148,7 +151,7 @@ This method applies only to development boards that have network ports, for exam
<p id="p8402475121"><a name="p8402475121"></a><a name="p8402475121"></a><strong id="b815584925312"><a name="b815584925312"></a><a name="b815584925312"></a>rootaddr=10 M, rootsize=15 M rw</strong> indicates the start address and size of the rootfs.img file to be burnt, respectively. The file size must be the same as that of the compiled file in the IDE.</p>
<p id="p54034712120"><a name="p54034712120"></a><a name="p54034712120"></a><strong id="b2600155013264"><a name="b2600155013264"></a><a name="b2600155013264"></a>saveenv</strong> means to save the current configuration.</p>
<p id="p2401247131212"><a name="p2401247131212"></a><a name="p2401247131212"></a><strong id="b1427444612265"><a name="b1427444612265"></a><a name="b1427444612265"></a>reset</strong> means to reset the board.</p>
<p id="p1440164791213"><a name="p1440164791213"></a><a name="p1440164791213"></a><strong id="b725515390267"><a name="b725515390267"></a><a name="b725515390267"></a>(Optional) go 0x80000000</strong> indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press <strong id="b1420714384268"><a name="b1420714384268"></a><a name="b1420714384268"></a>Enter</strong> in the countdown phase of the U-Boot startup to interrupt the automatic startup.</p>
<p id="p1440164791213"><a name="p1440164791213"></a><a name="p1440164791213"></a><strong id="b725515390267"><a name="b725515390267"></a><a name="b725515390267"></a>(Optional) go 0x80000000</strong> indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press <strong id="b1420714384268"><a name="b1420714384268"></a><a name="b1420714384268"></a>Enter</strong> in the countdown phase of the U-boot startup to interrupt the automatic startup.</p>
</td>
</tr>
</tbody>
......@@ -162,7 +165,7 @@ This method applies only to development boards that have network ports, for exam
![](figures/qi1.png)
## Run a Program<a name="section5276734182615"></a>
## Running a Program<a name="section5276734182615"></a>
In the root directory, run the **./bin/camera\_app** command to operate the demo program. The following figure shows the compilation result.
......
......@@ -4,7 +4,7 @@ This section describes how to modify, compile, burn, and run the first program o
## Acquiring Source Code<a name="section1726092873119"></a>
You need to acquire [Hi3518 source code](http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz) and download it on a Linux server. For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md).
You need to acquire [Hi3518 source code](https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz) and download it on a Linux server. For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md).
## Modifying a Program<a name="s8efc1952ebfe4d1ea717182e108c29bb"></a>
......@@ -71,14 +71,14 @@ Burn images to the Hi3518EV300 board over the serial port.
## Running an Image<a name="section62131033183710"></a>
1. Connect to the serial port. After the images are burnt successfully, start the terminal, click **Settings**, set **View Title** to **Terminal 11** and **Port** to **COM7**, and click **OK** to open the serial port. You have logged in to the U-Boot if **hisilicon \#** is displayed.
1. Connect to the serial port. After the images are burnt successfully, start the terminal, click **Settings**, set **View Title** to **Terminal 11** and **Port** to **COM7**, and click **OK** to open the serial port. You have logged in to the U-boot if **hisilicon \#** is displayed.
**Figure 6** Serial port connection<a name="fig197461744191012"></a>
![](figures/serial-port-connection.png "serial-port-connection")
2. \(Mandatory for the first burning\) Modify the **bootcmd** and **bootargs** parameters of U-Boot. This step is a fixed operation and the result can be saved. However, you need to perform the following steps again if U-Boot needs to be reburnt.
2. \(Mandatory for the first burning\) Modify the **bootcmd** and **bootargs** parameters of U-boot. This step is a fixed operation and the result can be saved. However, you need to perform the following steps again if U-boot needs to be reburnt.
**Table 1** Parameters of the Hi3518EV300 U-Boot
**Table 1** Parameters of the Hi3518EV300 U-boot
<a name="table1671622991613"></a>
<table><tbody><tr id="row1371652914168"><th class="firstcol" valign="top" width="8.38%" id="mcps1.2.3.1.1"><p id="p1598685321618"><a name="p1598685321618"></a><a name="p1598685321618"></a>Command</p>
......@@ -92,7 +92,7 @@ Burn images to the Hi3518EV300 board over the serial port.
</th>
<td class="cellrowborder" valign="top" width="91.62%" headers="mcps1.2.3.2.1 "><p id="p1198615316165"><a name="p1198615316165"></a><a name="p1198615316165"></a><strong id="b11610792311"><a name="b11610792311"></a><a name="b11610792311"></a>setenv bootcmd "sf probe 0;sf read 0x40000000 0x100000 0x600000;go 0x40000000";</strong></p>
<p id="p2986125310164"><a name="p2986125310164"></a><a name="p2986125310164"></a>Run this command to set the content of <strong id="b1915115872811"><a name="b1915115872811"></a><a name="b1915115872811"></a>bootcmd</strong>. Select the flash whose number is 0, and read content that has a size of 0x600000 and a start address of 0x100000 to memory address 0x40000000.</p>
<p id="p5759815112613"><a name="p5759815112613"></a><a name="p5759815112613"></a><strong id="b19527719203716"><a name="b19527719203716"></a><a name="b19527719203716"></a>(Optional) go 0x40000000</strong> indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press <strong id="b118621929144219"><a name="b118621929144219"></a><a name="b118621929144219"></a>Enter</strong> in the countdown phase of the U-Boot startup to interrupt the automatic startup.</p>
<p id="p5759815112613"><a name="p5759815112613"></a><a name="p5759815112613"></a><strong id="b19527719203716"><a name="b19527719203716"></a><a name="b19527719203716"></a>(Optional) go 0x40000000</strong> indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press <strong id="b118621929144219"><a name="b118621929144219"></a><a name="b118621929144219"></a>Enter</strong> in the countdown phase of the U-boot startup to interrupt the automatic startup.</p>
<p id="p340215818235"><a name="p340215818235"></a><a name="p340215818235"></a><strong id="b119855142415"><a name="b119855142415"></a><a name="b119855142415"></a>setenv bootargs "console=ttyAMA0,115200n8 root=flash fstype=jffs2 rw rootaddr=7 M rootsize=8 M";</strong></p>
<p id="p8987115381613"><a name="p8987115381613"></a><a name="p8987115381613"></a>In this command, <strong id="b177343793718"><a name="b177343793718"></a><a name="b177343793718"></a>bootargs</strong> is set to the serial port output, the baud rate is 115200, the data bit is 8, and the <strong id="b033817523412"><a name="b033817523412"></a><a name="b033817523412"></a>rootfs</strong> is mounted to the flash memory. The file system type is set to <strong id="b16149152018429"><a name="b16149152018429"></a><a name="b16149152018429"></a>jffs2 rw</strong>, which provides the read-write attribute for the JFFS2 file system.</p>
<p id="p1888191482518"><a name="p1888191482518"></a><a name="p1888191482518"></a><strong id="b14704195842212"><a name="b14704195842212"></a><a name="b14704195842212"></a>rootaddr=7 M rootsize=8 M</strong> indicates the actual start address and length of the <strong id="b1299173342420"><a name="b1299173342420"></a><a name="b1299173342420"></a>rootfs.img</strong> file to be burnt. The size must be the same as that of the compiled files in the HiTool.</p>
......@@ -115,5 +115,5 @@ Burn images to the Hi3518EV300 board over the serial port.
## 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](en-us_topic_0000001055366100.md).
Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/camera-control.md).
......@@ -4,7 +4,7 @@ This example shows how to use attention \(AT\) commands to complete WLAN module
## Acquiring Source Code<a name="section1545225464016"></a>
You need to acquire [Hi3861 source code](http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz) and download it on a Linux server. For more obtaining methods, see [Source Code Acquisition](../get-code/source-code-acquisition.md).
You need to acquire [Hi3861 source code](https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz) and download it on a Linux server. For more obtaining methods, see [Source Code Acquisition](en-us_topic_0000001050769927.md).
## Compiling Source Code<a name="section1736014117148"></a>
......
......@@ -144,5 +144,5 @@ wifi init success!
## Follow-up Learning<a name="section9712145420182"></a>
Congratulations! You have finished all steps! You are advised to go on learning how to develop [WLAN-connected products](../guide/overview.md).
Congratulations! You have finished all steps! You are advised to go on learning how to develop [WLAN-connected products](en-us_topic_0000001054530966.md).
......@@ -117,3 +117,57 @@
![](figures/en-us_image_0000001054875562.png)
**Problem 5:** **What should I do when no command output is displayed?**
- **Symptom**
The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**.
- **Possible Causes**
- The serial port is connected incorrectly.
- The U-boot of the board is damaged.
- **Solutions**
**Solution 1: 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 not, perform the following steps to change the serial port number.
**Figure 10** Procedure for changing the serial port number<a name="fig16441825145717"></a>
![](figures/procedure-for-changing-the-serial-port-number.png "procedure-for-changing-the-serial-port-number")
1. Disconnect from the current serial port.
2. Click **Settings**.
3. Change the serial port number in the dialog box and click **OK**.
4. Press **Enter** in the dialog box to check whether any command output is displayed after the connection is established.
**Solution 2: Burn the U-boot.**
If the fault persists after you perform the preceding operations, the U-boot of the board may be damaged. You can burn the U-boot by performing the following steps:
1. Obtain the U-boot file.
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>The U-boot file of the board can be obtained from **vendor\\hisi\\hi35xx\\hi3516dv300\\uboot\\out\\boot\\u-boot-hi3516dv300.bin** in the open-source package.
2. Use HiTool to burn the U-boot.
**Figure 11** Procedure for burning the U-boot using HiTool<a name="fig1353321514128"></a>
![](figures/未命名图片11111.png)
1. Select the COM7 serial port.
2. Select **Serial** for **Transfer Mode**.
3. Select **Burn Fastboot**.
4. Select **spi nor** for **Flash Type**.
5. Click **Browse** and select the corresponding U-boot file.
6. Click **Burn** to start burning.
3. Power off the board and then power it on. Connect the serial port after the burning is complete. Serial ports shown in the following figure are displayed after the U-boot is burnt.
**Figure 12** Serial port displayed after the U-boot is burnt<a name="fig155914681910"></a>
![](figures/serial-port-displayed-after-the-u-boot-is-burnt.png "serial-port-displayed-after-the-u-boot-is-burnt")
......@@ -8,14 +8,16 @@
- **Possible Causes**
- The serial port is connected incorrectly.
- The U-Boot of the board is damaged.
- The U-boot of the board is damaged.
- **Solutions**
**Solution 1: 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 not, perform the following steps to change the serial port number.
**Figure 1** Procedure for changing the serial port number<a name="fig16441825145717"></a>
![](figures/procedure-for-changing-the-serial-port-number.png "procedure-for-changing-the-serial-port-number")
![](figures/procedure-for-changing-the-serial-port-number-4.png "procedure-for-changing-the-serial-port-number-4")
1. Disconnect from the current serial port.
......@@ -23,32 +25,34 @@
3. Change the serial port number in the dialog box and click **OK**.
4. Press **Enter** in the dialog box to check whether any command output is displayed after the connection is established.
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:
**Solution 2: Burn the U-boot.**
If the fault persists after you perform the preceding operations, the U-boot of the board may be damaged. You can burn the U-boot by performing the following steps:
1. Obtain the U-Boot file.
1. Obtain the U-boot file.
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>The U-Boot file of the board can be obtained from **vendor\\hisi\\hi35xx\\hi3518ev300\\uboot\\out\\boot\\u-boot-hi3518ev300.bin** in the open-source package.
>The U-boot file of the board can be obtained from **vendor\\hisi\\hi35xx\\hi3518ev300\\uboot\\out\\boot\\u-boot-hi3518ev300.bin** in the open-source package.
2. Use HiTool to burn the U-Boot.
2. Use HiTool to burn the U-boot.
**Figure 2** Procedure for burning the U-Boot using HiTool<a name="fig1353321514128"></a>
**Figure 2** Procedure for burning the U-boot using HiTool<a name="fig1353321514128"></a>
![](figures/procedure-for-burning-the-u-boot-using-hitool.png "procedure-for-burning-the-u-boot-using-hitool")
1. Select the COM7 serial port.
2. Select **Serial** for **Transfer Mode**.
3. Select **Burn Fastboot**.
4. Select **spi nor** for **Flash Type**.
5. Click **Browse** and select the corresponding U-Boot file.
5. Click **Browse** and select the corresponding U-boot file.
6. Click **Burn** to start burning.
3. Power off the board and then power it on. Connect the serial port after the burning is complete. Serial ports shown in the following figure are displayed after the U-Boot is burnt.
3. Power off the board and then power it on. Connect the serial port after the burning is complete. Serial ports shown in the following figure are displayed after the U-boot is burnt.
**Figure 3** Serial port displayed after the U-Boot is burnt<a name="fig155914681910"></a>
![](figures/serial-port-displayed-after-the-u-boot-is-burnt.png "serial-port-displayed-after-the-u-boot-is-burnt")
**Figure 3** Serial port displayed after the U-boot is burnt<a name="fig155914681910"></a>
![](figures/serial-port-displayed-after-the-u-boot-is-burnt-5.png "serial-port-displayed-after-the-u-boot-is-burnt-5")
**Problem 2: What should I do when an error is reported when the U-Boot is burnt using HiTool?**
**Problem 2: What should I do when an error is reported when the U-boot is burnt using HiTool?**
- **Symptom**
......
......@@ -43,9 +43,9 @@ As the Hi3861 only offers 2 MB Flash and 352 KB RAM, use them efficiently when c
<tbody><tr id="r71f534ea66af4191b020408df5978f41"><td class="cellrowborder" valign="top" width="18.02%" headers="mcps1.2.3.1.1 "><p id="a0531f1bb62d5443880576cc5de23f2e6"><a name="a0531f1bb62d5443880576cc5de23f2e6"></a><a name="a0531f1bb62d5443880576cc5de23f2e6"></a>General specifications</p>
</td>
<td class="cellrowborder" valign="top" width="81.98%" headers="mcps1.2.3.1.2 "><a name="u2a0d06f28d454d30818ced9a0432211b"></a><a name="u2a0d06f28d454d30818ced9a0432211b"></a><ul id="u2a0d06f28d454d30818ced9a0432211b"><li>Operates over 1×1 2.4 GHz frequency band (ch1-ch14).</li><li>The physical layer (PHY) complies with the IEEE 802.11b/g/n protocol.</li><li>The media access control (MAC) layer complies with the IEEE802.11 d/e/h/i/k/v/w protocol.</li></ul>
<a name="ul1452913133017"></a><a name="ul1452913133017"></a><ul id="ul1452913133017"><li>Includes the built-in public address (PA) and local area network (LAN); integrates transmit-receive (Tx/Rx) switch and Balun. </li><li>Supports the station (STA) and access point (AP) modes. When the Hi3861 WLAN module functions as an AP, a maximum of six STAs are supported.</li><li>Supports WPA and WPA2 from WFA (personal), and WPS 2.0.</li><li>Supports three kinds of packet traffic arbiter (PTA) (2- , 3- , or 4-wire PTA), each of which coexists with the BT or BLE chip.</li><li>The input voltage ranges from 2.3 V to 3.6 V.</li></ul>
<a name="ul1452913133017"></a><a name="ul1452913133017"></a><ul id="ul1452913133017"><li>Includes the built-in public address (PA) and local area network (LAN); integrates transmit-receive (Tx/Rx) switch and Balun. </li><li>Supports the station (STA) and access point (AP) modes. When the Hi3861 WLAN module functions as an AP, a maximum of six STAs are supported.</li><li>Supports WPA and WPA2 from WFA (personal), and WPS 2.0.</li><li>Supports three kinds of packet traffic arbiter (PTA) (2-, 3-, or 4-wire PTA), each of which coexists with the BT or BLE chip.</li><li>The input voltage ranges from 2.3 V to 3.6 V.</li></ul>
<a name="ul15885141153113"></a><a name="ul15885141153113"></a><ul id="ul15885141153113"><li>The input/output (I/O) power voltage can be 1.8 V or 3.3 V.</li></ul>
<a name="ul128863113316"></a><a name="ul128863113316"></a><ul id="ul128863113316"><li>Supports self-calibration for RF hardware.</li><li>Performs with low power consumption:<a name="ul1588651114317"></a><a name="ul1588651114317"></a><ul id="ul1588651114317"><li>Ultra deep sleep mode: 5 μA@3.3</li><li>VDTIM1: 1.5mA@3.3V</li><li>DTIM3: 0.8mA@3.3V</li></ul>
<a name="ul128863113316"></a><a name="ul128863113316"></a><ul id="ul128863113316"><li>Supports self-calibration for RF hardware.</li><li>Performs with low power consumption:<a name="ul1588651114317"></a><a name="ul1588651114317"></a><ul id="ul1588651114317"><li>Ultra deep sleep mode: 5 μA @ 3.3 V</li><li>DTIM1: 1.5 mA @ 3.3 V</li><li>DTIM3: 0.8 mA @ 3.3 V</li></ul>
</li></ul>
</td>
</tr>
......
......@@ -67,7 +67,7 @@ The following table describes the tools required for setting up the general envi
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p1219863434519"><a name="p1219863434519"></a><a name="p1219863434519"></a>Executes script cross compilation.</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p165031126103215"><a name="p165031126103215"></a><a name="p165031126103215"></a><a href="http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p14145637348"><a name="p14145637348"></a><a name="p14145637348"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz</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>
......@@ -102,14 +102,14 @@ The following table describes the tools required for setting up the general envi
</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>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar</a></p>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar</a></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>
</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>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p377581023312"><a name="p377581023312"></a><a name="p377581023312"></a><a href="http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
<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>
</tr>
</tbody>
......@@ -298,7 +298,7 @@ sudo ln -s /bin/bash /bin/sh
## Installing gn<a name="section2024354014506"></a>
1. Start a Linux server.
2. Download [gn](https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest).
2. Download [gn](https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar).
3. Decompress the **gn** installation package to the **tar -xvf gn.1523.tar -C \~/** in **\~/gn** directory.
4. Open the **\~/.bashrc** file in Vim and add a line of **export PATH=\~/gn:$PATH** to set an environment variable.
5. Run **source \~/.bashrc** to validate the environment variable.
......@@ -306,7 +306,7 @@ sudo ln -s /bin/bash /bin/sh
## Installing ninjah<a name="section182441140185010"></a>
1. Start a Linux server.
2. Download [ninja](https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip).
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 **tar -xvf ninja.1.9.0.tar -C \~/** in **\~/ninja** directory.
4. Open the **\~/.bashrc** file in Vim and add a line of **export PATH=\~/ninja:$PATH** to set an environment variable.
5. Run **source \~/.bashrc** to validate the environment variable.
......@@ -317,7 +317,7 @@ sudo ln -s /bin/bash /bin/sh
>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.**
1. Start a Linux server.
2. Download [gcc\_riscv32](http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz).
2. Download [gcc\_riscv32](https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz).
3. Decompress the gcc\_riscv32 installation package to **tar -xvf gcc\_riscv32-linux-7.3.0.tar.gz -C \~/** in **/opt/gcc\_riscv32**.
4. Open the **\~/.bashrc** file in Vim and add a line of **export PATH=\~/gcc\_riscv32/bin:$PATH** to set an environment variable.
5. Run **source \~/.bashrc** to validate the environment variable.
......
......@@ -63,61 +63,61 @@ The following table describes the common tools required for Linux and how to obt
**Table 2** Development tools and obtaining methods
<a name="table6299192712513"></a>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.1"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>Development Tool</p>
<table><thead align="left"><tr id="row122993276512"><th class="cellrowborder" valign="top" width="13.081308130813083%" id="mcps1.2.4.1.1"><p id="p1829914271858"><a name="p1829914271858"></a><a name="p1829914271858"></a>Development Tool</p>
</th>
<th class="cellrowborder" valign="top" width="33.33333333333333%" 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="19.921992199219922%" 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="33.33333333333333%" 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="66.996699669967%" 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="row430016273514"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p330015271158"><a name="p330015271158"></a><a name="p330015271158"></a>Python3.7+</p>
<tbody><tr id="row430016273514"><td class="cellrowborder" valign="top" width="13.081308130813083%" 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="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p43003270510"><a name="p43003270510"></a><a name="p43003270510"></a>Runs the compilation scripts.</p>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p43003270510"><a name="p43003270510"></a><a name="p43003270510"></a>Runs the compilation scripts.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p18254155164617"><a name="p18254155164617"></a><a name="p18254155164617"></a><a href="https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz" target="_blank" rel="noopener noreferrer">https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p18254155164617"><a name="p18254155164617"></a><a name="p18254155164617"></a><a href="https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz" target="_blank" rel="noopener noreferrer">https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz</a></p>
</td>
</tr>
<tr id="row42668197206"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p426711912014"><a name="p426711912014"></a><a name="p426711912014"></a>bash</p>
<tr id="row42668197206"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p426711912014"><a name="p426711912014"></a><a name="p426711912014"></a>bash</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p14267131962014"><a name="p14267131962014"></a><a name="p14267131962014"></a>Executes commands.</p>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p14267131962014"><a name="p14267131962014"></a><a name="p14267131962014"></a>Executes commands.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p14267101962014"><a name="p14267101962014"></a><a name="p14267101962014"></a>Internet</p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p14267101962014"><a name="p14267101962014"></a><a name="p14267101962014"></a>Internet</p>
</td>
</tr>
<tr id="row1711946154018"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p15588165684216"><a name="p15588165684216"></a><a name="p15588165684216"></a>gn</p>
<tr id="row1711946154018"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p15588165684216"><a name="p15588165684216"></a><a name="p15588165684216"></a>gn</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" 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="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p4588135634213"><a name="p4588135634213"></a><a name="p4588135634213"></a>Generates ninja compilation scripts.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar</a></p>
</td>
</tr>
<tr id="row16990164213404"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p1858825613428"><a name="p1858825613428"></a><a name="p1858825613428"></a>ninja</p>
<tr id="row16990164213404"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p1858825613428"><a name="p1858825613428"></a><a name="p1858825613428"></a>ninja</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" 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="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p15844174611816"><a name="p15844174611816"></a><a name="p15844174611816"></a>Executes ninja compilation scripts.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p377581023312"><a name="p377581023312"></a><a name="p377581023312"></a><a href="http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" 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>
</tr>
<tr id="row192161027104010"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p15217227174016"><a name="p15217227174016"></a><a name="p15217227174016"></a>LLVM</p>
<tr id="row192161027104010"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p15217227174016"><a name="p15217227174016"></a><a name="p15217227174016"></a>LLVM</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>Functions as the compiler toolchain.</p>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>Functions as the compiler toolchain.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p12127241115612"><a name="p12127241115612"></a><a name="p12127241115612"></a><a href="http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p0191147134415"><a name="p0191147134415"></a><a name="p0191147134415"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar</a></p>
</td>
</tr>
<tr id="row18516509507"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p14521650135017"><a name="p14521650135017"></a><a name="p14521650135017"></a>hc-gen</p>
<tr id="row18516509507"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p14521650135017"><a name="p14521650135017"></a><a name="p14521650135017"></a>hc-gen</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p125255010501"><a name="p125255010501"></a><a name="p125255010501"></a>Configures and compiles files.</p>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p125255010501"><a name="p125255010501"></a><a name="p125255010501"></a>Configures and compiles files.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p4381131720413"><a name="p4381131720413"></a><a name="p4381131720413"></a><a href="http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p145061517114519"><a name="p145061517114519"></a><a name="p145061517114519"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar</a></p>
</td>
</tr>
<tr id="row105773499422"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p15300102717517"><a name="p15300102717517"></a><a name="p15300102717517"></a>IPOP, PuTTY, or other HyperTerminal software</p>
<tr id="row105773499422"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p15300102717517"><a name="p15300102717517"></a><a name="p15300102717517"></a>IPOP, PuTTY, or other HyperTerminal software</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p109418530386"><a name="p109418530386"></a><a name="p109418530386"></a>Connects to the Linux server (choose one of the terminals).</p>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p109418530386"><a name="p109418530386"></a><a name="p109418530386"></a>Connects to the Linux server (choose one of the terminals).</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p7312122523813"><a name="p7312122523813"></a><a name="p7312122523813"></a>Internet (for example, <a href="https://www.putty.org/" target="_blank" rel="noopener noreferrer">https://www.putty.org/</a>)</p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p7312122523813"><a name="p7312122523813"></a><a name="p7312122523813"></a>Internet (for example, <a href="https://www.putty.org/" target="_blank" rel="noopener noreferrer">https://www.putty.org/</a>)</p>
</td>
</tr>
</tbody>
......@@ -152,6 +152,13 @@ The following table describes the common tools required for Linux and how to obt
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p16788135433519"><a name="p16788135433519"></a><a name="p16788135433519"></a><a href="https://device.harmonyos.com/cn/ide" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide</a></p>
</td>
</tr>
<tr id="row163800597267"><td class="cellrowborder" valign="top" width="16.371637163716375%" headers="mcps1.2.4.1.1 "><p id="p34662001270"><a name="p34662001270"></a><a name="p34662001270"></a>HiTool</p>
</td>
<td class="cellrowborder" valign="top" width="50.29502950295029%" headers="mcps1.2.4.1.2 "><p id="p201334121092"><a name="p201334121092"></a><a name="p201334121092"></a>Burns the images and the U-boot.</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p108615410278"><a name="p108615410278"></a><a name="p108615410278"></a><a href="http://www.hihope.org/download" target="_blank" rel="noopener noreferrer">http://www.hihope.org/download</a></p>
</td>
</tr>
</tbody>
</table>
......@@ -253,7 +260,7 @@ sudo ln -s /bin/bash /bin/sh
## Installing gn<a name="section1737610811213"></a>
1. Start a Linux server.
2. Download [gn](https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+/latest).
2. Download [gn](https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar).
3. Decompress the **gn** installation package to the **tar -xvf gn.1523.tar -C \~/** in **\~/gn** directory.
4. Open the **\~/.bashrc** file in Vim and add a line of **export PATH=\~/gn:$PATH** to set an environment variable.
5. Run **source \~/.bashrc** to validate the environment variable.
......@@ -261,7 +268,7 @@ sudo ln -s /bin/bash /bin/sh
## Installing ninjah<a name="section103777819124"></a>
1. Start a Linux server.
2. Download [ninja](https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip).
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 **tar -xvf ninja.1.9.0.tar -C \~/** in **\~/ninja** directory.
4. Open the **\~/.bashrc** file in Vim and add a line of **export PATH=\~/ninja:$PATH** to set an environment variable.
5. Run **source \~/.bashrc** to validate the environment variable.
......@@ -269,7 +276,7 @@ sudo ln -s /bin/bash /bin/sh
## Installing the LLVM Toolchain<a name="section11613193644213"></a>
1. Start a Linux server.
2. Download [http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar](http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar).
2. Download [LLVM](http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar).
3. Decompress the LLVM installation package to the **\~/llvm** path by running **"tar -xvf llvm-linux-9.0.0-34042.tar -C \~/"**.
4. Open the **\~/.bashrc** file in Vim and add a line of **export PATH=\~/llvm/bin:$PATH** to set an environment variable.
5. Run **source \~/.bashrc** to validate the environment variable.
......@@ -277,8 +284,8 @@ sudo ln -s /bin/bash /bin/sh
## Installing hc-gen<a name="section139624410163"></a>
1. Start a Linux server.
2. Download [http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar](http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar).
3. Decompress the hc-gen installation package to the **\~/hc-gen** directory on the Linux server.
2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar).
3. Decompress the hc-gen installation package to **tar -xvf hc-gen-0.65-linux.tar -C \~/** in **\~/hc-gen** on the Linux.
4. Open the **\~/.bashrc** file in Vim and add a line of **export PATH=\~/hc-gen:$PATH** to set an environment variable.
5. Run **source \~/.bashrc** to validate the environment variable.
......@@ -36,16 +36,16 @@ OpenHarmony是HarmonyOS的开源版,由华为捐赠给开放原子开源基金
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p79291938252"><a name="p79291938252"></a><a name="p79291938252"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p10929236258"><a name="p10929236258"></a><a name="p10929236258"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点1</a><a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p10929236258"><a name="p10929236258"></a><a name="p10929236258"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p992993202517"><a name="p992993202517"></a><a name="p992993202517"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA256 校验码</a></p>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p992993202517"><a name="p992993202517"></a><a name="p992993202517"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA256 校验码</a></p>
</td>
</tr>
<tr id="row6929934252"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.2.5.1.1 "><p id="p0929163132512"><a name="p0929163132512"></a><a name="p0929163132512"></a>Hi3861解决方案(二进制)</p>
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p392913162517"><a name="p392913162517"></a><a name="p392913162517"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p592912312511"><a name="p592912312511"></a><a name="p592912312511"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/wifiiot-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点1</a><a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/wifiiot-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p592912312511"><a name="p592912312511"></a><a name="p592912312511"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/wifiiot-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p199296318252"><a name="p199296318252"></a><a name="p199296318252"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/wifiiot-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA256 校验码</a></p>
</td>
......@@ -54,25 +54,25 @@ OpenHarmony是HarmonyOS的开源版,由华为捐赠给开放原子开源基金
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p49291935254"><a name="p49291935254"></a><a name="p49291935254"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1792943152517"><a name="p1792943152517"></a><a name="p1792943152517"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点1</a><a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1792943152517"><a name="p1792943152517"></a><a name="p1792943152517"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1392983162514"><a name="p1392983162514"></a><a name="p1392983162514"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA256 校验码</a></p>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1392983162514"><a name="p1392983162514"></a><a name="p1392983162514"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3518ev300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA256 校验码</a></p>
</td>
</tr>
<tr id="row199306317255"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.2.5.1.1 "><p id="p1693063122511"><a name="p1693063122511"></a><a name="p1693063122511"></a>Hi3516解决方案(二进制)</p>
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p169301335252"><a name="p169301335252"></a><a name="p169301335252"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1393012302510"><a name="p1393012302510"></a><a name="p1393012302510"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点1</a><a href="https://mirrors.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p1393012302510"><a name="p1393012302510"></a><a name="p1393012302510"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1393083102517"><a name="p1393083102517"></a><a name="p1393083102517"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA256 校验码</a></p>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p1393083102517"><a name="p1393083102517"></a><a name="p1393083102517"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/ipcamera_hi3516dv300-1.0.tar.gz.sha256" target="_blank" rel="noopener noreferrer">SHA256 校验码</a></p>
</td>
</tr>
<tr id="row13795111119551"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.2.5.1.1 "><p id="p679516111552"><a name="p679516111552"></a><a name="p679516111552"></a>RELEASE-NOTES</p>
</td>
<td class="cellrowborder" valign="top" width="16.14%" headers="mcps1.2.5.1.2 "><p id="p13796201120553"><a name="p13796201120553"></a><a name="p13796201120553"></a>1.0</p>
</td>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p8796911155518"><a name="p8796911155518"></a><a name="p8796911155518"></a><a href="http://tools.harmonyos.com/mirrors/os/1.0/RELEASE-NOTES.txt" target="_blank" rel="noopener noreferrer">站点1</a></p>
<td class="cellrowborder" valign="top" width="24.759999999999998%" headers="mcps1.2.5.1.3 "><p id="p8796911155518"><a name="p8796911155518"></a><a name="p8796911155518"></a><a href="https://repo.huaweicloud.com/harmonyos/os/1.0/RELEASE-NOTES.txt" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="34.1%" headers="mcps1.2.5.1.4 "><p id="p16796011205518"><a name="p16796011205518"></a><a name="p16796011205518"></a>-</p>
</td>
......@@ -240,7 +240,7 @@ repo sync -c
方式二:通过git clone单个代码仓库
进入代码仓库主页:[https://gitee.com/openharmony](https://gitee.com/openharmony),选择需要克隆的代码仓库,执行命令,如:
进入代码仓库主页:https://gitee.com/openharmony,选择需要克隆的代码仓库,执行命令,如:
```
git clone https://gitee.com/openharmony/manifest.git -b master
......
......@@ -21,7 +21,7 @@
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="zh-cn_topic_0000001055701144_p47941224122519"><a name="zh-cn_topic_0000001055701144_p47941224122519"></a><a name="zh-cn_topic_0000001055701144_p47941224122519"></a>9.0.0-34042</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p1379532412256"><a name="zh-cn_topic_0000001055701144_p1379532412256"></a><a name="zh-cn_topic_0000001055701144_p1379532412256"></a><a href="http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">站点1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p1379532412256"><a name="zh-cn_topic_0000001055701144_p1379532412256"></a><a name="zh-cn_topic_0000001055701144_p1379532412256"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="zh-cn_topic_0000001055701144_p15795112414255"><a name="zh-cn_topic_0000001055701144_p15795112414255"></a><a name="zh-cn_topic_0000001055701144_p15795112414255"></a>64a518b50422b6f1ba8f6f56a5e303fb8448a311211ba10c385ad307a1d2546f</p>
</td>
......@@ -30,7 +30,7 @@
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="zh-cn_topic_0000001055701144_p1679522412514"><a name="zh-cn_topic_0000001055701144_p1679522412514"></a><a name="zh-cn_topic_0000001055701144_p1679522412514"></a>7.3.0</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p13795192412258"><a name="zh-cn_topic_0000001055701144_p13795192412258"></a><a name="zh-cn_topic_0000001055701144_p13795192412258"></a><a href="http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">站点1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p13795192412258"><a name="zh-cn_topic_0000001055701144_p13795192412258"></a><a name="zh-cn_topic_0000001055701144_p13795192412258"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="zh-cn_topic_0000001055701144_p7795124152510"><a name="zh-cn_topic_0000001055701144_p7795124152510"></a><a name="zh-cn_topic_0000001055701144_p7795124152510"></a>614ee086ead1a4fd7384332b85dd62707801f323de60dfdb61503f473d470a24</p>
</td>
......@@ -39,7 +39,7 @@
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="zh-cn_topic_0000001055701144_p127951624182514"><a name="zh-cn_topic_0000001055701144_p127951624182514"></a><a name="zh-cn_topic_0000001055701144_p127951624182514"></a>1523</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p47957245252"><a name="zh-cn_topic_0000001055701144_p47957245252"></a><a name="zh-cn_topic_0000001055701144_p47957245252"></a><a href="http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">站点1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p47957245252"><a name="zh-cn_topic_0000001055701144_p47957245252"></a><a name="zh-cn_topic_0000001055701144_p47957245252"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="zh-cn_topic_0000001055701144_p9795192402516"><a name="zh-cn_topic_0000001055701144_p9795192402516"></a><a name="zh-cn_topic_0000001055701144_p9795192402516"></a>50a5a5ba5877dd0ec8afcb23d3dd4d966a16403c29cd80a4002230241d32ef34</p>
</td>
......@@ -48,7 +48,7 @@
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="zh-cn_topic_0000001055701144_p17952245256"><a name="zh-cn_topic_0000001055701144_p17952245256"></a><a name="zh-cn_topic_0000001055701144_p17952245256"></a>1.9.0</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p12796172442519"><a name="zh-cn_topic_0000001055701144_p12796172442519"></a><a name="zh-cn_topic_0000001055701144_p12796172442519"></a><a href="http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">站点1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p12796172442519"><a name="zh-cn_topic_0000001055701144_p12796172442519"></a><a name="zh-cn_topic_0000001055701144_p12796172442519"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="zh-cn_topic_0000001055701144_p479692492515"><a name="zh-cn_topic_0000001055701144_p479692492515"></a><a name="zh-cn_topic_0000001055701144_p479692492515"></a>b4a4ba21e94ff77634e1f88697a00b6f498fdbc0b40d7649df1b246b285874f9</p>
</td>
......@@ -57,7 +57,7 @@
</td>
<td class="cellrowborder" valign="top" width="13.74%" headers="mcps1.2.5.1.2 "><p id="zh-cn_topic_0000001055701144_p8796424152514"><a name="zh-cn_topic_0000001055701144_p8796424152514"></a><a name="zh-cn_topic_0000001055701144_p8796424152514"></a>0.65</p>
</td>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p7796624192517"><a name="zh-cn_topic_0000001055701144_p7796624192517"></a><a name="zh-cn_topic_0000001055701144_p7796624192517"></a><a href="http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">站点1</a> <a href="https://mirrors.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">站点2</a></p>
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.2.5.1.3 "><p id="zh-cn_topic_0000001055701144_p7796624192517"><a name="zh-cn_topic_0000001055701144_p7796624192517"></a><a name="zh-cn_topic_0000001055701144_p7796624192517"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">站点</a></p>
</td>
<td class="cellrowborder" valign="top" width="61.3%" headers="mcps1.2.5.1.4 "><p id="zh-cn_topic_0000001055701144_p679682402514"><a name="zh-cn_topic_0000001055701144_p679682402514"></a><a name="zh-cn_topic_0000001055701144_p679682402514"></a>fcfee489371947a464fe41a4b45a897b9a44155891a957f15bad2e157c750162</p>
</td>
......
# 示例开发<a name="ZH-CN_TOPIC_0000001055086133"></a>
相机开发基本概念可参考:[相机开发概述](zh-cn_topic_0000001051690589.md)
相机开发基本概念可参考:[相机开发概述](../subsystems/相机开发概述.md)
若开发者想先查看示例效果,可先跳过本节,进入[应用实例](应用实例.md)。如需自定义应用行为,可参考本节描述对示例代码进行修改。
......
......@@ -4,7 +4,7 @@
## 源码获取<a name="section1545225464016"></a>
开发者需要在Linux服务器上下载一套源代码,获取Hi3861源码([下载链接](http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz))。更多源码获取方式,请见[源码获取](../get-code/源码获取.md)
开发者需要在Linux服务器上下载一套源代码,获取Hi3861源码([下载链接](https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz))。更多源码获取方式,请见[源码获取](../get-code/源码获取.md)
## 源码编译<a name="section1736014117148"></a>
......@@ -66,7 +66,7 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,
1. 在Baud rate中选择合适的波特率,波特率越高烧写速度越快,此处建议使用921600。
2. 在Data bit中选择数据位,WLAN模组默认为8,此处与其保持一致即可。
3. 选择版本包路径“./out/wifiiot/Hi3861\_wifiiot\_app\_allinone.bin”。
3. 选择版本包路径“./out/wifiiot/Hi3861\_wifiiot\_app\_allinone.bin”,选择Mode为“Hiburn”
4. 点击Save保存配置。
**图 8** 波特率和数据位配置示意图<a name="fig4315145184815"></a>
......@@ -75,7 +75,7 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,
**图 9** 烧录包路径示意图<a name="fig105491550185115"></a>
![](figures/zh-cn_image_0000001054087868.png)
![](figures/zh-cn_image_0000001055427138.png)
4. 在DecEco工具界面中单击“烧录”按钮![](figures/zh-cn_image_0000001054443694.png),然后选择烧录串口“COM11”。
......@@ -97,24 +97,34 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,
## WLAN模组联网<a name="section168257461059"></a>
完成版本构建及烧录后,下面开始介绍如何在DevEco的串口终端上执行AT命令,使WLAN模组联网。
完成版本构建及烧录后,下面开始介绍如何在串口终端上执行AT命令,使WLAN模组联网。
1. 保持Windows工作台和WLAN模组的连接状态,在DevEco工具最下方,点击“Serial port”按钮,弹出串口终端的配置界面。
>![](public_sys-resources/icon-note.gif) **说明:**
>- DevEco串口连接功能待上线,敬请期待。
>- 该样例中使用IPOP(或其他)串口工具进行演示,IPOP工具请开发者通过互联网获取。
**图 13** 打开DevEco串口终端示意图<a name="fig749694135716"></a>
![](figures/打开DevEco串口终端示意图.png "打开DevEco串口终端示意图")
1. 通过USB线,连接Windows工作台和Hi3861开发板,确认待连接串口为COM11,如下图所示。
2. 选择串口,并完成参数配置。根据实际情况输入串口号,此处为“COM11”;波特率、数据位、停止位使用默认值;由于AT命令输入需要以“\\r\\n”结尾,否则输入无效,所以结束符处输入“1”。
**图 13** 设备管理器的COM示意图<a name="fig1896113112349"></a>
![](figures/zh-cn_image_0000001055268090.png)
2. 在Windows工作台上,使用IPOP工具,连接WLAN模组串口(COM11),并配置好波特率115200,同时勾选Newline,确保输入字符串以"\\r\\n"结尾,避免AT命令无法输入。
**图 14** IPOP连接配置示意图<a name="fig143024270340"></a>
![](figures/zh-cn_image_0000001055427946.png)
**图 14** 串口参数配置示意图<a name="fig179371422175815"></a>
![](figures/串口参数配置示意图.png "串口参数配置示意图")
3. 复位WLAN模组,终端界面显示“ready to OS start”,则启动成功。
3. 复位WLAN模组,观察到终端界面“ready to OS start”日志打印,启动成功。
**图 15** WLAN复位成功示意图<a name="fig496084516332"></a>
**图 15** 复位WLAN模组示意图<a name="fig227819127594"></a>
![](figures/复位WLAN模组示意图.png "复位WLAN模组示意图")
![](figures/zh-cn_image_0000001055148043.png)
4.DevEco的串口终端,依次执行如下AT命令,完成启动STA,连接指定AP,开启dhcp
4.IPOP串口终端中,依次执行如下AT命令,启动STA模式,连接指定AP热点,并开启DHCP功能
```
AT+STARTSTA - 启动STA模式
......@@ -125,9 +135,16 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成,
AT+DHCP=wlan0,1 - 通过DHCP向AP请求wlan0的IP地址
```
5. 接口已分配IP,并与网关联通正常。
5. 查看WLAN模组与网关联通是否正常,如下图所示。
```
AT+IFCFG - 查看模组接口IP
AT+PING=X.X.X.X - 检查模组与网关的联通性,其中X.X.X.X需替换为实际的网关地址
```
**图 16** WLAN模组联网成功示意图<a name="fig1166371318339"></a>
**图 16** WLAN模组联网成功示意图<a name="fig834919451597"></a>
![](figures/WLAN模组联网成功示意图.png "WLAN模组联网成功示意图")
![](figures/zh-cn_image_0000001055428072.png)
......@@ -120,3 +120,57 @@
![](figures/zh-cn_image_0000001054875562.png)
**问题 5:串口无回显。**
- **现象描述**
串口显示已连接,重启单板后,回车无任何回显。
- **可能原因**
- 串口连接错误。
- 单板U-boot被损坏。
- **解决办法**
**解决办法1:修改串口号**
请查看设备管理器,确认连接单板的串口与终端中连接串口是否一致,若不一致,请按步骤修改串口号。
**图 10** 修改串口号图示<a name="fig16441825145717"></a>
![](figures/修改串口号图示.png "修改串口号图示")
1. 断开当前串口。
2. 点击设置按钮。
3. 在弹框中修改串口号并点击OK。
4. 连接后在对话框中输入回车查看是否存在回显。
**解决办法2:烧写U-boot**
若上述步骤依旧无法连接串口,可能由于单板U-boot损坏,按下述步骤烧写U-boot。
1. 获取引导文件U-boot。
>![](public_sys-resources/icon-notice.gif) **须知:**
>单板的U-boot文件请在开源包中获取,路径为vendor\\hisi\\hi35xx\\hi3516dv300\\uboot\\out\\boot\\u-boot-hi3516dv300.bin
2. 使用HiTool工具按照标号选择U-boot烧写选项,点击烧写按钮。
**图 11** HiTool工具U-boot烧写步骤图<a name="fig1353321514128"></a>
![](figures/未命名图片11111.png)
1. 选择单板串口COM7。
2. 选择Transfer Mode为Serial。
3. 选择Burn Fastboot标签。
4. 选择Flash Type为spi nor。
5. 选择Browse,找到对应U-boot文件。
6. 点击Burn开始烧写。
3. 提示下电并给单板重新上电,烧写完成后,连接串口,如下图所示。
**图 12** HiTool工具U-boot烧写完成串口显示<a name="fig155914681910"></a>
![](figures/HiTool工具U-boot烧写完成串口显示.png "HiTool工具U-boot烧写完成串口显示")
......@@ -12,10 +12,12 @@
- **解决办法**
**解决办法1:修改串口号**
请查看设备管理器,确认连接单板的串口与终端中连接串口是否一致,若不一致,请按步骤修改串口号。
**图 1** 修改串口号图示<a name="fig16441825145717"></a>
![](figures/修改串口号图示.png "修改串口号图示")
![](figures/修改串口号图示-3.png "修改串口号图示-3")
1. 断开当前串口。
......@@ -23,7 +25,9 @@
3. 在弹框中修改串口号并点击OK。
4. 连接后在对话框中输入回车查看是否存在回显。
若上述步骤依旧无法连接串口,可能由于单板U-boot损坏,按下述步骤烧写U-Boot。
**解决办法2:烧写U-boot**
若上述步骤依旧无法连接串口,可能由于单板U-boot损坏,按下述步骤烧写U-boot。
1. 获取引导文件U-boot。
......@@ -39,13 +43,13 @@
2. 选择Transfer Mode为Serial。
3. 选择Burn Fastboot标签。
4. 选择Flash Type为spi nor。
5. 选择Browse,找到对应U-Boot文件。
5. 选择Browse,找到对应U-boot文件。
6. 点击Burn开始烧写。
3. 提示下电并给单板重新上电,烧写完成后,连接串口,如下图所示。
**图 3** HiTool工具U-boot烧写完成串口显示<a name="fig155914681910"></a>
![](figures/HiTool工具U-boot烧写完成串口显示.png "HiTool工具U-boot烧写完成串口显示")
![](figures/HiTool工具U-boot烧写完成串口显示-4.png "HiTool工具U-boot烧写完成串口显示-4")
**问题 2:HiTool工具烧写时上报如下错误。**
......
......@@ -4,7 +4,7 @@
## 获取源码<a name="section215953714245"></a>
开发者需要在Linux服务器上下载一套源代码,获取Hi3516源码([下载链接](http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz))。更多源码获取方式,请见[源码获取](../get-code/源码获取.md)
开发者需要在Linux服务器上下载一套源代码,获取Hi3516源码([下载链接](https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz))。更多源码获取方式,请见[源码获取](../get-code/源码获取.md)
## 修改应用程序<a name="s8efc1952ebfe4d1ea717182e108c29bb"></a>
......@@ -114,6 +114,9 @@ python build.py ipcamera_hi3516dv300 -b debug
1. 连接串口。
>![](public_sys-resources/icon-notice.gif) **须知:**
>若无法连接串口,请参考常见问题5进行排查。
**图 9** 连接串口图<a name="fig056645018495"></a>
......
......@@ -419,6 +419,9 @@
1. 连接串口。
>![](public_sys-resources/icon-notice.gif) **须知:**
>若无法连接串口,请参考常见问题5进行排查。
**图 1** 连接串口图<a name="zh-cn_topic_0000001052906247_fig056645018495"></a>
......
......@@ -4,7 +4,7 @@
## 获取源码<a name="section1726092873119"></a>
开发者需要在Linux服务器上下载一套源代码,获取Hi3518源码([下载链接](http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz))。更多源码获取方式,请见[源码获取](../get-code/源码获取.md)
开发者需要在Linux服务器上下载一套源代码,获取Hi3518源码([下载链接](https://repo.huaweicloud.com/harmonyos/os/1.0/code-1.0.tar.gz))。更多源码获取方式,请见[源码获取](../get-code/源码获取.md)
## 修改应用程序<a name="s8efc1952ebfe4d1ea717182e108c29bb"></a>
......@@ -115,5 +115,5 @@ Hi3518EV300单板请使用串口烧写。
## 下一步学习<a name="section9712145420182"></a>
恭喜您,已完成Hi3518的快速上手!建议您下一步进入[无屏摄像头产品开发](zh-cn_topic_0000001055366100.md)的学习 。
恭喜您,已完成Hi3518的快速上手!建议您下一步进入[无屏摄像头产品开发](../guide/摄像头控制.md)的学习 。
......@@ -89,28 +89,28 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p4588135634213"><a name="p4588135634213"></a><a name="p4588135634213"></a>产生ninja编译脚本</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar</a></p>
</td>
</tr>
<tr id="row16990164213404"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p1858825613428"><a name="p1858825613428"></a><a name="p1858825613428"></a>ninja</p>
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p15844174611816"><a name="p15844174611816"></a><a name="p15844174611816"></a>执行ninja编译脚本</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p377581023312"><a name="p377581023312"></a><a name="p377581023312"></a><a href="http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" 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>
</tr>
<tr id="row192161027104010"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p15217227174016"><a name="p15217227174016"></a><a name="p15217227174016"></a>LLVM</p>
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p122171727184019"><a name="p122171727184019"></a><a name="p122171727184019"></a>编译工具链</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p12127241115612"><a name="p12127241115612"></a><a name="p12127241115612"></a><a href="http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p0191147134415"><a name="p0191147134415"></a><a name="p0191147134415"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar</a></p>
</td>
</tr>
<tr id="row18516509507"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p14521650135017"><a name="p14521650135017"></a><a name="p14521650135017"></a>hc-gen</p>
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="p125255010501"><a name="p125255010501"></a><a name="p125255010501"></a>驱动配置编译工具</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p4381131720413"><a name="p4381131720413"></a><a name="p4381131720413"></a><a href="http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="p145061517114519"><a name="p145061517114519"></a><a name="p145061517114519"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar</a></p>
</td>
</tr>
<tr id="row105773499422"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="p15300102717517"><a name="p15300102717517"></a><a name="p15300102717517"></a>IPOP、PuTTY或其他超级终端</p>
......@@ -152,6 +152,13 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p16788135433519"><a name="p16788135433519"></a><a name="p16788135433519"></a><a href="https://device.harmonyos.com/cn/ide" target="_blank" rel="noopener noreferrer">https://device.harmonyos.com/cn/ide</a></p>
</td>
</tr>
<tr id="row163800597267"><td class="cellrowborder" valign="top" width="16.371637163716375%" headers="mcps1.2.4.1.1 "><p id="p34662001270"><a name="p34662001270"></a><a name="p34662001270"></a>HiTool工具</p>
</td>
<td class="cellrowborder" valign="top" width="50.29502950295029%" headers="mcps1.2.4.1.2 "><p id="p201334121092"><a name="p201334121092"></a><a name="p201334121092"></a>U-boot,镜像文件烧写工具</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p108615410278"><a name="p108615410278"></a><a name="p108615410278"></a><a href="http://www.hihope.org/download" target="_blank" rel="noopener noreferrer">http://www.hihope.org/download</a></p>
</td>
</tr>
</tbody>
</table>
......@@ -256,7 +263,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装gn<a name="section1737610811213"></a>
1. 打开Linux编译服务器终端。
2. [下载gn工具](http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar)
2. [下载gn工具](https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar)
3. 解压gn安装包至\~/gn路径下:"tar -xvf gn.1523.tar -C \~/"。
4. 设置环境变量:"vim \~/.bashrc", 新增:"export PATH=\~/gn:$PATH"。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -264,7 +271,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装ninja<a name="section103777819124"></a>
1. 打开Linux编译服务器终端
2. [下载ninja工具](http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar)
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", 新增:"export PATH=\~/ninja:$PATH"。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -272,7 +279,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装LLVM编译工具链<a name="section11613193644213"></a>
1. 打开Linux编译服务器终端。
2. [下载LLVM工具](http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar)
2. [下载LLVM工具](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar)
3. 解压LLVM安装包至\~/llvm路径下:"tar -xvf llvm-linux-9.0.0-34042.tar -C \~/"。
4. 设置环境变量:"vim \~/.bashrc", 新增:export PATH=\~/llvm/bin:$PATH。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -280,8 +287,8 @@ sudo ln -s /bin/bash /bin/sh
## 安装hc-gen<a name="section139624410163"></a>
1. 打开Linux编译服务器终端。
2. [下载hc-gen工具](http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar)
3. 解压hc-gen安装包到Linux服务器\~/hc-gen路径下。
2. [下载hc-gen工具](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar)
3. 解压hc-gen安装包到Linux服务器\~/hc-gen路径下:"tar -xvf hc-gen-0.65-linux.tar -C \~/"
4. 设置环境变量:"vim \~/.bashrc", 新增:export PATH=\~/hc-gen:$PATH。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -84,28 +84,28 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="zh-cn_topic_0000001054501981_p4588135634213"><a name="zh-cn_topic_0000001054501981_p4588135634213"></a><a name="zh-cn_topic_0000001054501981_p4588135634213"></a>产生ninja编译脚本</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p10572194318318"><a name="zh-cn_topic_0000001054501981_p10572194318318"></a><a name="zh-cn_topic_0000001054501981_p10572194318318"></a><a href="http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p10572194318318"><a name="zh-cn_topic_0000001054501981_p10572194318318"></a><a name="zh-cn_topic_0000001054501981_p10572194318318"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar</a></p>
</td>
</tr>
<tr id="zh-cn_topic_0000001054501981_row16990164213404"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="zh-cn_topic_0000001054501981_p1858825613428"><a name="zh-cn_topic_0000001054501981_p1858825613428"></a><a name="zh-cn_topic_0000001054501981_p1858825613428"></a>ninja</p>
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="zh-cn_topic_0000001054501981_p15844174611816"><a name="zh-cn_topic_0000001054501981_p15844174611816"></a><a name="zh-cn_topic_0000001054501981_p15844174611816"></a>执行ninja编译脚本</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p377581023312"><a name="zh-cn_topic_0000001054501981_p377581023312"></a><a name="zh-cn_topic_0000001054501981_p377581023312"></a><a href="http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p1923373393515"><a name="zh-cn_topic_0000001054501981_p1923373393515"></a><a name="zh-cn_topic_0000001054501981_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>
</tr>
<tr id="zh-cn_topic_0000001054501981_row192161027104010"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="zh-cn_topic_0000001054501981_p15217227174016"><a name="zh-cn_topic_0000001054501981_p15217227174016"></a><a name="zh-cn_topic_0000001054501981_p15217227174016"></a>LLVM</p>
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="zh-cn_topic_0000001054501981_p122171727184019"><a name="zh-cn_topic_0000001054501981_p122171727184019"></a><a name="zh-cn_topic_0000001054501981_p122171727184019"></a>编译工具链</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p12127241115612"><a name="zh-cn_topic_0000001054501981_p12127241115612"></a><a name="zh-cn_topic_0000001054501981_p12127241115612"></a><a href="http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p0191147134415"><a name="zh-cn_topic_0000001054501981_p0191147134415"></a><a name="zh-cn_topic_0000001054501981_p0191147134415"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar</a></p>
</td>
</tr>
<tr id="zh-cn_topic_0000001054501981_row18516509507"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="zh-cn_topic_0000001054501981_p14521650135017"><a name="zh-cn_topic_0000001054501981_p14521650135017"></a><a name="zh-cn_topic_0000001054501981_p14521650135017"></a>hc-gen</p>
</td>
<td class="cellrowborder" valign="top" width="19.921992199219922%" headers="mcps1.2.4.1.2 "><p id="zh-cn_topic_0000001054501981_p125255010501"><a name="zh-cn_topic_0000001054501981_p125255010501"></a><a name="zh-cn_topic_0000001054501981_p125255010501"></a>驱动配置编译工具</p>
</td>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p4381131720413"><a name="zh-cn_topic_0000001054501981_p4381131720413"></a><a name="zh-cn_topic_0000001054501981_p4381131720413"></a><a href="http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar</a></p>
<td class="cellrowborder" valign="top" width="66.996699669967%" headers="mcps1.2.4.1.3 "><p id="zh-cn_topic_0000001054501981_p145061517114519"><a name="zh-cn_topic_0000001054501981_p145061517114519"></a><a name="zh-cn_topic_0000001054501981_p145061517114519"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar</a></p>
</td>
</tr>
<tr id="zh-cn_topic_0000001054501981_row105773499422"><td class="cellrowborder" valign="top" width="13.081308130813083%" headers="mcps1.2.4.1.1 "><p id="zh-cn_topic_0000001054501981_p15300102717517"><a name="zh-cn_topic_0000001054501981_p15300102717517"></a><a name="zh-cn_topic_0000001054501981_p15300102717517"></a>IPOP、PuTTY或其他超级终端</p>
......@@ -249,7 +249,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装gn<a name="section119641436125219"></a>
1. 打开Linux编译服务器终端。
2. [下载gn工具](http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar)
2. [下载gn工具](https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar)
3. 解压gn安装包至\~/gn路径下:"tar -xvf gn.1523.tar -C \~/"。
4. 设置环境变量:"vim \~/.bashrc", 新增:"export PATH=\~/gn:$PATH"。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -257,7 +257,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装ninja<a name="section96781928145213"></a>
1. 打开Linux编译服务器终端
2. [下载ninja工具](http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar)
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", 新增:"export PATH=\~/ninja:$PATH"。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -265,7 +265,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装LLVM编译工具链<a name="section667822819521"></a>
1. 打开Linux编译服务器终端。
2. [下载LLVM工具](http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar)
2. [下载LLVM工具](https://repo.huaweicloud.com/harmonyos/compiler/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar)
3. 解压LLVM安装包至\~/llvm路径下:"tar -xvf llvm-linux-9.0.0-34042.tar -C \~/"。
4. 设置环境变量:"vim \~/.bashrc", 新增:export PATH=\~/llvm/bin:$PATH。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -273,8 +273,8 @@ sudo ln -s /bin/bash /bin/sh
## 安装hc-gen<a name="section201517625210"></a>
1. 打开Linux编译服务器终端。
2. [下载hc-gen工具](http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar)
3. 解压hc-gen安装包到Linux服务器\~/hc-gen路径下。
2. [下载hc-gen工具](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar)
3. 解压hc-gen安装包到Linux服务器\~/hc-gen路径下:"tar -xvf hc-gen-0.65-linux.tar -C \~/"
4. 设置环境变量:"vim \~/.bashrc", 新增:export PATH=\~/hc-gen:$PATH。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -67,7 +67,7 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
</td>
<td class="cellrowborder" valign="top" width="20.7020702070207%" headers="mcps1.2.4.1.2 "><p id="p1219863434519"><a name="p1219863434519"></a><a name="p1219863434519"></a>交叉编译工具</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p165031126103215"><a name="p165031126103215"></a><a name="p165031126103215"></a><a href="http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz</a></p>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p14145637348"><a name="p14145637348"></a><a name="p14145637348"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz</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>
......@@ -102,14 +102,14 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示
</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>产生ninja编译脚本</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar</a></p>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p10572194318318"><a name="p10572194318318"></a><a name="p10572194318318"></a><a href="https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar" target="_blank" rel="noopener noreferrer">https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar</a></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>
</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>执行ninja编译脚本</p>
</td>
<td class="cellrowborder" valign="top" width="53.73537353735374%" headers="mcps1.2.4.1.3 "><p id="p377581023312"><a name="p377581023312"></a><a name="p377581023312"></a><a href="http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar" target="_blank" rel="noopener noreferrer">http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar</a></p>
<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>
</tr>
</tbody>
......@@ -310,7 +310,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装gn<a name="section2024354014506"></a>
1. 打开Linux编译服务器终端。
2. [下载gn工具](http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar)
2. [下载gn工具](https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar)
3. 解压gn安装包至\~/gn路径下:"tar -xvf gn.1523.tar -C \~/"。
4. 设置环境变量:"vim \~/.bashrc", 新增:"export PATH=\~/gn:$PATH"。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -318,7 +318,7 @@ sudo ln -s /bin/bash /bin/sh
## 安装ninja<a name="section182441140185010"></a>
1. 打开Linux编译服务器终端
2. [下载ninja工具](http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar)
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", 新增:"export PATH=\~/ninja:$PATH"。
5. 生效环境变量:"source \~/.bashrc"。
......@@ -329,9 +329,9 @@ sudo ln -s /bin/bash /bin/sh
>Hi3861平台仅支持使用libgcc运行时库的静态链接,**不建议开发者使用libgcc运行时库的动态链接,会导致商业分发时被GPL V3污染。**
1. 打开Linux编译服务器终端。
2. [下载gcc\_riscv32工具](http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz)
3. 解压gcc\_riscv32安装包至/opt/gcc\_riscv32路径下:"tar -xvf gcc\_riscv32-linux-7.3.0.tar.gz -C /opt/"。
4. 设置环境变量:"vim \~/.bashrc",新增:"export PATH=/opt/gcc\_riscv32/bin:$PATH"。
2. [下载gcc\_riscv32工具](https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz)
3. 解压gcc\_riscv32安装包至\~/gcc\_riscv32路径下:"tar -xvf gcc\_riscv32-linux-7.3.0.tar.gz -C \~/"。
4. 设置环境变量:"vim \~/.bashrc",新增:"export PATH=\~/gcc\_riscv32/bin:$PATH"。
5. 生效环境变量:"source \~/.bashrc"。
6. Shell命令行中输入“riscv32-unknown-elf-gcc -v”,如果能正确显示编译器版本号,表明编译器安装成功。
......@@ -2,13 +2,13 @@
## 简介<a name="section11660541593"></a>
该仓库用于存放DFX框架的代码。主要包含DFR(可靠性)和DFT(可测试性)特性。
该仓库用于存放DFX框架的代码。主要包含DFR(Design for Reliability,可靠性)和DFT(Design for Testability,可测试性)特性。
由于芯片平台资源有限,且硬件平台多样,因此需要针对不同硬件架构和资源提供组件化且可定制的DFX框架。根据RISC-V、Cortex-M、Cortex-A不同硬件平台,提供两种不同的轻量级DFX框架,以下简称mini、featured。
- mini框架:针对处理架构为Cortex-M或同等处理能力的硬件平台,系统内存一般低于512KB,无文件系统或者仅提供一个可有限使用的轻量级文件系统,遵循CMSIS接口规范。
- featured框架:处理架构为Cortex-A或同等处理能力的硬件平台,内存资源大于512KB,文件系统完善,可存储大量数据,遵循POSIX接口规范。
- featured框架:处理架构为Cortex-A或同等处理能力的硬件平台,内存资源一般大于512KB,文件系统完善,可存储大量数据,遵循POSIX接口规范。
## 目录<a name="section1464106163817"></a>
......@@ -64,7 +64,7 @@
</tr>
<tr id="row11587111583"><td class="cellrowborder" valign="top" width="30.34%" headers="mcps1.2.3.1.1 "><p id="p4491153104614"><a name="p4491153104614"></a><a name="p4491153104614"></a>services/hiview_lite</p>
</td>
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p159210361388"><a name="p159210361388"></a><a name="p159210361388"></a>DFX框架服务化注册</p>
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p159210361388"><a name="p159210361388"></a><a name="p159210361388"></a>DFX mini框架服务化注册</p>
</td>
</tr>
<tr id="row144311669479"><td class="cellrowborder" valign="top" width="30.34%" headers="mcps1.2.3.1.1 "><p id="p443219624716"><a name="p443219624716"></a><a name="p443219624716"></a>frameworks/ddrdump_lite</p>
......@@ -94,7 +94,7 @@
</tr>
<tr id="row13247163492"><td class="cellrowborder" valign="top" width="30.34%" headers="mcps1.2.3.1.1 "><p id="p710851611910"><a name="p710851611910"></a><a name="p710851611910"></a>utils/lite</p>
</td>
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p112471431895"><a name="p112471431895"></a><a name="p112471431895"></a>公共基础操作定义实现。包含了miini框架的config配置</p>
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p112471431895"><a name="p112471431895"></a><a name="p112471431895"></a>公共基础操作定义实现。包含了mini框架的config配置</p>
</td>
</tr>
</tbody>
......@@ -102,7 +102,7 @@
## 约束<a name="section1718733212019"></a>
mini框架整体代码使用标准C开发,对外的接口依赖统一通过util封装,如软硬件平台不同需要适配,需要在vendor下实现适配处理
mini框架整体代码使用标准C开发。
## 使用-mini框架<a name="section99168524220"></a>
......@@ -130,20 +130,18 @@ DFX-mini是一套简单小巧的DFX设计,对外提供log功能:
在A模块的初始化流程中添加如下代码,注册模块到日志框架中:
```
HiLogRegisterModule(HILOG_MODULE_SAMGR, "A");
HiLogRegisterModule(HILOG_MODULE_A, "A");
```
1. **第三步调整DFX框架静态配置**
根据需要调整
根据需要调整如下文件的g\_hiviewConfig全局参数配置。默认情况下不用修改,日志默认输出到串口。
```
utils/lite/hiview_config.c
```
的g\_hiviewConfig全局参数配置。默认情况下不用修改,日志默认输出到串口。
<a name="table15664428164516"></a>
<table><thead align="left"><tr id="row07061028154510"><th class="cellrowborder" valign="top" width="25.180000000000003%" id="mcps1.1.3.1.1"><p id="p10706128184514"><a name="p10706128184514"></a><a name="p10706128184514"></a>配置项</p>
</th>
......@@ -157,7 +155,6 @@ DFX-mini是一套简单小巧的DFX设计,对外提供log功能:
<p id="p107061428124515"><a name="p107061428124515"></a><a name="p107061428124515"></a>OUTPUT_OPTION_DEBUG 日志不进行跨任务调度直接输出到串口,仅适合临时调测使用。</p>
<p id="p870682819450"><a name="p870682819450"></a><a name="p870682819450"></a>OUTPUT_OPTION_FLOW 日志流式输出到串口(默认设置)</p>
<p id="p16707182819454"><a name="p16707182819454"></a><a name="p16707182819454"></a>OUTPUT_OPTION_TEXT_FILE 日志输出为文本文件</p>
<p id="p117071528184514"><a name="p117071528184514"></a><a name="p117071528184514"></a>OUTPUT_OPTION_BIN_FILE 日志输出为二进制文件(后续支持)</p>
</td>
</tr>
<tr id="row1270720281453"><td class="cellrowborder" valign="top" width="25.180000000000003%" headers="mcps1.1.3.1.1 "><p id="p137071528164516"><a name="p137071528164516"></a><a name="p137071528164516"></a>level</p>
......@@ -180,7 +177,7 @@ DFX-mini是一套简单小巧的DFX设计,对外提供log功能:
</tr>
<tr id="row87081282452"><td class="cellrowborder" valign="top" width="25.180000000000003%" headers="mcps1.1.3.1.1 "><p id="p11708128124511"><a name="p11708128124511"></a><a name="p11708128124511"></a>eventSwitch</p>
</td>
<td class="cellrowborder" valign="top" width="74.82%" headers="mcps1.1.3.1.2 "><p id="p17708202834519"><a name="p17708202834519"></a><a name="p17708202834519"></a>事件功能开关。编译前关闭则不再初始化DUMP组件。默认关闭。取值如下:</p>
<td class="cellrowborder" valign="top" width="74.82%" headers="mcps1.1.3.1.2 "><p id="p17708202834519"><a name="p17708202834519"></a><a name="p17708202834519"></a>事件功能开关。编译前关闭则不再初始化Event组件。默认关闭。取值如下:</p>
<p id="p1670852894513"><a name="p1670852894513"></a><a name="p1670852894513"></a>HIVIEW_FEATURE_ON/ HIVIEW_FEATURE_OFF</p>
</td>
</tr>
......@@ -191,7 +188,7 @@ DFX-mini是一套简单小巧的DFX设计,对外提供log功能:
在需要打印日志的.c文件中 \#include "log.h",调用如下接口:
HILOG\_INFO\(HILOG\_MODULE\_SAMGR, “log test: %d”, 88\);
HILOG\_INFO\(HILOG\_MODULE\_A,“log test: %d”, 88\);
接口参数说明:
......@@ -250,18 +247,22 @@ DFX featured框架提供完整的DFX特性,对外提供log接口:
hilog 可用API
```
HILOGD(fmt,...) HILOGI(fmt,...) HILOGW(fmt,...) HILOGE(fmt,...)
HILOG_DEBUG(type, ...)
HILOG_INFO(type, ...)
HILOG_WARN(type, ...)
HILOG_ERROR(type, ...)
HILOG_FATAL(type, ...)
```
使用介绍
首先需要定义TAG,DOMAIN需要找DFT申请,未经申请的DOMAIN,日志打印不出来
1. 首先需要定义TAG
本地调试,可以临时使用domain数值 0。
2. 本地调试,可以临时使用domain数值 0。
包含头文件:\#include <hilog/log.h\>
3. 包含头文件:\#include <hilog/log.h\>
在BUILD.gn中添加依赖库 libhilog。
4. 在BUILD.gn中添加依赖库 libhilog。
接口规则介绍:
......@@ -284,7 +285,7 @@ HILOGD(fmt,...) HILOGI(fmt,...) HILOGW(fmt,...) HILOGE(fmt,...)
</thead>
<tbody><tr id="row152675592321"><td class="cellrowborder" valign="top" width="25.94%" headers="mcps1.1.3.1.1 "><p id="p12267135915328"><a name="p12267135915328"></a><a name="p12267135915328"></a>domain</p>
</td>
<td class="cellrowborder" valign="top" width="74.06%" headers="mcps1.1.3.1.2 "><p id="p1826745953219"><a name="p1826745953219"></a><a name="p1826745953219"></a>领域标识ID,需要找DFT申请,未经申请的domain会出现日志打印不出来的问题</p>
<td class="cellrowborder" valign="top" width="74.06%" headers="mcps1.1.3.1.2 "><p id="p1826745953219"><a name="p1826745953219"></a><a name="p1826745953219"></a>领域标识ID</p>
</td>
</tr>
<tr id="row20267135963212"><td class="cellrowborder" valign="top" width="25.94%" headers="mcps1.1.3.1.1 "><p id="p152675591328"><a name="p152675591328"></a><a name="p152675591328"></a>tag</p>
......@@ -312,14 +313,14 @@ HILOGD(fmt,...) HILOGI(fmt,...) HILOGW(fmt,...) HILOGE(fmt,...)
**日志查看**
1. debug版本hilog日志会保存到/storage/data/log/hilogs 目录下面。
1. debug版本hilog日志会保存到/storage/data/log/目录下面。
2. 可以执行hilogcat实时查看hilog日志。
**日志系统架构**
![](figures/zh-cn_image_0000001052080708.png)
![](figures/zh-cn_image_0000001054762887.png)
1. hilogtask流水日志的内核任务。
- 此功能是一个linux内核的任务或者线程,在系统启动时初始化。
......@@ -329,7 +330,6 @@ HILOGD(fmt,...) HILOGI(fmt,...) HILOGW(fmt,...) HILOGE(fmt,...)
2. hilogcatd用户态日志存储服务。
- 这是一个用户态的进程,负责定时将内核的ringbuffer读取出来,存储到日志文件中。
- 日志文件输出支持gzip压缩,使用zlib
- 每个类型的ringbuffer分开存储。
- 存储文件的单个文件大小,文件个数可在编译时配置。
3. hilogcat日志查看命令行工具。
......@@ -338,7 +338,6 @@ HILOGD(fmt,...) HILOGI(fmt,...) HILOGW(fmt,...) HILOGE(fmt,...)
4. 支持日志缓冲区可配置。
- 编译时可以配置日志缓冲区的大小。
- 编译时可以指定日志缓冲区的类型,类型个数就是ringbuffer的个数。
## 涉及仓<a name="section6899131818455"></a>
......
......@@ -2,7 +2,7 @@
## 简介<a name="section11660541593"></a>
JS应用开发框架,提供了一套跨平台的类web应用开发框架,通过Toolkit将开发者编写的HML、CSS和JS 文件编译打包成JS Bundle,然后再将JS Bundle解析运行成C++ native UI的View 组件进行渲染。通过支持三方开发者使用声明式的API进行应用开发,以数据驱动视图变化,避免了大量的视图操作,大大降低了应用开发难度,提升开发者开发体验。
JS应用开发框架,提供了一套跨平台的类web应用开发框架,通过Toolkit将开发者编写的HML、CSS和JS 文件编译打包成JS Bundle,解析运行JS Bundle,生成native UI View组件树并进行渲染显示。通过支持三方开发者使用声明式的API进行应用开发,以数据驱动视图变化,避免大量的视图操作,大大降低应用开发难度,提升开发者开发体验。
JS应用框架模块组成如下图所示:
......@@ -14,37 +14,37 @@ JS应用开发框架源代码在/foundation/ace下,目录结构如下图所示
```
/foundation/ace
├── frameworks #框架代码
├── frameworks # 框架代码
│ └── lite
│ ├── examples #示例代码目录
│ ├── include #对外暴露头文件存放目录
│ ├── packages #框架JS实现存放目录
│ ├── src #源代码存放目录
│ ├── targets #各目标设备配置文件存放目录
│ └── tools #工具代码存放目录
├── interfaces #对外接口存放目录
│ └── innerkits #对内部子系统暴露的头文件存放目录
│ ├── examples # 示例代码目录
│ ├── include # 对外暴露头文件存放目录
│ ├── packages # 框架JS实现存放目录
│ ├── src # 源代码存放目录
│ ├── targets # 各目标设备配置文件存放目录
│ └── tools # 工具代码存放目录
├── interfaces # 对外接口存放目录
│ └── innerkits # 对内部子系统暴露的头文件存放目录
│ └── builtin # JS应用框架对外暴露JS三方module API接口存放目录
```
## 约束<a name="section1718733212019"></a>
- 语言版本
- 语言版本
- C++11版本或以上
- JavaScript ES5.1+
- JavaScript ES5.1
- 框架运行内存通常分为如下组成部分:
- 运行时引擎的预分配内存,该内存值可调,取决于具体设备应用复杂度,通常建议64K\~512K
- 框架本身内存,在百K级的内存设备上,通常通过预分配一个内存池进行管理,可以和native UI共用一个内存池,包含了对象和堆内存统一管理
- JS引擎运行时内存:可调,取决于具体设备应用复杂度,通常建议64K\~512K
- 框架本身native内存:在百K级的内存设备上,建议预分配一个与native UI共用的内存池,用于native内存的管理
- 框架针对不同的芯片平台和底层OS能力,规格有所区别
- Cortex-M RAM/ROM
- 框架针对不同的芯片平台和底层OS能力,规格有所区别
- Cortex-M RAM/ROM
- JS引擎内存池: 建议大于48K
- RAM:建议与native UI共用内存池,大于80K
- ROM: \> 300K (包含JS应用框架,以及native UI和JS引擎等强相关子系统)
- Cortex-A RAM/ROM:
- Cortex-A RAM/ROM
- JS引擎内存池: 建议大于128K
- RAM:建议大于512K
- ROM:\> 2M (包含JS应用框架,以及native UI和JS引擎等强相关子系统)
......@@ -53,7 +53,10 @@ JS应用开发框架源代码在/foundation/ace下,目录结构如下图所示
## 使用**targets**<a name="section1460013282612"></a>
JS应用框架实现主要包含两部分,native和JavaScript,native部分为C++,为框架的主体实现,JavaScript部分实现提供JS应用框架对用户JS文件的运行时支持,并通过向引擎暴露一些全局方法或对象,支撑JS运行时与native框架之间的交互。
JS应用框架实现主要包含两部分:
- native部分:使用C++进行编写,是框架主体实现;
- JavaScript部分:提供JS应用框架对用户JS文件的运行时支持,并通过向引擎暴露一些全局方法和对象,支撑JS运行时与native框架之间的交互。
JS应用框架通过一些特性宏来定制不同平台上参与编译的功能代码,该部分特性宏定义在 foundation/ace/frameworks/lite/targets 目录下头文件内,目录结构如下:
......@@ -61,70 +64,74 @@ JS应用框架通过一些特性宏来定制不同平台上参与编译的功能
/foundation/ace/frameworks/lite/targets
├── default/
│ └── acelite_config.h
├── linux/ #linux环境配置文件目录
├── linux/ # linux环境配置文件目录
│ └── acelite_config.h
├── liteos_a/ #LiteOS A核环境配置文件目录
├── liteos_a/ # LiteOS A核环境配置文件目录
│ └── acelite_config.h
├── liteos_m/ #LiteOS M核环境配置文件目录
├── liteos_m/ # LiteOS M核环境配置文件目录
│ └── acelite_config.h
├── platform_adapter.cpp
├── platform_adapter.h
└── simulator/ #模拟器环境配置文件目录
└── simulator/ # 模拟器环境配置文件目录
└── win/
└── acelite_config.h*
```
在编译不同的平台目标时,需要使用对应平台目录下的acelite\_config.h 头文件,这可以通过配置编译时的搜索路径来进行,以下以 ninja和cmake 构建工具为例进行示例:
在编译不同的平台目标时,需要使用对应平台目录下的acelite\_config.h头文件,这可以通过配置编译时的搜索路径来进行,以下以ninja和cmake构建工具为例进行示例:
ninja:
- ninja:
```
if (hos_kernel_type == "liteos_a" || hos_kernel_type == "liteos_m" ||
hos_kernel_type == "liteos_riscv") { // 通过目标内核平台选择不同的头文件搜索路径
include_dirs += [ "targets/liteos-a" ]
} else if (hos_kernel_type == "linux") {
include_dirs += [ "targets/linux" ]
}
```
```
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type== "liteos_m" ||
ohos_kernel_type == "liteos_riscv") { // 通过目标内核平台选择不同的头文件搜索路径
include_dirs += [ "targets/liteos-a" ]
} else if (ohos_kernel_type == "linux") {
include_dirs += [ "targets/linux" ]
}
```
cmake:
```
......
set(ACE_LITE_CONFIG_PATH "${CMAKE_CURRENT_SOURCE_DIR}/targets/simulator/win")
set(JSFWK_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(JSFWK_SOURCE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/core")
set(UIKIT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../ui")
set(THIRTY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party")
set(JSFWK_SIMULATOR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../tools/simulator")
set(JS_API_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../api/emui_band/MoltenCore/application/framework/ace/api")
set(JSFWK_SIMULATOR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../tools/simulator")
set(AAFWK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../aafwk")
# header files
include_directories(
${ACE_LITE_CONFIG_PATH}
${JSFWK_INCLUDE_PATH}/async
${JSFWK_INCLUDE_PATH}/base
${JSFWK_INCLUDE_PATH}/context
${JSFWK_INCLUDE_PATH}/jsi
${JSFWK_SOURCE_PATH}
- cmake:
```
......
```
set(ACE_LITE_CONFIG_PATH "${CMAKE_CURRENT_SOURCE_DIR}/targets/simulator/win") # 模拟器编译搜索路径使用targets/simulator/win
set(JSFWK_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(JSFWK_SOURCE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/core")
set(UIKIT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../ui")
set(THIRTY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party")
set(JSFWK_SIMULATOR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../tools/simulator")
set(JS_API_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../api/emui_band/MoltenCore/application/framework/ace/api")
set(JSFWK_SIMULATOR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../tools/simulator")
set(AAFWK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../aafwk")
# header files
include_directories(
${ACE_LITE_CONFIG_PATH}
${JSFWK_INCLUDE_PATH}/async
${JSFWK_INCLUDE_PATH}/base
${JSFWK_INCLUDE_PATH}/context
${JSFWK_INCLUDE_PATH}/jsi
${JSFWK_SOURCE_PATH}
......
```
acelite\_config.h主要用于对应平台的特性宏开关,也可用来进行一些屏蔽平台差异的定义,如不同平台由于使用的文件系统不一致,可能存在一些固定目录路径名不一样的情况,这些有区别的常量可以放在这里进行定义,如下:
liteos-a/acelite\_config.h
acelite\_config.h主要用于对应平台的特性宏开关,也可用来进行一些屏蔽平台差异的定义。如不同平台由于使用的文件系统不一致,可能存在一些固定目录路径名不一样的情况,这些有区别的常量可以放在这里进行定义,如下:
```
#define JS_FRAMEWORK_PATH "//system/ace/bin/"
```
- liteos-a/acelite\_config.h
simulator/win/acelite\_config.h
```
#define JS_FRAMEWORK_PATH "//system/ace/bin/"
```
- simulator/win/acelite\_config.h
```
#define JS_FRAMEWORK_PATH "..\\..\\..\\jsfwk\\packages\\runtime-core\\build"
```
```
#define JS_FRAMEWORK_PATH "..\\..\\..\\jsfwk\\packages\\runtime-core\\build"
```
## 使用runtime-core<a name="section1460223932718"></a>
......@@ -133,30 +140,30 @@ simulator/win/acelite\_config.h
```
/foundation/ace/frameworks/lite/packages
└── runtime-core
├── .babelrc #babel配置文件
├── .editorconfig #IDE配置文件
├── .eslintignore #ESLint配置文件,可以设置不进行ESLint扫描的目录或文件
├── .eslintrc.js #ESLint配置文件,可以配置扫描规则
├── .babelrc # babel配置文件
├── .editorconfig # IDE配置文件
├── .eslintignore # ESLint配置文件,可以设置不进行ESLint扫描的目录或文件
├── .eslintrc.js # ESLint配置文件,可以配置扫描规则
├── .gitignore
├── package.json #NPM包管理文件
├── package-lock.json #NPM依赖版本锁定文件
├── .prettierrc #代码格式化规则配置文件
├── scripts #编译脚本存放目录
│ ├── build.js #编译脚本
│ └── configs.js #Rollup配置文件
├── package.json # NPM包管理文件
├── package-lock.json # NPM依赖版本锁定文件
├── .prettierrc # 代码格式化规则配置文件
├── scripts # 编译脚本存放目录
│ ├── build.js # 编译脚本
│ └── configs.js # Rollup配置文件
├── .size-snapshot.json
└── src #源代码
├── core #ViewModel核心实现目录
└── src # 源代码
├── core # ViewModel核心实现目录
│ └── index.js
├── index.js
├── observer #数据劫持部分代码实现目录
├── observer # 数据劫持部分代码实现目录
│ ├── index.js
│ ├── observer.js
│ ├── subject.js
│ └── utils.js
├── profiler #profiler目录
├── profiler # profiler目录
│ └── index.js
└── __test__ #测试用例目录
└── __test__ # 测试用例目录
└── index.test.js
```
......@@ -164,7 +171,7 @@ simulator/win/acelite\_config.h
- npm run build
JS应用框架所集成的JS 引擎仅支持ES5.1语法,runtime-core源代码是使用ES6源码书写的。因此选择使用rollup做为打包工具,配合babel实现对JavaScript语法进行降级处理。只要命令行中执行命令npm run build,会在build目录下输出打包结果,输出结果如下所示:
JS应用框架所集成的JS引擎仅支持ES5.1语法,runtime-core源代码是使用ES6语法书写的。因此选择使用rollup做为打包工具,配合babel实现对语法进行降级处理。命令行中执行npm run build,会在build目录下输出打包结果,输出结果如下所示:
```
build/
......
......@@ -6,8 +6,8 @@ XTS是OpenHarmony生态认证测试套件的集合,当前包括acts(applicat
test/xts仓当前包括acts与tools软件包:
- acts,存放acts相关测试用例源码与配置文件,帮助终端设备厂商尽早发现软件与OpenHarmony的不兼容性,确保软件在整个开发过程中满足OpenHarmony的兼容性要求。
- tools,提供acts编写和编译所依赖的开发框架。
- acts,存放acts相关测试用例源码与配置文件,其目的是帮助终端设备厂商尽早发现软件与OpenHarmony的不兼容性,确保软件在整个开发过程中满足OpenHarmony的兼容性要求。
- tools,存放acts相关测试用例开发框架。
## 目录<a name="section36203291667"></a>
......@@ -17,9 +17,7 @@ test/xts源代码目录结构:
│ ├── BUILD.gn 测试用例编译配置
│ └── A测试子系统\_lite A测试子系统测试用例源码
│ └── B测试子系统\_lite B测试子系统测试用例源码
│ └── subsystem\_lite 子系统测试用例源码
└── tools
......@@ -39,7 +37,7 @@ test/xts源代码目录结构:
## 编写联接类模组acts测试用例<a name="section98382591568"></a>
当前使用的测试框架是hctest测试框架
当前使用的测试框架是hctest。
hctest测试框架支持使用C语言编写测试用例,在联接类模组上执行,是在开源测试框架unity的基础上进行增强和适配。
......@@ -49,13 +47,13 @@ hctest测试框架支持使用C语言编写测试用例,在联接类模组上
│ ├── BUILD.gn
│ └──测试子系统\_lite
│ └──subsystem\_lite
│ │ └── 测试模块\_hal
│ │ └── module\_hal
│ │ │ └── BUILD.gn
│ │ │ └── src 存放测试用例源码
│ │ │ └── src
**2,src目录下用例编写样例:**
......@@ -171,7 +169,7 @@ hctest_suite("ActsDemoTest") {
**4,acts下BUILD.gn增加编译选项**
如何将编写的测试代码加入到版本编译中,需要将测试模块加入到acts目录下的编译脚本中,编译脚本为:test/xts/acts/BUILD.gn。
需要将测试模块加入到acts目录下的编译脚本中,编译脚本路径:test/xts/acts/BUILD.gn。
```
lite_component("acts") {
......@@ -179,7 +177,7 @@ lite_component("acts") {
if(board_name == "liteos_riscv") {
features += [
...
"//xts/acts/测试子系统_lite/测试模块_hal:ActsDemoTest"
"//xts/acts/subsystem_lite/module_hal:ActsDemoTest"
]
}
}
......@@ -203,13 +201,13 @@ hcpptest测试框架是在开源的googletest测试框架的基础上进行的
│ ├── BUILD.gn
│ └──测试子系统\_lite
│ └──subsystem\_lite
│ │ └── 测试模块\_posix
│ │ └── module\_posix
│ │ │ └── BUILD.gn
│ │ │ └── src 存放测试用例源码
│ │ │ └── src
**2,测试模块src下用例编写样例:**
......@@ -226,17 +224,17 @@ hcpptest测试框架是在开源的googletest测试框架的基础上进行的
```
class TestSuite: public testing::Test {
protected:
// SetUpTestCase:测试套预置动作,在第一个TestCase之前执行
// Preset action of the test suite, which is executed before the first test case
static void SetUpTestCase(void){
}
// TearDownTestCase:测试套清理动作,在最后一个TestCase之后执行
// Test suite cleanup action, which is executed after the last test case
static void TearDownTestCase(void){
}
// 用例的预置动作
// Preset action of the test case
virtual void SetUp()
{
}
// 用例的清理动作
// Cleanup action of the test case
virtual void TearDown()
{
}
......@@ -339,7 +337,7 @@ hcpptest_suite("ActsDemoTest") {
4**,acts目录下增加编译选项(BUILD.gn)**
如何将编写的测试代码加入到版本编译中,需要将测试模块加入到acts目录下的编译脚本中,编译脚本为:test/xts/acts/BUILD.gn。
需要将测试模块加入到acts目录下的编译脚本中,编译脚本为:test/xts/acts/BUILD.gn。
```
lite_component("acts") {
......@@ -347,7 +345,7 @@ hcpptest_suite("ActsDemoTest") {
else if(board_name == "liteos_a") {
features += [
...
"//xts/acts/测试子系统_lite/测试模块_posix:ActsDemoTest"
"//xts/acts/subsystem_lite/module_posix:ActsDemoTest"
]
}
}
......
......@@ -6,40 +6,39 @@
公共基础库在不同平台上提供的能力:
- LiteOS-M平台:KV存储、文件操作、定时器、IoT外设控制
- LiteOS-A平台:KV存储、定时器、ACE JS API
- LiteOS-M内核(Hi3861平台):KV存储、文件操作、定时器、IoT外设控制
- LiteOS-A内核(Hi3516、Hi3518平台):KV存储、定时器、ACE JS API
## 目录<a name="section1464106163817"></a>
```
utils/native/lite/ # 公共基础库根目录
├── file # 文件接口实现
├── hals # HAL目录
│ └── file # 文件操作硬件抽象层头文件
├── include # 公共基础库对外接口文件
├── js # ACE JS API目录
│ └── builtin
utils/native/lite/ # 公共基础库根目录
├── file # 文件接口实现
├── hals # HAL目录
│ └── file # 文件操作硬件抽象层头文件
├── include # 公共基础库对外接口文件
├── js # ACE JS API目录
│ └── builtin
│ ├── common
│ ├── deviceinfokit # 设备信息Kit
│ ├── filekit # 文件Kit
│ └── kvstorekit # KV存储Kit
├── kal # KAL目录
│ └── timer # Timer的KAL实现
├── kv_store # KV存储实现
│ ├── innerkits # KV存储内部接口
│ └── src # KV存储源文件
└── timer_task # Timer实现
base/iot_hardware #IoT外设控制
├── frameworks
│ └── wifiiot_lite #IoT外设控制模块实现
│ ├── deviceinfokit # 设备信息Kit
│ ├── filekit # 文件Kit
│ └── kvstorekit # KV存储Kit
├── kal # KAL目录
│ └── timer # Timer的KAL实现
├── kv_store # KV存储实现
│ ├── innerkits # KV存储内部接口
│ └── src # KV存储源文件
└── timer_task # Timer实现
base/iot_hardware #IoT外设控制
├── frameworks
│ └── wifiiot_lite #IoT外设控制模块实现
├── hals
│ └── wifiiot_lite #HAL适配层接口
│ └── wifiiot_lite #HAL适配层接口
└── interfaces
└── kits #IoT外设控制模块接口
└── kits #IoT外设控制模块接口
vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
└── wifiiot_lite #HAL适配层接口实现
└── wifiiot_lite #HAL适配层接口实现
```
## 约束<a name="section1718733212019"></a>
......@@ -61,7 +60,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
</thead>
<tbody><tr id="row10455841151112"><td class="cellrowborder" valign="top" width="12.659999999999998%" headers="mcps1.2.5.1.1 "><p id="p1945511415113"><a name="p1945511415113"></a><a name="p1945511415113"></a>KV存储</p>
</td>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p668274310317"><a name="p668274310317"></a><a name="p668274310317"></a>LiteOS-M平台、LiteOS-A平台</p>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p668274310317"><a name="p668274310317"></a><a name="p668274310317"></a>LiteOS-M内核、LiteOS-A内核</p>
</td>
<td class="cellrowborder" valign="top" width="32.22%" headers="mcps1.2.5.1.3 "><p id="p193638017460"><a name="p193638017460"></a><a name="p193638017460"></a>为应用程序提供KV存储机制。</p>
</td>
......@@ -70,7 +69,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
</tr>
<tr id="row540314384111"><td class="cellrowborder" valign="top" width="12.659999999999998%" headers="mcps1.2.5.1.1 "><p id="p134041038141112"><a name="p134041038141112"></a><a name="p134041038141112"></a>文件操作</p>
</td>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p19404193811110"><a name="p19404193811110"></a><a name="p19404193811110"></a>LiteOS-M平台</p>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p19404193811110"><a name="p19404193811110"></a><a name="p19404193811110"></a>LiteOS-M内核</p>
</td>
<td class="cellrowborder" valign="top" width="32.22%" headers="mcps1.2.5.1.3 "><p id="p113646084618"><a name="p113646084618"></a><a name="p113646084618"></a>提供统一的文件操作接口,屏蔽对底层不同芯片组件的差异。</p>
</td>
......@@ -79,7 +78,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
</tr>
<tr id="row175322121218"><td class="cellrowborder" valign="top" width="12.659999999999998%" headers="mcps1.2.5.1.1 "><p id="p1053219131219"><a name="p1053219131219"></a><a name="p1053219131219"></a>定时器</p>
</td>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p1912957139"><a name="p1912957139"></a><a name="p1912957139"></a>LiteOS-M平台、LiteOS-A平台</p>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p1912957139"><a name="p1912957139"></a><a name="p1912957139"></a>LiteOS-M内核、LiteOS-A内核</p>
</td>
<td class="cellrowborder" valign="top" width="32.22%" headers="mcps1.2.5.1.3 "><p id="p15364170194610"><a name="p15364170194610"></a><a name="p15364170194610"></a>提供统一的定时器操作接口,屏蔽对底层不同芯片组件的差异。</p>
</td>
......@@ -88,7 +87,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
</tr>
<tr id="row1821629675"><td class="cellrowborder" valign="top" width="12.659999999999998%" headers="mcps1.2.5.1.1 "><p id="p198212291879"><a name="p198212291879"></a><a name="p198212291879"></a>IoT外设控制</p>
</td>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p13827290715"><a name="p13827290715"></a><a name="p13827290715"></a>LiteOS-M平台</p>
<td class="cellrowborder" valign="top" width="14.78%" headers="mcps1.2.5.1.2 "><p id="p13827290715"><a name="p13827290715"></a><a name="p13827290715"></a>LiteOS-M内核</p>
</td>
<td class="cellrowborder" valign="top" width="32.22%" headers="mcps1.2.5.1.3 "><p id="p4822295710"><a name="p4822295710"></a><a name="p4822295710"></a>IoT外设控制模块提供对外围设备的操作能力。</p>
</td>
......@@ -101,12 +100,12 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
- **KV存储**
获取接口
```
获取接口
char key1[] = "rw.sys.version";
char value1[32] = {0};
int ret = UtilsGetValue(key1, value1, 32);
设置接口
char key14[] = "key_14";
ret = UtilsSetValue(key14, defValue);
......@@ -121,10 +120,12 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
printf("file handle = %d\n", fd);
int ret = UtilsFileWrite(fd, def, strlen(def));
printf("write ret = %d\n", ret);
// stat
int fileLen = 0;
ret = UtilsFileStat(fileName, &fileLen);
printf("file size = %d\n", fileLen);
// seek
int fd1 = UtilsFileOpen(fileName, O_RDWR_FS, 0);
ret = UtilsFileSeek(fd1, 5, SEEK_SET_FS);
......@@ -133,6 +134,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层
int readLen = UtilsFileRead(fd1, buf, 32);
ret = UtilsFileClose(fd1);
printf("read len = %d : buf = %s\n", readLen, buf);
// delete
ret = UtilsFileDelete(fileName);
printf("delete ret = %d\n", ret);
......
......@@ -4,11 +4,13 @@
OpenHarmony内核是华为推出面向IoT领域的实时操作系统内核,它同时具备RTOS轻快和Linux易用的特点。
这个仓库用于存放OpenHarmony内核的源代码,主要包括如下基本功能组件模块:进程和线程调度、内存管理、IPC机制、timer管理等,版本包编译信息。
OpenHarmony内核主要包括进程和线程调度、内存管理、IPC机制、timer管理等内核基本功能。
OpenHarmony内核的源代码分为 [`kernel_liteos_a`](https://gitee.com/openharmony/kernel_liteos_a)[`kernel_liteos_m`](https://gitee.com/openharmony/kernel_liteos_m) 这2个代码仓库,其中`kernel_liteos_a`主要针对Cortex-A系列处理器,而`kernel_liteos_m`则主要针对Cortex-M系列处理器,两者目录结构非常相似,所以下面主要针对`kernel_liteos_a`代码仓库进行介绍。
## 目录<a name="section1121775732114"></a>
**表 1** OpenHarmony内核源代码目录结构
**表 1** OpenHarmony内核源代码目录结构
<a name="table2977131081412"></a>
<table><thead align="left"><tr id="row7977610131417"><th class="cellrowborder" valign="top" width="30.34%" id="mcps1.2.3.1.1"><p id="p18792459121314"><a name="p18792459121314"></a><a name="p18792459121314"></a>名称</p>
......@@ -72,14 +74,9 @@ OpenHarmony内核是华为推出面向IoT领域的实时操作系统内核,它
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p1374365134011"><a name="p1374365134011"></a><a name="p1374365134011"></a>系统调用。</p>
</td>
</tr>
<tr id="row6470183019419"><td class="cellrowborder" valign="top" width="30.34%" headers="mcps1.2.3.1.1 "><p id="p17470143094117"><a name="p17470143094117"></a><a name="p17470143094117"></a>test</p>
</td>
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p547013018415"><a name="p547013018415"></a><a name="p547013018415"></a>内核和用户态的测试用例。</p>
</td>
</tr>
<tr id="row343553564120"><td class="cellrowborder" valign="top" width="30.34%" headers="mcps1.2.3.1.1 "><p id="p54351735114113"><a name="p54351735114113"></a><a name="p54351735114113"></a>tools</p>
</td>
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p17435635114116"><a name="p17435635114116"></a><a name="p17435635114116"></a>编译配置和menuconfig相关的代码。</p>
<td class="cellrowborder" valign="top" width="69.66%" headers="mcps1.2.3.1.2 "><p id="p17435635114116"><a name="p17435635114116"></a><a name="p17435635114116"></a>构建工具及相关配置和代码。</p>
</td>
</tr>
</tbody>
......@@ -87,7 +84,7 @@ OpenHarmony内核是华为推出面向IoT领域的实时操作系统内核,它
## 约束<a name="section1967115154223"></a>
系统启动默认使用jffs2的文件系统,该文件系统支持可读可写,若要使用其他文件系统,需要适配新增
Hi3518EV300默认使用jffs2文件系统,Hi3516DV300默认使用vfat文件系统。若要使用其他文件系统,需要新增适配
## 使用<a name="section1821123352217"></a>
......@@ -95,11 +92,11 @@ OpenHarmony内核是华为推出面向IoT领域的实时操作系统内核,它
## 涉及仓<a name="section2392425183215"></a>
drivers\_liteos
[drivers_liteos](https://gitee.com/openharmony/drivers_liteos)
kernel\_liteos\_a
[kernel_liteos_a](https://gitee.com/openharmony/kernel_liteos_a)
kernel\_liteos\_a\_huawei\_proprietary\_fs\_proc
[kernel_liteos_a_huawei_proprietary_fs_proc](https://gitee.com/openharmony/kernel_liteos_a_huawei_proprietary_fs_proc)
kernel\_liteos\_m
[kernel_liteos_m](https://gitee.com/openharmony/kernel_liteos_m)
......@@ -2,9 +2,9 @@
## 简介<a name="section11660541593"></a>
分布式任务调度模块,通过主(智慧屏设备)从设备(运动手表等小内存设备)服务代理机制,在异构操作系统上建立起分布式服务平台,支持OpenHarmony智慧屏与拉起其它OpenHarmony设备FA的能力。轻量分布式调度模块组成如下图所示:
分布式任务调度模块负责跨设备组件管理,提供访问和控制远程组件的能力,支持分布式场景下的应用协同。分布式调度模块组成如下图所示:
![](figures/zh-cn_image_0000001055199362.png)
![](figures/zh-cn_image_0000001055103250.png)
## 目录<a name="section1464106163817"></a>
......@@ -21,17 +21,12 @@
</thead>
<tbody><tr id="row64161056151718"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p9416656181720"><a name="p9416656181720"></a><a name="p9416656181720"></a>dtbschedmgr_lite</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p541645611177"><a name="p541645611177"></a><a name="p541645611177"></a>轻量级分布式任务调度实现。</p>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p541645611177"><a name="p541645611177"></a><a name="p541645611177"></a>分布式任务调度实现</p>
</td>
</tr>
<tr id="row104169564177"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p17416125614179"><a name="p17416125614179"></a><a name="p17416125614179"></a>safwk_lite</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p04163569170"><a name="p04163569170"></a><a name="p04163569170"></a>系统服务进程实现。</p>
</td>
</tr>
<tr id="row04161056121719"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.1 "><p id="p13416165621713"><a name="p13416165621713"></a><a name="p13416165621713"></a>samgr_lite</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p13417125611175"><a name="p13417125611175"></a><a name="p13417125611175"></a>本地服务管理实现。</p>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.1.3.1.2 "><p id="p04163569170"><a name="p04163569170"></a><a name="p04163569170"></a>foundation进程实现</p>
</td>
</tr>
</tbody>
......@@ -42,16 +37,16 @@
```
├── BUILD.gn
├── include
│ ├── distributed_schedule_service.h # 分布式调度对外接口文件
│ ├── distributed_schedule_service.h # 分布式调度对外接口
│ ├── dmslite_check_remote_permission.h # 分布式调度权限管理模块
│ ├── dmslite_famgr.h # 分布式调度FA管理模块
│ ├── dmslite_inner_common.h # 分布式调度服务文件
│ ├── dmslite.h # 分布式调度实现
│ ├── dmslite_inner_common.h # 分布式调度内部通用文件
│ ├── dmslite.h # 分布式调度服务实现
│ ├── dmslite_log.h # 日志模块
│ ├── dmslite_msg_parser.h # 通讯数据反序列化
│ ├── dmslite_msg_parser.h # 分布式消息解析模块
│ ├── dmslite_tlv_common.h # TLV格式数据解析模块
│ └── dmslite_session.h # 跨设备通信辅助文件
├── README.md
│ └── dmslite_session.h # 跨设备通信收发模块
├── readme.md
├── LICENSE
├── source
├── distributed_schedule_service.c
......@@ -65,67 +60,59 @@
## 约束<a name="section1718733212019"></a>
语言限制:C语言。 组网环境:必须确保设备在同一个局域网中。操作系统限制:OpenHarmony操作系统。
**语言限制**:C/C++语言
**组网环境**:必须确保设备在同一个局域网中,主从设备能互相ping通
**操作系统限制**:OpenHarmony操作系统
**远程启动的约束与限制:**
- 支持远程启动FA,不支持远程启动SA
- 远程启动前必须确保主设备(智慧屏设备)与从设备间(运动手表等小内存设备)分布式组网成功(需要在同一网段内,可互相ping通),否则无法远程启动。
- 支持远程启动FA,不支持远程启动SA
- 远程启动前必须确保主设备与从设备间分布式组网成功,否则无法远程启动
## 使用<a name="section10729231131110"></a>
**轻量级分布式调度模块编译**
- **轻量级分布式调度模块编译**
轻量级分布式调度模块通过一些特性宏来定制不同平台上参与编译的功能代码,该部分代码位于build\\lite\\config\\subsystem\\distributedschedule\\目录下,目录结构如下:
轻量级分布式调度模块,其代码所在目录如下:
```
build/lite/config/subsystem/distributedschedule
├── BUILD.gn
foundation/distributedschedule/services/dtbschedmgr_lite
```
编译不同的平台目标时,需要使用对BUILD.gn进行修改,以下以平台hi3518ev300和hi3516dv300为例:
针对不同平台进行编译时,需要在指定目标平台,以下以hi3516dv300为例:
```
zlite_subsystem("distributedschedule") {
subsystem_components = [
"//foundation/distributedschedule/services/samgr_lite:samgr",
]
if (board_name == "hi3518ev300" || board_name == "hi3516dv300") {
subsystem_components += [
"//foundation/distributedschedule/services/safwk_lite:safwk_lite",
"//foundation/distributedschedule/services/dtbschedmgr_lite:dtbschedmgr", // 轻量级分布式调度模块配置
]
}
}
python build.py ipcamera -p hi3516dv300_liteos_a
```
**\* 主设备程序开发**(以拉起FA为例)
- **主设备程序开发**(以拉起FA为例)
构造want,首先使用ElementName类表明需要启动的远端设备ID,包名,元能力类名,传入want中,然后设置want中的分布式标志位Want.FLAG\_ABILITYSLICE\_MULTI\_DEVICE表示需要远程启动。
构造意图参数want,设置需要启动的远端设备ID,包名,元能力类名信息,以及分布式标志位Want.FLAG\_ABILITYSLICE\_MULTI\_DEVICE以使能分布式启动
```
// 引入相关头文件
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Want;
import ohos.bundle.ElementName;
// 启动远程设备FA
Want want = new Want(); // 封装启动远端FA的Want
ElementName name = new ElementName("remote_device_id", "com.huawei.remote_package_name","remote_class_name");
// 构造want参数
Want want = new Want();
ElementName name = new ElementName(remote_device_id, "com.huawei.remote_bundle_name", "remote_ability_name");
want.setElement(name); // 将待启动的FA信息添加到Want中
want.setFlags(Want.FLAG_ABILITYSLICE_MULTI_DEVICE); // 设置分布式标记,若不设置将无法使用分布式能力
startAbility(want); // 按照Want启动指定FA,Want参数命名以实际开发平台API为准
```
**\* 预置条件**
// 启动远程设备FA
startAbility(want); // 按照Want启动指定FA,want参数命名以实际开发平台API为准
```
**主从设备间组网**:远程启动前必须确保主从设备分布式组网成功(需要在同一网段内,可互相ping通),否则无法远程启
- **预置条件**
**从设备FA安装:**安装测试或者自开发的FA到从设备
从设备侧需安装对应包名的FA
**\* 运行**(以拉起FA为例)
- **运行**(以拉起FA为例)
执行主设备(智慧屏)侧的startAbility即可拉起从设备(运动手表等小内存设备)FA
执行主设备侧的startAbility即可拉起从设备FA
## 涉及仓<a name="section176111311166"></a>
......
......@@ -2,7 +2,7 @@
## 简介<a name="section11660541593"></a>
启动恢复负责在内核启动之后,应用启动之前的操作系统中间层的启动。涉及以下模块:
启动恢复负责在内核启动之后到应用启动之前的系统关键进程和服务的启动过程。涉及以下模块:
- init启动引导
......@@ -139,7 +139,7 @@ vendor
- init启动引导的配置文件
启动引导模块配置文件包含了所有需要由init进程启动的系统关键服务的服务名、可执行文件路径、权限和其他属性信息,该文件位于代码仓库/vendor/huawei/camera/init\_configs/目录,部署在/etc/下,文件名称为init.cfg,采用json格式,文件大小目前限制在10KB以内。
启动引导模块配置文件包含了所有需要由init进程启动的系统关键服务的服务名、可执行文件路径、权限和其他属性信息,该文件位于代码仓库/vendor/huawei/camera/init\_configs/目录,部署在/etc/下,文件名称为init.cfg,采用json格式,文件大小目前限制在100KB以内。
init进程启动后首先读取/etc/init.cfg,然后解析其json内容,并根据解析结果依次加载系统服务。配置文件格式和内容说明如下所示:
......
......@@ -2,9 +2,7 @@
## 简介<a name="section38510214395"></a>
该仓主要用于存放媒体子系统的源码信息,旨在为多媒体应用开发者开发者提供统一的开发接口,使得开发者可以专注于应用业务的开发,轻松使用多媒体的资源。
本次开源基于本仓代码信息将相关设备配置文件放入到test\\lite\\devini内,用户使用时将配置文件放入到开发板/data目录,通过该配置文件可以方便去适配sensor及分辨率帧率等能力。
该仓主要用于存放媒体子系统的源码信息,旨在为多媒体应用开发者开发者提供统一的开发接口,使得开发者可以专注于应用业务的开发,轻松使用多媒体的资源。下图分别展现媒体子系统的框架及业务流程。
多媒体子系统框架
......@@ -14,7 +12,7 @@
![](figures/zh-cn_image_0000001052440794.png)
如上图,多媒体包括camera,recorder和player,camera提供yuv/rgb,jpeg以及H264,H265数据到共享内存surface中,recorder模块将surface中h264/h265数据和音频aac数据打包成mp4文件,player模块把mp4文件解复用成音频和视频数据,分别送入对应编码器解码,然后进行播放。
如上图,多媒体包括camera,recorder和player,camera提供YUV、RGB、JPEG以及H264,H265数据到共享内存surface中,recorder模块将surface中h264/h265数据和音频aac数据打包成mp4文件,player模块把mp4文件解复用成音频和视频数据,分别送入对应编码器解码,然后进行播放。
## 目录<a name="section1937963913399"></a>
......@@ -29,27 +27,27 @@
</thead>
<tbody><tr id="row17977171010144"><td class="cellrowborder" valign="top" width="40.71%" headers="mcps1.2.3.1.1 "><p id="p13476517134113"><a name="p13476517134113"></a><a name="p13476517134113"></a>foundation\multimedia\frameworks</p>
</td>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p879375920132"><a name="p879375920132"></a><a name="p879375920132"></a>北向接口内部框架实现,包括audio,camera,player.recorder</p>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p879375920132"><a name="p879375920132"></a><a name="p879375920132"></a>内部框架实现,包括audio,camera,player.recorder</p>
</td>
</tr>
<tr id="row6978161091412"><td class="cellrowborder" valign="top" width="40.71%" headers="mcps1.2.3.1.1 "><p id="p167373014417"><a name="p167373014417"></a><a name="p167373014417"></a>foundation\multimedia\interfaces\kits</p>
</td>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p6793059171318"><a name="p6793059171318"></a><a name="p6793059171318"></a>北向接口对外头文件</p>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p6793059171318"><a name="p6793059171318"></a><a name="p6793059171318"></a>应用接口对外头文件</p>
</td>
</tr>
<tr id="row6978201031415"><td class="cellrowborder" valign="top" width="40.71%" headers="mcps1.2.3.1.1 "><p id="p1639221134214"><a name="p1639221134214"></a><a name="p1639221134214"></a>foundation\multimedia\services\media_lite</p>
</td>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p182076317465"><a name="p182076317465"></a><a name="p182076317465"></a>北向接口底层服务实现</p>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p182076317465"><a name="p182076317465"></a><a name="p182076317465"></a>应用接口底层服务实现</p>
</td>
</tr>
<tr id="row1420633124613"><td class="cellrowborder" valign="top" width="40.71%" headers="mcps1.2.3.1.1 "><p id="p1569213233619"><a name="p1569213233619"></a><a name="p1569213233619"></a>foundation\multimedia\utils\lite</p>
</td>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p069215273618"><a name="p069215273618"></a><a name="p069215273618"></a>北向接口通用模块实现</p>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p069215273618"><a name="p069215273618"></a><a name="p069215273618"></a>应用接口通用模块实现</p>
</td>
</tr>
<tr id="row1679114715461"><td class="cellrowborder" valign="top" width="40.71%" headers="mcps1.2.3.1.1 "><p id="p0295211184214"><a name="p0295211184214"></a><a name="p0295211184214"></a>foundation\multimedia\test\lite</p>
</td>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p1279144754611"><a name="p1279144754611"></a><a name="p1279144754611"></a>北向接口测试代码。</p>
<td class="cellrowborder" valign="top" width="59.29%" headers="mcps1.2.3.1.2 "><p id="p1279144754611"><a name="p1279144754611"></a><a name="p1279144754611"></a>应用接口测试代码。</p>
</td>
</tr>
</tbody>
......@@ -59,18 +57,20 @@
- C++11版本或以上
- 目前支持3516dv300、3518ev300开发板,其中仅3516dv300支持播放功能
- 当前3516dv300开发板默认支持索尼imx335、3518ev300默认支持晶相jxf23。
## 安装<a name="section11914418405"></a>
- 请提前加载内核及相关驱动,参考内核及驱动子系统readme。
- 配置合适的配置文件,可以参考test/devini下配置文件,说明参见《配置文件说明文档》,当前仅支持imx335和imx327sensor,如果适配其他sensor可在开源社区中求助
- 北向接口调用参见test下demo实现。
- 配置合适的配置文件,可以参考applications/sample/camera/media下配置文件,如果适配其他sensor可在开源社区中求助。用户使用时将配置文件放入到开发板/storage/data目录,开发者通过该配置文件可以去适配sensor及分辨率、帧率等能力
- 应用接口调用参见applications/sample/camera/media下demo实现。
## 使用<a name="section1467220266400"></a>
开发者使用多媒体接口用于录像、预览和播放音视频等资源,使用这些资源前先创建camerakit组件对象,注册各种事件回调,这些事件回调是用户实现用来响应多媒体模块中事件响应的,之后调用创建camera就可以创建一个操作camera资源的对象,使用这个对象可以启动预览、录像或抓拍取流,及设置取流的相关参数。
Native应用接口调用可以参考applications/sample/camera/media下demo实现
应用开发者使用多媒体接口实现录像、预览和播放音视频,使用可以参考《多媒体开发指南》。
例:下面是用户重写事件类的实例
用户先创建camerakit组件对象,注册各种事件回调,这些事件回调是用户实现用来响应多媒体模块中事件响应的,之后调用创建camera就可以创建一个操作camera资源的对象,使用这个对象可以启动预览、录像或抓拍取流,及设置取流的相关参数。
```
/*
......
......@@ -39,7 +39,7 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生
## 应用权限管理<a name="section20822104317111"></a>
应用权限是软件用来访问系统资源和使用系统能力的一种通行方式,存在涉及个人隐私相关功能和数据的场景,例如:访问个人设备的硬件特性,如摄像头、麦克风,以及获取个人数据,如通讯录,日历等存储的信息等。操作系统通过应用权限管理来保护这些数据以及能力。
应用权限是软件用来访问系统资源和使用系统能力的一种通行方式,存在涉及个人隐私相关功能和数据的场景,例如:访问个人设备的硬件特性,如摄像头、麦克风,以及读写媒体文件等。操作系统通过应用权限管理来保护这些数据以及能力。
权限定义字段说明:
......@@ -64,7 +64,6 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生
<td class="cellrowborder" valign="top" width="35.099999999999994%" headers="mcps1.1.4.1.2 "><p id="p01082358147"><a name="p01082358147"></a><a name="p01082358147"></a>多语言字符串id</p>
</td>
<td class="cellrowborder" valign="top" width="42.68%" headers="mcps1.1.4.1.3 "><p id="p191081235171414"><a name="p191081235171414"></a><a name="p191081235171414"></a>应用申请此权限的目的。</p>
<p id="p3108193571412"><a name="p3108193571412"></a><a name="p3108193571412"></a>上架审核、弹框授权、用户管理权限时使用到</p>
</td>
</tr>
<tr id="row13108123516145"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.1.4.1.1 "><p id="p18109835101415"><a name="p18109835101415"></a><a name="p18109835101415"></a>used-scene{</p>
......@@ -76,7 +75,7 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生
<p id="p19109133531410"><a name="p19109133531410"></a><a name="p19109133531410"></a>when:inuse, always</p>
</td>
<td class="cellrowborder" valign="top" width="42.68%" headers="mcps1.1.4.1.3 "><p id="p31091835151413"><a name="p31091835151413"></a><a name="p31091835151413"></a>调用受此权限管控的接口的场景。</p>
<p id="p910943517141"><a name="p910943517141"></a><a name="p910943517141"></a>声明在哪些组件下、以及是否前台还是前后台都会去调用受权限管控的接口</p>
<p id="p93361156407"><a name="p93361156407"></a><a name="p93361156407"></a>声明在哪些组件和场景(前台/后台)下调用受管控的接口。</p>
</td>
</tr>
</tbody>
......@@ -85,19 +84,28 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生
## IPC通信鉴权<a name="section156859591110"></a>
- 在Samgr中注册的系统服务如果通过进程间通信的方式暴露接口给其他进程访问,需要配置相应的访问控制策略。若不进行相关配置,访问会被拒绝。
- 配置方式:在头文件base/security/services/iam\_lite/include/policy\_preset.h中配置访问策略。1. 定义各个Feature的策略 2. 将Feature的策略加到全局策略中
- 配置方式:在头文件base/security/services/iam\_lite/ipc\_auth/include/policy\_preset.h中配置访问策略。
1. 定义各个Feature的策略
2. 将Feature的策略加到全局策略中
Eg. 比如当前需要为BMS服务配置访问策略,BMS在Samgr中注册的service为bundlems,注册的Feature为BmsFeature。
一、首先定义Feature的策略,可配置多个Feature,每个Feature可以配置多个访问策略,策略的声明方式参考图2
一、首先定义Feature的策略,可配置多个Feature,每个Feature可以配置多个访问策略,策略的声明方式参考图1
**图 1** Feature策略示例<a name="fig715515221920"></a>
![](figures/Feature策略示例.png "Feature策略示例")
![](figures/bms策略举例.png)
访问策略有三种类型:
**图 2** 访问策略结构体<a name="fig1848524515915"></a>
![](figures/访问策略结构体.png "访问策略结构体")
![](figures/策略类型2.png)
1. type为RANGE类型:允许某个特定范围UID的进程访问,需要指定uidMin和uidMax
......@@ -105,38 +113,38 @@ Eg. 比如当前需要为BMS服务配置访问策略,BMS在Samgr中注册的s
3. type为BUNDLENAME类型:只允许特定的应用访问,需要指定bundleName(包名)
二、将定义的Feature的策略加配到全局策略中,需要配置feature数量,注册参考图4
二、将定义的Feature的策略加配到全局策略中,需要配置feature数量,注册参考图3
**图 3** feature策略注册<a name="fig1181753551014"></a>
![](figures/feature策略注册.png "feature策略注册")
![](figures/全局策略2.png)
UID分配规则
1. Init/foundation进程:0
1. Init进程:0
2. appspawn进程:1
3. Shell进程:2
4. kitfw进程:3
4. 其他内置系统服务UID <= 99
5. 其他内置服务向后递增…最多到99
5. 系统应用(如设置、桌面、相机):100 \~ 999
6. 系统应用(如settings):100 \~ 999
6. 预置厂商应用:1000 \~ 9999
7. 预置厂商应用(如钱包、淘宝):1000 \~ 9999
8. 普通三方应用:10000 \~ INT\_MAX
7. 普通三方应用:10000 \~ INT\_MAX
## HUKS<a name="section9819115764715"></a>
在分布式场景下,不同终端设备的硬件能力和运行系统环境都不尽相同,这些设备在分布式场景下,均需要建立信任关系,最典型的应用即是HiChain可信互联。那么就需要这样一个统一的密钥管理服务,来做到接口一致,密钥数据格式一致,同时提供业界标准的加解密算法实现。HUKS基于此来提供统一的密钥管理、加解密等能力。
在分布式场景下,不同终端设备的硬件能力和运行系统环境都不尽相同。这些设备在分布式场景下均需要建立信任关系,最典型的应用即是HiChain可信互联,那么就需要这样一个统一的密钥管理服务来做到接口一致,密钥数据格式一致,同时提供业界标准的加解密算法实现。HUKS基于此来提供统一的密钥管理、加解密等能力。
HUKS模块整体分为北向接口,南向适配层,以及核心的功能模块:
1. HUKS 北向接口:提供统一的对外API,用C语言实现,保持所有设备一致主要包括密钥生成API、加解密API等;
2. HUKS Core Module:依赖HAL层,提供核心功能加解密、签名验签、密钥存储等;
3. HUKS HAL层:屏蔽底层硬件和OS的差异,定义HUKS需要的统一底层API。主要包括平台算法库、IO和LOG等;
1. HUKS 北向接口:提供统一的对外API,用C语言实现,保持所有设备一致主要包括密钥生成API、加解密API等;
2. HUKS Core Module:依赖HAL层,提供核心功能,如加解密、签名验签、密钥存储等;
3. HUKS HAL层:屏蔽底层硬件和OS的差异,定义HUKS需要的统一底层API,主要包括平台算法库、IO和LOG等。
## HiChain<a name="section19390142934814"></a>
......@@ -232,12 +240,11 @@ OpenHarmony应用安装服务通过校验应用签名验证应用完整性,通
- **应用发布场景**
开发者向华为应用市场发布应用,需要用应用市场签发的应用软件发布证书和应用软件发布profile对应用进行签名。如下图,应用软件发布证书和发布profile的申请方式类似于开发者证书和调试profile申请(支持使用调试场景同一对公私钥对)。使用应用发布证书签名的应用不允许直接在设备中安装,需要上架应用市场审核。审核通过的应用,应用市场将使用应用市场发布证书对应用进行重签名,重签名后的应用才可以被用户下载、安装。
OpenHarmony应用安装服务通过验证应用签名,保证应用软件完整性,通过校验签名证书是否为华为应用市场应用签名证书,保证应用来源可信。
开发者向华为应用市场发布应用,需要用应用市场签发的应用软件发布证书和应用软件发布profile对应用进行签名。如下图,应用软件发布证书和发布profile的申请方式类似于开发者证书和调试profile申请(支持使用调试场景同一对公私钥对)。使用应用发布证书签名的应用不允许直接在设备中安装,需要上架应用市场审核。审核通过的应用,应用市场将使用应用市场发布证书对应用进行重签名,重签名后的应用才可以被用户下载、安装。
![](figures/zh-cn_image_0000001051562162.png)
OpenHarmony应用安装服务通过验证应用签名,保证应用软件完整性,通过校验签名证书是否为华为应用市场应用签名证书,保证应用来源可信。
![](figures/zh-cn_image_0000001051562162.png)
## 涉及仓<a name="section1665013282177"></a>
......
......@@ -2,11 +2,11 @@
## 简介<a name="section7375710115617"></a>
开发过程采用测试驱动开发模式,开发者基于系统新增特性可以通过开发者自己开发用例保证,对于系统已有特性的修改,也可通过修改项目中原有自测试用例保证,开发者自测试旨在帮助开发者在开发阶段就能开发出高质量代码
开发过程采用测试驱动开发模式,开发者基于系统新增特性可以通过开发者自己开发用例保证,对于系统已有特性的修改,也可通过修改项目中原有的测试用例保证,开发者测试旨在帮助开发者在开发阶段就能开发出高质量代码
## 目录<a name="section102031353175317"></a>
**表 1** 开发者测试工具源代码目录结构
**表 1** 开发者测试工具源代码目录结构
<a name="table2977131081412"></a>
<table><thead align="left"><tr id="row7977610131417"><th class="cellrowborder" valign="top" width="33.879999999999995%" id="mcps1.2.3.1.1"><p id="p18792459121314"><a name="p18792459121314"></a><a name="p18792459121314"></a>名称</p>
......@@ -17,7 +17,7 @@
</thead>
<tbody><tr id="row17977171010144"><td class="cellrowborder" valign="top" width="33.879999999999995%" headers="mcps1.2.3.1.1 "><p id="p2793159171311"><a name="p2793159171311"></a><a name="p2793159171311"></a>developertest</p>
</td>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p879375920132"><a name="p879375920132"></a><a name="p879375920132"></a>开发测试框架</p>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p879375920132"><a name="p879375920132"></a><a name="p879375920132"></a>开发测试框架</p>
</td>
</tr>
<tr id="row259142201312"><td class="cellrowborder" valign="top" width="33.879999999999995%" headers="mcps1.2.3.1.1 "><p id="p640585013134"><a name="p640585013134"></a><a name="p640585013134"></a>developertest/src</p>
......@@ -32,7 +32,7 @@
</tr>
<tr id="row6978161091412"><td class="cellrowborder" valign="top" width="33.879999999999995%" headers="mcps1.2.3.1.1 "><p id="p37931659101311"><a name="p37931659101311"></a><a name="p37931659101311"></a>developertest/src/core/build</p>
</td>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p6793059171318"><a name="p6793059171318"></a><a name="p6793059171318"></a>测试用例编译</p>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p6793059171318"><a name="p6793059171318"></a><a name="p6793059171318"></a>测试用例编译</p>
</td>
</tr>
<tr id="row6978201031415"><td class="cellrowborder" valign="top" width="33.879999999999995%" headers="mcps1.2.3.1.1 "><p id="p1738210441049"><a name="p1738210441049"></a><a name="p1738210441049"></a>developertest/src/core/command</p>
......@@ -107,12 +107,12 @@
</tr>
<tr id="row153133019174"><td class="cellrowborder" valign="top" width="33.879999999999995%" headers="mcps1.2.3.1.1 "><p id="p163153019174"><a name="p163153019174"></a><a name="p163153019174"></a>developertest/start.bat</p>
</td>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p194133051713"><a name="p194133051713"></a><a name="p194133051713"></a>开发者测试入口(Windows)</p>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p194133051713"><a name="p194133051713"></a><a name="p194133051713"></a>开发者测试入口(Windows)</p>
</td>
</tr>
<tr id="row6640152712173"><td class="cellrowborder" valign="top" width="33.879999999999995%" headers="mcps1.2.3.1.1 "><p id="p2641202751712"><a name="p2641202751712"></a><a name="p2641202751712"></a>developertest/start.sh</p>
</td>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p86419276175"><a name="p86419276175"></a><a name="p86419276175"></a>开发者测试入口(Linux)</p>
<td class="cellrowborder" valign="top" width="66.12%" headers="mcps1.2.3.1.2 "><p id="p86419276175"><a name="p86419276175"></a><a name="p86419276175"></a>开发者测试入口(Linux)</p>
</td>
</tr>
</tbody>
......@@ -130,31 +130,31 @@
依赖python环境:
需要本地的python安装串口插件pyserial,在shell界面执行安装命令pip intall pyserial,安装成功如下图
需要本地的python安装串口插件pyserial以及readline,在shell界面执行安装命令分别为pip intall pyserial和sudo apt-get install libreadline-dev,安装成功如下图
![](figures/zh-cn_image_0000001052278423.png)
## 编写测试用例<a name="section125411936102918"></a>
- 测试用例规范
- 测试用例规范
- 命名规范
测试用例源文件名称和测试套内容保持一致,测试套与用例之间关系1:N,测试套与测试源文件之间关系1:1,每个源文件全局唯一,格式:\[特性\]\_\[功能\]\_\[子功能1\]\_\[子功能1.1\],子功能支持向下细分。
文件命名采用大驼峰方式命名,以Test结尾,如demo用例:developertest/example/cxx\_demo
文件命名采用全小写+下划线方式命名,以test结尾,如demo用例:developertest/example/cxx\_demo
- 用例编码规范
- 测试用例编码规范
开发者测试用例原则上与特性代码编码规范保持一致,另外需要添加必要的用例描述信息,详见[•自测试用例模板](#li2069415903917)
开发者测试用例原则上与特性代码编码规范保持一致,另外需要添加必要的用例描述信息,详见[•自测试用例模板](#li2069415903917)
- 测试用例编译配置规范
用例采用GN方式编译,配置遵循本开源项目的编译指导[使用](zh-cn_topic_0000001051580775.md)
测试用例采用GN方式编译,配置遵循本开源项目的编译指导[使用](zh-cn_topic_0000001051580775.md)
- <a name="li2069415903917"></a>测试用例模板
- <a name="li2069415903917"></a>测试用例模板
详见测试demo用例developertest/example/cxx\_demo/test/unittest/common/calc\_subtraction\_test.cpp
详见测试demo用例developertest/example/cxx\_demo/test/unittest/common/calc\_subtraction\_test.cpp
>![](public_sys-resources/icon-note.gif) **说明:**
>Feature: 被测特性的描述
......@@ -165,7 +165,7 @@
>CaseDescription:测试用例描述
>step:测试复杂逻辑时注明用例执行的步骤
- 测试用例目录规划
- 测试用例目录规划
```
subsystem(子系统,系统组件)
......@@ -194,13 +194,13 @@
>![](public_sys-resources/icon-note.gif) **说明:**
>其中liteos和Linux仅不同设备形态举例,对于同一特性在不同开发板上,如果用例没有差异,则用例放置common目录下,如果同一特性,用例区分不同设备形态,可能包含内核差异,芯片平台差异,则用例以目录区分
- 编写测试用例步骤
1. 添加用例文件头注释说明
- 编写测试用例步骤
1. 添加测试用例文件头注释信息
2. 引用gtest头文件和ext命名空间
3. 添加被测试类头文件
3. 添加被测试类头文件
4. 定义测试套(测试类)
5. 实现该测试套具体的测试用例,包括用例注释和用例逻辑实现
6. 编写用例编译配置
6. 编写测试用例编译配置
>![](public_sys-resources/icon-note.gif) **说明:**
>\*样例参考:developertest/example/cxx\_demo/test/unittest/common/calc\_subtraction\_test.cpp
......@@ -211,15 +211,15 @@
>d、使用printf函数打印日志
- 编写用例编译文件
- 定义用例编译构建目标
1. 添加用例编译文件头注释信息
2. 导入用例编译模板文件
3. 指定用例文件输出路径
4. 配置用例编译依赖包含目录
5. 指定用例编译目标输出的用例执行文件名称
6. 编写具体的用例编译脚本(添加需要参与编译的源文件、配置和依赖 )
7. 对目标用例文件进行条件分组(分组名称固定为:unittest/moduletest\)
- 编写测试用例编译文件
- 定义测试用例编译构建目标
1. 添加测试用例编译文件头注释信息
2. 导入测试用例编译模板文件
3. 指定测试用例文件的输出路径
4. 配置测试用例编译依赖包含目录
5. 指定测试用例编译目标输出的文件名称
6. 编写具体的测试用例编译脚本(添加需要参与编译的源文件、配置和依赖 )
7. 对目标测试用例文件进行条件分组(分组名称固定为:unittest/moduletest\)
- 如果存在多个测试套,定义公共编译配置
- 将测试用例添加到构建系统中
......@@ -229,16 +229,16 @@
- 测试用例级别定义
- 基本(Level1):<1s
- 重要(Level2):<10s
- 一般(Level3):<5min
- 生僻(Level4):\>5min
- 基本(Level1)
- 重要(Level2)
- 一般(Level3)
- 生僻(Level4)
## 使用测试框架<a name="section75882026185016"></a>
- 安装xdevice基础框架
1. 以Windows环境为例,打开xdevice安装目录:test\\xdevice
1. 以Windows环境为例,打开xdevice安装目录:test/xdevice
2. 打开控制台窗口,执行如下命令
```
......@@ -292,14 +292,14 @@
```
- 执行测试用例前的环境检查
- 执行测试用例前的环境检查
- 系统镜像与文件系统已烧录进开发板,开发板上系统正常运行,在系统模式下,如shell登录时设备提示符OHOS\#
- 开发主机和开发板串口连接正常,网口连接正常
- 开发主机IP与开发板IP处在同一小网网段,相互可以ping通
- 开发主机侧创建空目录用于开发板通过NFS挂载测试用例,并且NFS服务启动正常
- 运行测试套
- 启动测试框架
- 启动测试框架,打开test/developertest目录
1. Windows环境启动测试框架
```
......@@ -318,24 +318,28 @@
根据实际的开发板选择,设备形态配置:developertest/src/core/resource/config/framework\_config.xml
- 执行测试指令
1. 执行测试指令示例,其中-t ut为必选,-ss和-tm为可选字段
1. 查询测试用例支持的子系统,模块,产品形态以及测试类型,使用show命令
```
usage:
show productlist Querying Supported Product Forms
show typelist Querying the Supported Test Type
show subsystemlist Querying Supported Subsystems
show modulelist Querying Supported Modules
```
2. 执行测试指令示例,其中-t为必选,-ss和-tm为可选字段
```
run -t ut -ss test -tm example
```
2. 参数说明:指定参数可以执行特定特性、模块对应的测试套
3. 参数说明:指定参数可以执行特定特性、模块对应的测试套
```
usage: run [-h] [-p PRODUCTFORM] [-t [TESTTYPE [TESTTYPE ...]]]
[-ss SUBSYSTEM] [-tm TESTMODULE] [-ts TESTSUIT]
[-tc TESTCASE] [-tl TESTLEVEL] [-os TARGET_OS_NAME]
[-bv BUILD_VARIANT] [-b [BUILD [BUILD ...]]]
[-cov COVERAGE] [-tf TESTFILE] [-res RESOURCE]
[-sn DEVICE_SN] [-c CONFIG] [-rp REPORTPATH] [-e EXECTYPE]
[-td TEST_DRIVER]
action Specify test para.positional arguments:
action Specify action
[-tc TESTCASE] [-tl TESTLEVEL]
optional arguments:
-h, --help show this help message and exit
......@@ -360,6 +364,15 @@
- 退出自测试平台
- 退出自测试平台,使用如下命令退出测试平台
```
quit
```
## 测试结果与日志<a name="section414715805819"></a>
- 通过在测试框架中执行测试指令,即可以生成测试日志和测试报告
......
......@@ -106,7 +106,7 @@ Samgr:做为中介者,管理Provider提供的能力,同时帮助Consumer
服务名和功能名必需使用常量字符串且长度小于16个字节。
M核:系统依赖上bootstrap服务,在系统启动函数中调用HOS\_SystemInit\(\)函数。
M核:系统依赖上bootstrap服务,在系统启动函数中调用OHOS\_SystemInit\(\)函数。
A核:系统依赖samgr库,在main函数中调用SAMGR\_Bootstrap\(\)函数。
......@@ -622,7 +622,7 @@ A核:系统依赖samgr库,在main函数中调用SAMGR\_Bootstrap\(\)函数
## 涉及仓<a name="section10365113863719"></a>
distributedschedule\_interfaces\_innerkits\_samgr\_lite
distributedschedule\_interfaces\_kits\_samgr\_lite
distributedschedule\_services\_samgr\_lite
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册