diff --git a/contribute/faq-template.md b/contribute/faq-template.md new file mode 100644 index 0000000000000000000000000000000000000000..6ded2b7b48211d84ebbaa554c0a8329b6c540071 --- /dev/null +++ b/contribute/faq-template.md @@ -0,0 +1,36 @@ +# FAQ:标题(简要描述问题关键信息) + +FAQ页面介绍开发过程中遇到的各类问题及解决方法,帮助更多开发者快速消除此类开发障碍。 + +## 简单类问题写作模板 + +简要描述在完成哪些操作时,遇到的问题现象,以及解决方法。 + +## 复杂类问题写作模板 + +**现象描述** + +- 使用的系统软件、硬件版本? +- 在完成哪些操作时,遇到了什么样的问题? + +- 可能显示什么错误消息? + +- 如果可能,请提供屏幕截图。 + + +**可能原因** + +分析哪些原因导致此问题,如果有多个原因,请使用项目列表一一列举。 + +1. XXX +2. XXX + +**处理步骤** + +- 如果有多个解决方案,请按照复杂性排序,并提供什么场景下选择哪种解决方案。 +- 如果可能,请提供屏幕截图,帮助理解步骤完成标准。 +- 代码如有打印输出,请提示打印输出内容_,帮助理解步骤完成标准_。 + +1. XXX +2. XXX + diff --git a/contribute/tutorial-title-task-name.md b/contribute/tutorial-title-task-name.md new file mode 100644 index 0000000000000000000000000000000000000000..c3d29f63c70dc14424a3607a462e5e55899eca06 --- /dev/null +++ b/contribute/tutorial-title-task-name.md @@ -0,0 +1,48 @@ +# 教程:标题(对应的任务名称) + +教程页面介绍如何完成一个复杂的任务开发、功能开发、APP开发。通常教程页面会将开发过程拆解为多个小节,每个小节由一系列步骤组成。同时,教程中一般需要提供代码示例并进行介绍,便于用户了解具体的功能实现。 + +对于教程中可能涉及到的基本概念,简单的概念可以直接介绍,更深度的概念和主题推荐查阅文档对应专题。 + +撰写教程页面时,在“others“目录下面创建新的MarkDown文件。 + +## 总览 + +_写作内容:介绍开发者学习本教程后将完成什么样的任务,实现什么样的功能和效果。__例如,可以是移植教程、实现一个功能开发教程等。_如果可实现多个目标,建议使用项目符号列表。 + +_如果可能,请提供图片或短视频展示实现效果。_ + +## 开发准备 + +- _完成该功能需要的软件、硬件、工具及对应版本信息。_ +- _需要获取的相关权限说明。_ + +## XXX(关键任务一) + +_将教程分解为几个顺序的关键任务或并列不同的场景任务。_ + +1. XXXX。 + + ``` + //代码示例 + ``` + +2. XXXX。 + +_所有的操作步骤,遵循如下写作要求:_ + +1. _步骤明确操作场景和目的,__步骤中执行的主体要描述清楚。_ +2. _步骤中如果涉及接口调用,需要清晰给出使用的接口及其使用说明,示例代码。_ +3. _涉及到工具界面的步骤,可以提供界面截图,帮助理解步骤完成标准。_ +4. _保证代码的逻辑和语法的正确性。_ +5. _代码中关键步骤要有注释说明。_ +6. 代码如有打印输出,请单独提示打印输出内容_,帮助理解步骤完成标准_。 + +## XXX(关键任务二) + +1. XXXX。 + +## 下一步 + +介绍本教程可能关联的后续开发任务,如果没有请删除此内容。 + diff --git "a/contribute/\350\264\241\347\214\256\346\226\207\346\241\243.md" "b/contribute/\350\264\241\347\214\256\346\226\207\346\241\243.md" index ac49b6960ac35237492da5b6c2815be57e378714..ce6d44c138c302186c604bdbbe4502142b1a1ff8 100755 --- "a/contribute/\350\264\241\347\214\256\346\226\207\346\241\243.md" +++ "b/contribute/\350\264\241\347\214\256\346\226\207\346\241\243.md" @@ -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文件夹中。 diff --git a/docs-en/get-code/source-code-acquisition.md b/docs-en/get-code/source-code-acquisition.md index fdd4154d06f41b75c26baba33cbebcc75dde7055..521b65baad6c6ea749403f604d339a92db82b77c 100755 --- a/docs-en/get-code/source-code-acquisition.md +++ b/docs-en/get-code/source-code-acquisition.md @@ -36,16 +36,16 @@ You can download the source code or the corresponding solutions from the image l

1.0

-

Site 1, Site 2

+

Site

-

SHA-256 Verification Code

+

SHA-256 Verification Code

Hi3861 solutions (binary)

1.0

-

Site 1, Site 2

+

Site

SHA-256 Verification Code

@@ -54,25 +54,25 @@ You can download the source code or the corresponding solutions from the image l

1.0

-

Site 1, Site 2

+

Site

-

SHA-256 Verification Code

+

SHA-256 Verification Code

Hi3516 solutions (binary)

1.0

-

Site 1, Site 2

+

Site

-

SHA-256 Verification Code

+

SHA-256 Verification Code

RELEASE-NOTES

1.0

-

Site 1

+

Site

-

diff --git a/docs-en/get-code/tool-acquisition.md b/docs-en/get-code/tool-acquisition.md index 5fa7b5267ec77e9c5113d0a073d90ea4f29ddf68..90ed477644c39785b999bd1112b1a638967af480 100755 --- a/docs-en/get-code/tool-acquisition.md +++ b/docs-en/get-code/tool-acquisition.md @@ -21,7 +21,7 @@ Download the compilation toolchain from image sites listed in the following tabl

9.0.0-34042

-

Site 1 Site 2

+

Site

64a518b50422b6f1ba8f6f56a5e303fb8448a311211ba10c385ad307a1d2546f

@@ -30,7 +30,7 @@ Download the compilation toolchain from image sites listed in the following tabl

7.3.0

-

Site 1 Site 2

+

Site

614ee086ead1a4fd7384332b85dd62707801f323de60dfdb61503f473d470a24

@@ -39,7 +39,7 @@ Download the compilation toolchain from image sites listed in the following tabl

1523

-

Site 1 Site 2

+

Site

50a5a5ba5877dd0ec8afcb23d3dd4d966a16403c29cd80a4002230241d32ef34

@@ -48,7 +48,7 @@ Download the compilation toolchain from image sites listed in the following tabl

1.9.0

-

Site 1 Site 2

+

Site

b4a4ba21e94ff77634e1f88697a00b6f498fdbc0b40d7649df1b246b285874f9

@@ -57,7 +57,7 @@ Download the compilation toolchain from image sites listed in the following tabl

0.65

-

Site 1 Site 2

+

Site

fcfee489371947a464fe41a4b45a897b9a44155891a957f15bad2e157c750162

diff --git a/docs-en/quick-start/developing-the-first-driver-running-on-hi3516.md b/docs-en/quick-start/developing-the-first-driver-running-on-hi3516.md index 1d64e5ebbea49f5cce47f106ae5492a4a8988aa3..3fe79a1f4923ea2ff121e00fa50cc67d2a338291 100755 --- a/docs-en/quick-start/developing-the-first-driver-running-on-hi3516.md +++ b/docs-en/quick-start/developing-the-first-driver-running-on-hi3516.md @@ -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 @@ -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 diff --git a/docs-en/quick-start/developing-the-first-example-program-running-on-hi3516.md b/docs-en/quick-start/developing-the-first-example-program-running-on-hi3516.md index 024eb2b7153fd47ab2107c191c55a79a3905f870..428ced4f97d8daa3df587577b48a3d3de585faa9 100755 --- a/docs-en/quick-start/developing-the-first-example-program-running-on-hi3516.md +++ b/docs-en/quick-start/developing-the-first-example-program-running-on-hi3516.md @@ -4,7 +4,7 @@ This section describes how to modify, compile, burn, and run the first program, ## Acquiring Source Code -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 @@ -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 @@ -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

Command

@@ -453,7 +456,7 @@ Compile and burn images by referring to [Compiling Code](developing-the-first-e

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

saveenv means to save the current configuration.

reset means to reset the board.

-

(Optional) go 0x80000000 indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press Enter in the countdown phase of the U-Boot startup to interrupt the automatic startup.

+

(Optional) go 0x80000000 indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press Enter in the countdown phase of the U-boot startup to interrupt the automatic startup.

@@ -162,7 +165,7 @@ This method applies only to development boards that have network ports, for exam ![](figures/qi1.png) -## Run a Program +## Running a Program In the root directory, run the **./bin/camera\_app** command to operate the demo program. The following figure shows the compilation result. diff --git a/docs-en/quick-start/developing-the-first-example-program-running-on-hi3518.md b/docs-en/quick-start/developing-the-first-example-program-running-on-hi3518.md index 9aebee65819eb0cd804e7bd6afd9db8a4c1ac822..c089ebe8c505fb96a49ec77e69acec50e21f255c 100755 --- a/docs-en/quick-start/developing-the-first-example-program-running-on-hi3518.md +++ b/docs-en/quick-start/developing-the-first-example-program-running-on-hi3518.md @@ -4,7 +4,7 @@ This section describes how to modify, compile, burn, and run the first program o ## Acquiring Source Code -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 @@ -71,14 +71,14 @@ Burn images to the Hi3518EV300 board over the serial port. ## Running an Image -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 ![](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

Command

@@ -148,7 +151,7 @@ This method applies only to development boards that have network ports, for exam

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

saveenv means to save the current configuration.

reset means to reset the board.

-

(Optional) go 0x80000000 indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press Enter in the countdown phase of the U-Boot startup to interrupt the automatic startup.

+

(Optional) go 0x80000000 indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press Enter in the countdown phase of the U-boot startup to interrupt the automatic startup.

diff --git a/docs-en/quick-start/setting-up-a-development-environment-1.md b/docs-en/quick-start/setting-up-a-development-environment-1.md index 1c66dcca365d8398495355965d01491689c117c8..1c51e40f99c7b67441dc81b2bc49f40c358ea3e3 100755 --- a/docs-en/quick-start/setting-up-a-development-environment-1.md +++ b/docs-en/quick-start/setting-up-a-development-environment-1.md @@ -58,61 +58,61 @@ The following table describes the common tools required for Linux and how to obt **Table 2** Development tools and obtaining methods -

Command

@@ -92,7 +92,7 @@ Burn images to the Hi3518EV300 board over the serial port.

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

Run this command to set the content of bootcmd. Select the flash whose number is 0, and read content that has a size of 0x600000 and a start address of 0x100000 to memory address 0x40000000.

-

(Optional) go 0x40000000 indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press Enter in the countdown phase of the U-Boot startup to interrupt the automatic startup.

+

(Optional) go 0x40000000 indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press Enter in the countdown phase of the U-boot startup to interrupt the automatic startup.

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

In this command, bootargs is set to the serial port output, the baud rate is 115200, the data bit is 8, and the rootfs is mounted to the flash memory. The file system type is set to jffs2 rw, which provides the read-write attribute for the JFFS2 file system.

rootaddr=7 M rootsize=8 M indicates the actual start address and length of the rootfs.img file to be burnt. The size must be the same as that of the compiled files in the HiTool.

@@ -115,5 +115,5 @@ Burn images to the Hi3518EV300 board over the serial port. ## Follow-up Learning -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). diff --git a/docs-en/quick-start/developing-the-first-example-program-running-on-hi3861.md b/docs-en/quick-start/developing-the-first-example-program-running-on-hi3861.md index 88734f1912abde6108a7ec38fb6738811a6973b2..2093cee18a07929ea7b2ff0480e6f880d4db9c76 100755 --- a/docs-en/quick-start/developing-the-first-example-program-running-on-hi3861.md +++ b/docs-en/quick-start/developing-the-first-example-program-running-on-hi3861.md @@ -4,7 +4,7 @@ This example shows how to use attention \(AT\) commands to complete WLAN module ## Acquiring Source Code -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 diff --git a/docs-en/quick-start/developing-the-second-example-program-running-on-hi3861.md b/docs-en/quick-start/developing-the-second-example-program-running-on-hi3861.md index e8358ef045cd3c8fb9ba289fd5f28d2c743edcdc..31f1b5d87dba44252b069875b76c262dd1e7f5c3 100755 --- a/docs-en/quick-start/developing-the-second-example-program-running-on-hi3861.md +++ b/docs-en/quick-start/developing-the-second-example-program-running-on-hi3861.md @@ -144,5 +144,5 @@ wifi init success! ## Follow-up Learning -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). diff --git a/docs-en/quick-start/faqs-0.md b/docs-en/quick-start/faqs-0.md index f29b798342873d20273b181bff09caf8b2db0292..12610762aaa2b6fdc3817b3ee45220e1a65e6f91 100755 --- a/docs-en/quick-start/faqs-0.md +++ b/docs-en/quick-start/faqs-0.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 + ![](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 + + + ![](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 + ![](figures/serial-port-displayed-after-the-u-boot-is-burnt.png "serial-port-displayed-after-the-u-boot-is-burnt") + + diff --git a/docs-en/quick-start/faqs-2.md b/docs-en/quick-start/faqs-2.md index ffc8060fc952ba6597b823b3074bac12e9e774ad..feb6b39d5cd0b5b64fa2ca606ae2921b739b9879 100755 --- a/docs-en/quick-start/faqs-2.md +++ b/docs-en/quick-start/faqs-2.md @@ -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 - ![](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 + **Figure 2** Procedure for burning the U-boot using HiTool ![](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 - ![](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 + ![](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** diff --git a/docs-en/quick-start/figures/adding-the-hi3516dv300-board.png b/docs-en/quick-start/figures/adding-the-hi3516dv300-board.png index 81a2b496aacb056d6003d0fe440e9d1dfe8f96e8..2d807c348ffdb802b239e295abb7b7e079e213e5 100755 Binary files a/docs-en/quick-start/figures/adding-the-hi3516dv300-board.png and b/docs-en/quick-start/figures/adding-the-hi3516dv300-board.png differ diff --git a/docs-en/quick-start/figures/appearance-of-hi3861-wlan-module.png b/docs-en/quick-start/figures/appearance-of-hi3861-wlan-module.png index df3f85daabb08e137bafd8a098c6f882f1a5776b..ccc714eadc965fc4b29703c3156e730f84c97596 100755 Binary files a/docs-en/quick-start/figures/appearance-of-hi3861-wlan-module.png and b/docs-en/quick-start/figures/appearance-of-hi3861-wlan-module.png differ diff --git a/docs-en/quick-start/figures/procedure-for-changing-the-serial-port-number-4.png b/docs-en/quick-start/figures/procedure-for-changing-the-serial-port-number-4.png new file mode 100644 index 0000000000000000000000000000000000000000..f699204d10d39eb088c0ecc7aa08ba134ec4b6b6 Binary files /dev/null and b/docs-en/quick-start/figures/procedure-for-changing-the-serial-port-number-4.png differ diff --git a/docs-en/quick-start/figures/serial-port-displayed-after-the-u-boot-is-burnt-5.png b/docs-en/quick-start/figures/serial-port-displayed-after-the-u-boot-is-burnt-5.png new file mode 100644 index 0000000000000000000000000000000000000000..4e2a2794e63f64341e448313968b6f82d237543d Binary files /dev/null and b/docs-en/quick-start/figures/serial-port-displayed-after-the-u-boot-is-burnt-5.png differ diff --git a/docs-en/quick-start/figures/serial-port-displayed-after-the-u-boot-is-burnt.png b/docs-en/quick-start/figures/serial-port-displayed-after-the-u-boot-is-burnt.png index 4e2a2794e63f64341e448313968b6f82d237543d..ad4fd618860ca9f79e9bdc39436c3b2f9cdb72de 100755 Binary files a/docs-en/quick-start/figures/serial-port-displayed-after-the-u-boot-is-burnt.png and b/docs-en/quick-start/figures/serial-port-displayed-after-the-u-boot-is-burnt.png differ diff --git "a/docs-en/quick-start/figures/\346\234\252\345\221\275\345\220\215\345\233\276\347\211\20711111.png" "b/docs-en/quick-start/figures/\346\234\252\345\221\275\345\220\215\345\233\276\347\211\20711111.png" new file mode 100644 index 0000000000000000000000000000000000000000..4b8caa20e71b5a592b82a625d9f022a29667427d Binary files /dev/null and "b/docs-en/quick-start/figures/\346\234\252\345\221\275\345\220\215\345\233\276\347\211\20711111.png" differ diff --git a/docs-en/quick-start/introduction-to-the-hi3861-development-board.md b/docs-en/quick-start/introduction-to-the-hi3861-development-board.md index 0cbcbe583033866e300b75bd797b708e8b8a231c..8fb93d867301459da72cecec565d434d12411515 100755 --- a/docs-en/quick-start/introduction-to-the-hi3861-development-board.md +++ b/docs-en/quick-start/introduction-to-the-hi3861-development-board.md @@ -43,9 +43,9 @@ As the Hi3861 only offers 2 MB Flash and 352 KB RAM, use them efficiently when c

General specifications

  • Operates over 1×1 2.4 GHz frequency band (ch1-ch14).
  • The physical layer (PHY) complies with the IEEE 802.11b/g/n protocol.
  • The media access control (MAC) layer complies with the IEEE802.11 d/e/h/i/k/v/w protocol.
-
  • Includes the built-in public address (PA) and local area network (LAN); integrates transmit-receive (Tx/Rx) switch and Balun.
  • 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.
  • Supports WPA and WPA2 from WFA (personal), and WPS 2.0.
  • Supports three kinds of packet traffic arbiter (PTA) (2- , 3- , or 4-wire PTA), each of which coexists with the BT or BLE chip.
  • The input voltage ranges from 2.3 V to 3.6 V.
+
  • Includes the built-in public address (PA) and local area network (LAN); integrates transmit-receive (Tx/Rx) switch and Balun.
  • 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.
  • Supports WPA and WPA2 from WFA (personal), and WPS 2.0.
  • Supports three kinds of packet traffic arbiter (PTA) (2-, 3-, or 4-wire PTA), each of which coexists with the BT or BLE chip.
  • The input voltage ranges from 2.3 V to 3.6 V.
  • The input/output (I/O) power voltage can be 1.8 V or 3.3 V.
-
  • Supports self-calibration for RF hardware.
  • Performs with low power consumption:
    • Ultra deep sleep mode: 5 μA@3.3
    • VDTIM1: 1.5mA@3.3V
    • DTIM3: 0.8mA@3.3V
    +
    • Supports self-calibration for RF hardware.
    • Performs with low power consumption:
      • Ultra deep sleep mode: 5 μA @ 3.3 V
      • DTIM1: 1.5 mA @ 3.3 V
      • DTIM3: 0.8 mA @ 3.3 V
- - - - - - - @@ -310,7 +310,7 @@ sudo ln -s /bin/bash /bin/sh ## 安装gn 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 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”,如果能正确显示编译器版本号,表明编译器安装成功。 diff --git "a/readme/DFX\345\255\220\347\263\273\347\273\237README.md" "b/readme/DFX\345\255\220\347\263\273\347\273\237README.md" index 85fef3ad83bb4211394f8fa4096644393ffaa831..3e03ca4adaf45e57cc07b440175d2e1e0274059a 100755 --- "a/readme/DFX\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/DFX\345\255\220\347\263\273\347\273\237README.md" @@ -2,13 +2,13 @@ ## 简介 -该仓库用于存放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接口规范。 ## 目录 @@ -64,7 +64,7 @@ - - @@ -102,7 +102,7 @@ ## 约束 -mini框架整体代码使用标准C开发,对外的接口依赖统一通过util封装,如软硬件平台不同需要适配,需要在vendor下实现适配处理。 +mini框架整体代码使用标准C开发。 ## 使用-mini框架 @@ -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全局参数配置。默认情况下不用修改,日志默认输出到串口。 -

Development Tool

+ - - - - - - - - - - - - - - - - - - - - - - - @@ -140,7 +140,7 @@ The following table describes the common tools required for Linux and how to obt - @@ -246,7 +246,7 @@ sudo ln -s /bin/bash /bin/sh ## Installing gn 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. @@ -254,7 +254,7 @@ sudo ln -s /bin/bash /bin/sh ## Installing ninjah 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. @@ -262,7 +262,7 @@ sudo ln -s /bin/bash /bin/sh ## Installing the LLVM Toolchain 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. @@ -270,8 +270,8 @@ sudo ln -s /bin/bash /bin/sh ## Installing hc-gen 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. diff --git a/docs-en/quick-start/setting-up-a-development-environment.md b/docs-en/quick-start/setting-up-a-development-environment.md index 59c381943bc927389a9347ee8475a3c2ccf344e9..95e689004c9b0970d06ad93bdd0d70751855d4c6 100755 --- a/docs-en/quick-start/setting-up-a-development-environment.md +++ b/docs-en/quick-start/setting-up-a-development-environment.md @@ -67,7 +67,7 @@ The following table describes the tools required for setting up the general envi - - - @@ -298,7 +298,7 @@ sudo ln -s /bin/bash /bin/sh ## Installing gn 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 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. diff --git a/docs-en/quick-start/setting-up-a-hi3516-board-environment.md b/docs-en/quick-start/setting-up-a-hi3516-board-environment.md index 5a399f6c3a4150b0a914d5b0e244527db9bc5bdd..205948a0587106616ca431e9accfa1175eb0e3f0 100755 --- a/docs-en/quick-start/setting-up-a-hi3516-board-environment.md +++ b/docs-en/quick-start/setting-up-a-hi3516-board-environment.md @@ -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 -

Development Tool

Description

+

Description

How to Obtain

+

How to Obtain

Python3.7+

+

Python3.7+

Runs the compilation scripts.

+

Runs the compilation scripts.

https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz

+

https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz

bash

+

bash

Executes commands.

+

Executes commands.

Internet

+

Internet

gn

+

gn

Generates ninja compilation scripts.

+

Generates ninja compilation scripts.

http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar

ninja

+

ninja

Executes ninja compilation scripts.

+

Executes ninja compilation scripts.

http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar

LLVM

+

LLVM

Functions as the compiler toolchain.

+

Functions as the compiler toolchain.

http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar

+

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

hc-gen

+

hc-gen

Configures and compiles files.

+

Configures and compiles files.

http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

IPOP, PuTTY, or other HyperTerminal software

+

IPOP, PuTTY, or other HyperTerminal software

Connects to the Linux server (choose one of the terminals).

+

Connects to the Linux server (choose one of the terminals).

Internet (for example, https://www.putty.org/)

+

Internet (for example, https://www.putty.org/)

HiTool

Burns the images and the U-Boot.

+

Burns the images and the U-boot.

http://www.hihope.org/download

Executes script cross compilation.

http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz

+

https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz

Python3.7+

@@ -102,14 +102,14 @@ The following table describes the tools required for setting up the general envi

Generates ninja compilation scripts.

http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar

ninja

Executes ninja compilation scripts.

http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar

- - - @@ -54,25 +54,25 @@ OpenHarmony是HarmonyOS的开源版,由华为捐赠给开放原子开源基金 - - - - - @@ -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 diff --git "a/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" "b/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" index 007211fe4331a40176d812912a5ec7a01e7f01a6..820fc481049f43773ceac25d13dc7d9024f12e47 100755 --- "a/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" +++ "b/get-code/\350\216\267\345\217\226\345\267\245\345\205\267.md" @@ -21,7 +21,7 @@ - @@ -30,7 +30,7 @@ - @@ -39,7 +39,7 @@ - @@ -48,7 +48,7 @@ - @@ -57,7 +57,7 @@ - diff --git "a/guide/\347\244\272\344\276\213\345\274\200\345\217\221.md" "b/guide/\347\244\272\344\276\213\345\274\200\345\217\221.md" index ac7f0267fc7d340b8705fd082595789a4e5335e7..02a8888db1eea3313a4dec00aa714d84e40060e2 100755 --- "a/guide/\347\244\272\344\276\213\345\274\200\345\217\221.md" +++ "b/guide/\347\244\272\344\276\213\345\274\200\345\217\221.md" @@ -1,6 +1,6 @@ # 示例开发 -相机开发基本概念可参考:[相机开发概述](zh-cn_topic_0000001051690589.md)。 +相机开发基本概念可参考:[相机开发概述](../subsystems/相机开发概述.md)。 若开发者想先查看示例效果,可先跳过本节,进入[应用实例](应用实例.md)。如需自定义应用行为,可参考本节描述对示例代码进行修改。 diff --git "a/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" "b/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" index 076e5b7d9334ff3373744047e559eaa9ea5d734d..38f43f223e4217d404ce2c9e1334474df683179d 100755 --- "a/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" +++ "b/quick-start/Hi3861\345\274\200\345\217\221\346\235\277\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" @@ -4,7 +4,7 @@ ## 源码获取 -开发者需要在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)。 ## 源码编译 @@ -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** 波特率和数据位配置示意图 @@ -75,7 +75,7 @@ Hi3861 WLAN模组的镜像烧录可以通过OpenHarmony IDE工具DevEco完成, **图 9** 烧录包路径示意图 - ![](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模组联网 -完成版本构建及烧录后,下面开始介绍如何在DevEco的串口终端上执行AT命令,使WLAN模组联网。 +完成版本构建及烧录后,下面开始介绍如何在串口终端上执行AT命令,使WLAN模组联网。 -1. 保持Windows工作台和WLAN模组的连接状态,在DevEco工具最下方,点击“Serial port”按钮,弹出串口终端的配置界面。 +>![](public_sys-resources/icon-note.gif) **说明:** +>- DevEco串口连接功能待上线,敬请期待。 +>- 该样例中使用IPOP(或其他)串口工具进行演示,IPOP工具请开发者通过互联网获取。 - **图 13** 打开DevEco串口终端示意图 - ![](figures/打开DevEco串口终端示意图.png "打开DevEco串口终端示意图") +1. 通过USB线,连接Windows工作台和Hi3861开发板,确认待连接串口为COM11,如下图所示。 -2. 选择串口,并完成参数配置。根据实际情况输入串口号,此处为“COM11”;波特率、数据位、停止位使用默认值;由于AT命令输入需要以“\\r\\n”结尾,否则输入无效,所以结束符处输入“1”。 + **图 13** 设备管理器的COM示意图 + + + ![](figures/zh-cn_image_0000001055268090.png) + +2. 在Windows工作台上,使用IPOP工具,连接WLAN模组串口(COM11),并配置好波特率115200,同时勾选Newline,确保输入字符串以"\\r\\n"结尾,避免AT命令无法输入。 + + **图 14** IPOP连接配置示意图 + + + ![](figures/zh-cn_image_0000001055427946.png) - **图 14** 串口参数配置示意图 - ![](figures/串口参数配置示意图.png "串口参数配置示意图") +3. 复位WLAN模组,终端界面显示“ready to OS start”,则启动成功。 -3. 复位WLAN模组,观察到终端界面“ready to OS start”日志打印,启动成功。 + **图 15** WLAN复位成功示意图 + - **图 15** 复位WLAN模组示意图 - ![](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模组联网成功示意图 + - **图 16** WLAN模组联网成功示意图 - ![](figures/WLAN模组联网成功示意图.png "WLAN模组联网成功示意图") + ![](figures/zh-cn_image_0000001055428072.png) diff --git "a/quick-start/figures/HiTool\345\267\245\345\205\267U-boot\347\203\247\345\206\231\345\256\214\346\210\220\344\270\262\345\217\243\346\230\276\347\244\272-4.png" "b/quick-start/figures/HiTool\345\267\245\345\205\267U-boot\347\203\247\345\206\231\345\256\214\346\210\220\344\270\262\345\217\243\346\230\276\347\244\272-4.png" new file mode 100644 index 0000000000000000000000000000000000000000..4e2a2794e63f64341e448313968b6f82d237543d Binary files /dev/null and "b/quick-start/figures/HiTool\345\267\245\345\205\267U-boot\347\203\247\345\206\231\345\256\214\346\210\220\344\270\262\345\217\243\346\230\276\347\244\272-4.png" differ diff --git "a/quick-start/figures/HiTool\345\267\245\345\205\267U-boot\347\203\247\345\206\231\345\256\214\346\210\220\344\270\262\345\217\243\346\230\276\347\244\272.png" "b/quick-start/figures/HiTool\345\267\245\345\205\267U-boot\347\203\247\345\206\231\345\256\214\346\210\220\344\270\262\345\217\243\346\230\276\347\244\272.png" index 4e2a2794e63f64341e448313968b6f82d237543d..ad4fd618860ca9f79e9bdc39436c3b2f9cdb72de 100755 Binary files "a/quick-start/figures/HiTool\345\267\245\345\205\267U-boot\347\203\247\345\206\231\345\256\214\346\210\220\344\270\262\345\217\243\346\230\276\347\244\272.png" and "b/quick-start/figures/HiTool\345\267\245\345\205\267U-boot\347\203\247\345\206\231\345\256\214\346\210\220\344\270\262\345\217\243\346\230\276\347\244\272.png" differ diff --git a/quick-start/figures/zh-cn_image_0000001055148043.png b/quick-start/figures/zh-cn_image_0000001055148043.png new file mode 100644 index 0000000000000000000000000000000000000000..d8f0f95d6e464a7af8e81ef8466fedd7f760a75d Binary files /dev/null and b/quick-start/figures/zh-cn_image_0000001055148043.png differ diff --git a/quick-start/figures/zh-cn_image_0000001055268090.png b/quick-start/figures/zh-cn_image_0000001055268090.png new file mode 100644 index 0000000000000000000000000000000000000000..dfc4a7bd9438664d3fe1cade7738ba72e68c586d Binary files /dev/null and b/quick-start/figures/zh-cn_image_0000001055268090.png differ diff --git a/quick-start/figures/zh-cn_image_0000001055427138.png b/quick-start/figures/zh-cn_image_0000001055427138.png new file mode 100644 index 0000000000000000000000000000000000000000..8c1b5d1af9f49d9d8a00602e0a658fcb6123cd71 Binary files /dev/null and b/quick-start/figures/zh-cn_image_0000001055427138.png differ diff --git a/quick-start/figures/zh-cn_image_0000001055427946.png b/quick-start/figures/zh-cn_image_0000001055427946.png new file mode 100644 index 0000000000000000000000000000000000000000..c25b5c13128538f063fe0875c66191fe88802590 Binary files /dev/null and b/quick-start/figures/zh-cn_image_0000001055427946.png differ diff --git a/quick-start/figures/zh-cn_image_0000001055428072.png b/quick-start/figures/zh-cn_image_0000001055428072.png new file mode 100644 index 0000000000000000000000000000000000000000..3e305a77258d959459ee9a052d17edf0669314cc Binary files /dev/null and b/quick-start/figures/zh-cn_image_0000001055428072.png differ diff --git "a/quick-start/figures/\344\277\256\346\224\271\344\270\262\345\217\243\345\217\267\345\233\276\347\244\272-3.png" "b/quick-start/figures/\344\277\256\346\224\271\344\270\262\345\217\243\345\217\267\345\233\276\347\244\272-3.png" new file mode 100644 index 0000000000000000000000000000000000000000..f699204d10d39eb088c0ecc7aa08ba134ec4b6b6 Binary files /dev/null and "b/quick-start/figures/\344\277\256\346\224\271\344\270\262\345\217\243\345\217\267\345\233\276\347\244\272-3.png" differ diff --git "a/quick-start/figures/\346\234\252\345\221\275\345\220\215\345\233\276\347\211\20711111.png" "b/quick-start/figures/\346\234\252\345\221\275\345\220\215\345\233\276\347\211\20711111.png" new file mode 100644 index 0000000000000000000000000000000000000000..4b8caa20e71b5a592b82a625d9f022a29667427d Binary files /dev/null and "b/quick-start/figures/\346\234\252\345\221\275\345\220\215\345\233\276\347\211\20711111.png" differ diff --git "a/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" "b/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" index d02d3aaedee9af6f07c3ac01d50abbdd8043c2dc..1f48e478aed84eb45ad53316ee26e9b5a3964d5f 100755 --- "a/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" +++ "b/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-1.md" @@ -120,3 +120,57 @@ ![](figures/zh-cn_image_0000001054875562.png) +**问题 5:串口无回显。** + +- **现象描述** + + 串口显示已连接,重启单板后,回车无任何回显。 + +- **可能原因** + - 串口连接错误。 + - 单板U-boot被损坏。 + +- **解决办法** + + **解决办法1:修改串口号** + + 请查看设备管理器,确认连接单板的串口与终端中连接串口是否一致,若不一致,请按步骤修改串口号。 + + **图 10** 修改串口号图示 + ![](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烧写步骤图 + + + ![](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烧写完成串口显示 + ![](figures/HiTool工具U-boot烧写完成串口显示.png "HiTool工具U-boot烧写完成串口显示") + + diff --git "a/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" "b/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" index f5616e23bd14656e89e53ed9030ab3751965b511..1c25ec9d9b047933c8567ede7e9541fe3bd315f4 100755 --- "a/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" +++ "b/quick-start/\345\270\270\350\247\201\351\227\256\351\242\230-3.md" @@ -12,10 +12,12 @@ - **解决办法** + **解决办法1:修改串口号** + 请查看设备管理器,确认连接单板的串口与终端中连接串口是否一致,若不一致,请按步骤修改串口号。 **图 1** 修改串口号图示 - ![](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烧写完成串口显示 - ![](figures/HiTool工具U-boot烧写完成串口显示.png "HiTool工具U-boot烧写完成串口显示") + ![](figures/HiTool工具U-boot烧写完成串口显示-4.png "HiTool工具U-boot烧写完成串口显示-4") **问题 2:HiTool工具烧写时上报如下错误。** diff --git "a/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\345\272\224\347\224\250\347\250\213\345\272\217\347\244\272\344\276\213.md" "b/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\345\272\224\347\224\250\347\250\213\345\272\217\347\244\272\344\276\213.md" index 15801a72dd750930e6f28fd4c962d94e190156e6..5b00e7bec3c1ab142fe343c1d917184af680b5ec 100755 --- "a/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\345\272\224\347\224\250\347\250\213\345\272\217\347\244\272\344\276\213.md" +++ "b/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\345\272\224\347\224\250\347\250\213\345\272\217\347\244\272\344\276\213.md" @@ -4,7 +4,7 @@ ## 获取源码 -开发者需要在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)。 ## 修改应用程序 @@ -114,6 +114,9 @@ python build.py ipcamera_hi3516dv300 -b debug 1. 连接串口。 + >![](public_sys-resources/icon-notice.gif) **须知:** + >若无法连接串口,请参考常见问题5进行排查。 + **图 9** 连接串口图 diff --git "a/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\351\251\261\345\212\250\347\250\213\345\272\217\347\244\272\344\276\213.md" "b/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\351\251\261\345\212\250\347\250\213\345\272\217\347\244\272\344\276\213.md" index d913c11639e2cbcbd382e23c6d382a4bfe8ca878..72716dc85f18442fb461c84f52b5291830d398d8 100755 --- "a/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\351\251\261\345\212\250\347\250\213\345\272\217\347\244\272\344\276\213.md" +++ "b/quick-start/\345\274\200\345\217\221Hi3516\347\254\254\344\270\200\344\270\252\351\251\261\345\212\250\347\250\213\345\272\217\347\244\272\344\276\213.md" @@ -419,6 +419,9 @@ 1. 连接串口。 + >![](public_sys-resources/icon-notice.gif) **须知:** + >若无法连接串口,请参考常见问题5进行排查。 + **图 1** 连接串口图 diff --git "a/quick-start/\345\274\200\345\217\221Hi3518\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" "b/quick-start/\345\274\200\345\217\221Hi3518\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" index 1397fff09f0ecb4c98dfd9a2e33dd9c4a6637a32..5129d1789185ba4dd177f4b5e4a6d46c2f2eac5e 100755 --- "a/quick-start/\345\274\200\345\217\221Hi3518\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" +++ "b/quick-start/\345\274\200\345\217\221Hi3518\347\254\254\344\270\200\344\270\252\347\244\272\344\276\213\347\250\213\345\272\217.md" @@ -4,7 +4,7 @@ ## 获取源码 -开发者需要在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)。 ## 修改应用程序 @@ -115,5 +115,5 @@ Hi3518EV300单板请使用串口烧写。 ## 下一步学习 -恭喜您,已完成Hi3518的快速上手!建议您下一步进入[无屏摄像头产品开发](zh-cn_topic_0000001055366100.md)的学习 。 +恭喜您,已完成Hi3518的快速上手!建议您下一步进入[无屏摄像头产品开发](../guide/摄像头控制.md)的学习 。 diff --git "a/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-0.md" "b/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-0.md" index 55d0bf8f5b02ded06ee33d362e7a71fa44efb5ac..4c1d029fc923507c42d3a051167a489a3f3dcf57 100755 --- "a/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-0.md" +++ "b/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-0.md" @@ -89,28 +89,28 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示 - - - - + + + +

Development Tool

+ - - - - - - - - - - - - - - - - - - - - - - - @@ -152,6 +152,13 @@ The following table describes the common tools required for Linux and how to obt + + + +

Development Tool

Description

+

Description

How to Obtain

+

How to Obtain

Python3.7+

+

Python3.7+

Runs the compilation scripts.

+

Runs the compilation scripts.

https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz

+

https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz

bash

+

bash

Executes commands.

+

Executes commands.

Internet

+

Internet

gn

+

gn

Generates ninja compilation scripts.

+

Generates ninja compilation scripts.

http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar

ninja

+

ninja

Executes ninja compilation scripts.

+

Executes ninja compilation scripts.

http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar

LLVM

+

LLVM

Functions as the compiler toolchain.

+

Functions as the compiler toolchain.

http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar

+

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

hc-gen

+

hc-gen

Configures and compiles files.

+

Configures and compiles files.

http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

IPOP, PuTTY, or other HyperTerminal software

+

IPOP, PuTTY, or other HyperTerminal software

Connects to the Linux server (choose one of the terminals).

+

Connects to the Linux server (choose one of the terminals).

Internet (for example, https://www.putty.org/)

+

Internet (for example, https://www.putty.org/)

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

HiTool

+

Burns the images and the U-boot.

+

http://www.hihope.org/download

+
@@ -253,7 +260,7 @@ sudo ln -s /bin/bash /bin/sh ## Installing gn 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 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 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 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. diff --git "a/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" "b/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" index 4a9dbd455c5876eb87fa60ac32eb9858a0a72127..0ca8821ef742c7d6f9d1a2ad7f529841303d1e14 100755 --- "a/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" +++ "b/get-code/\346\272\220\347\240\201\350\216\267\345\217\226.md" @@ -36,16 +36,16 @@ OpenHarmony是HarmonyOS的开源版,由华为捐赠给开放原子开源基金

1.0

站点1站点2

+

站点

SHA256 校验码

+

SHA256 校验码

Hi3861解决方案(二进制)

1.0

站点1站点2

+

站点

SHA256 校验码

1.0

站点1站点2

+

站点

SHA256 校验码

+

SHA256 校验码

Hi3516解决方案(二进制)

1.0

站点1站点2

+

站点

SHA256 校验码

+

SHA256 校验码

RELEASE-NOTES

1.0

站点1

+

站点

-

9.0.0-34042

站点1 站点2

+

站点

64a518b50422b6f1ba8f6f56a5e303fb8448a311211ba10c385ad307a1d2546f

7.3.0

站点1 站点2

+

站点

614ee086ead1a4fd7384332b85dd62707801f323de60dfdb61503f473d470a24

1523

站点1 站点2

+

站点

50a5a5ba5877dd0ec8afcb23d3dd4d966a16403c29cd80a4002230241d32ef34

1.9.0

站点1 站点2

+

站点

b4a4ba21e94ff77634e1f88697a00b6f498fdbc0b40d7649df1b246b285874f9

0.65

站点1 站点2

+

站点

fcfee489371947a464fe41a4b45a897b9a44155891a957f15bad2e157c750162

产生ninja编译脚本

http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar

ninja

执行ninja编译脚本

http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar

LLVM

编译工具链

http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar

+

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

hc-gen

驱动配置编译工具

http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

IPOP、PuTTY或其他超级终端

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

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

HiTool工具

+

U-boot,镜像文件烧写工具

+

http://www.hihope.org/download

+
@@ -256,7 +263,7 @@ sudo ln -s /bin/bash /bin/sh ## 安装gn 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 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编译工具链 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 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"。 diff --git "a/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-2.md" "b/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-2.md" index 88f5ea046bb14e545a397e18d5ef01a0e06d5522..a96a7226672c4b3cc0662f0c6e747a1344068992 100755 --- "a/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-2.md" +++ "b/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203-2.md" @@ -84,28 +84,28 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示

产生ninja编译脚本

http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar

ninja

执行ninja编译脚本

http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar

LLVM

编译工具链

http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar

+

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

hc-gen

驱动配置编译工具

http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar

IPOP、PuTTY或其他超级终端

@@ -249,7 +249,7 @@ sudo ln -s /bin/bash /bin/sh ## 安装gn 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 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编译工具链 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 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"。 diff --git "a/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203.md" "b/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203.md" old mode 100755 new mode 100644 index cd36732887a3c7e6d0c8176526c52f0c4e41cc74..e629fae462bbaef89a598ded1e7dda4fd772f53f --- "a/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203.md" +++ "b/quick-start/\346\220\255\345\273\272\347\216\257\345\242\203.md" @@ -67,7 +67,7 @@ Linux服务器通用环境配置需要的工具及其获取途径如下表所示

交叉编译工具

http://tools.harmonyos.com/mirrors/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz

+

https://repo.huaweicloud.com/harmonyos/compiler/gcc_riscv32/7.3.0/linux/gcc_riscv32-linux-7.3.0.tar.gz

Python3.7+

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

产生ninja编译脚本

http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/gn/1523/linux/gn.1523.tar

ninja

执行ninja编译脚本

http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar

+

https://repo.huaweicloud.com/harmonyos/compiler/ninja/1.9.0/linux/ninja.1.9.0.tar

services/hiview_lite

DFX框架服务化注册

+

DFX mini框架服务化注册

frameworks/ddrdump_lite

@@ -94,7 +94,7 @@

utils/lite

公共基础操作定义实现。包含了miini框架的config配置

+

公共基础操作定义实现。包含了mini框架的config配置

@@ -157,7 +155,6 @@ DFX-mini是一套简单小巧的DFX设计,对外提供log功能:

OUTPUT_OPTION_DEBUG 日志不进行跨任务调度直接输出到串口,仅适合临时调测使用。

OUTPUT_OPTION_FLOW 日志流式输出到串口(默认设置)

OUTPUT_OPTION_TEXT_FILE 日志输出为文本文件

-

OUTPUT_OPTION_BIN_FILE 日志输出为二进制文件(后续支持)

- @@ -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 +3. 包含头文件:\#include -在BUILD.gn中添加依赖库 libhilog。 +4. 在BUILD.gn中添加依赖库 libhilog。 接口规则介绍: @@ -284,7 +285,7 @@ HILOGD(fmt,...) HILOGI(fmt,...) HILOGW(fmt,...) HILOGE(fmt,...) - - @@ -70,7 +69,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层 - @@ -79,7 +78,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层 - @@ -88,7 +87,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层 - @@ -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); diff --git "a/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237README.md" "b/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237README.md" index d1583ca09eccd5a53b9f2c09f1fa96535225ef56..03ba49855c51a8fcf87b4ec850f0570bc3cf2ca2 100755 --- "a/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/\345\206\205\346\240\270\345\255\220\347\263\273\347\273\237README.md" @@ -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`代码仓库进行介绍。 ## 目录 -**表 1** OpenHarmony轻内核源代码目录结构 +**表 1** OpenHarmony内核源代码目录结构

配置项

level

@@ -180,7 +177,7 @@ DFX-mini是一套简单小巧的DFX设计,对外提供log功能:

eventSwitch

事件功能开关。编译前关闭则不再初始化DUMP组件。默认关闭。取值如下:

+

事件功能开关。编译前关闭则不再初始化Event组件。默认关闭。取值如下:

HIVIEW_FEATURE_ON/ HIVIEW_FEATURE_OFF

domain

领域标识ID,需要找DFT申请,未经申请的domain会出现日志打印不出来的问题

+

领域标识ID

tag

@@ -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的个数。 ## 涉及仓 diff --git "a/readme/JS\345\272\224\347\224\250\345\274\200\345\217\221\346\241\206\346\236\266README.md" "b/readme/JS\345\272\224\347\224\250\345\274\200\345\217\221\346\241\206\346\236\266README.md" index 1d001b0f6763e1d8b98607d75e9cb1bbd2c4b3ed..0e98449019b32c9dd99d3d3c443210e75a9ae1ed 100755 --- "a/readme/JS\345\272\224\347\224\250\345\274\200\345\217\221\346\241\206\346\236\266README.md" +++ "b/readme/JS\345\272\224\347\224\250\345\274\200\345\217\221\346\241\206\346\236\266README.md" @@ -2,7 +2,7 @@ ## 简介 -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接口存放目录 ``` ## 约束 -- 语言版本 +- 语言版本: - 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** -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 @@ -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/ diff --git "a/readme/XTS\350\256\244\350\257\201\345\255\220\347\263\273\347\273\237README.md" "b/readme/XTS\350\256\244\350\257\201\345\255\220\347\263\273\347\273\237README.md" index b66acd065fa011e48027256a1fb9e2ae770610d5..c44113c0201ab6edc1f80223f6ac95c7b7b1cc0a 100755 --- "a/readme/XTS\350\256\244\350\257\201\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/XTS\350\256\244\350\257\201\345\255\220\347\263\273\347\273\237README.md" @@ -6,8 +6,8 @@ XTS是OpenHarmony生态认证测试套件的集合,当前包括acts(applicat test/xts仓当前包括acts与tools软件包: -- acts,存放acts相关测试用例源码与配置文件,帮助终端设备厂商尽早发现软件与OpenHarmony的不兼容性,确保软件在整个开发过程中满足OpenHarmony的兼容性要求。 -- tools,提供acts编写和编译所依赖的开发框架。 +- acts,存放acts相关测试用例源码与配置文件,其目的是帮助终端设备厂商尽早发现软件与OpenHarmony的不兼容性,确保软件在整个开发过程中满足OpenHarmony的兼容性要求。 +- tools,存放acts相关测试用例开发框架。 ## 目录 @@ -17,9 +17,7 @@ test/xts源代码目录结构: │ ├── BUILD.gn 测试用例编译配置 -│ └── A测试子系统\_lite A测试子系统测试用例源码 - -│ └── B测试子系统\_lite B测试子系统测试用例源码 +│ └── subsystem\_lite 子系统测试用例源码 └── tools @@ -39,7 +37,7 @@ test/xts源代码目录结构: ## 编写联接类模组acts测试用例 -当前使用的测试框架是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" ] } } diff --git "a/readme/figures/bms\347\255\226\347\225\245\344\270\276\344\276\213.png" "b/readme/figures/bms\347\255\226\347\225\245\344\270\276\344\276\213.png" new file mode 100644 index 0000000000000000000000000000000000000000..fb9c3d8c66673f5c5b69718f59bb09dab16e48a9 Binary files /dev/null and "b/readme/figures/bms\347\255\226\347\225\245\344\270\276\344\276\213.png" differ diff --git a/readme/figures/zh-cn_image_0000001054762887.png b/readme/figures/zh-cn_image_0000001054762887.png new file mode 100644 index 0000000000000000000000000000000000000000..fee686d5a816b82f3d0d455d2134819976d33613 Binary files /dev/null and b/readme/figures/zh-cn_image_0000001054762887.png differ diff --git a/readme/figures/zh-cn_image_0000001055103250.png b/readme/figures/zh-cn_image_0000001055103250.png new file mode 100644 index 0000000000000000000000000000000000000000..e1732f4dd9bb12a8abf040fba4b92dafab7df01e Binary files /dev/null and b/readme/figures/zh-cn_image_0000001055103250.png differ diff --git "a/readme/figures/\345\205\250\345\261\200\347\255\226\347\225\2452.png" "b/readme/figures/\345\205\250\345\261\200\347\255\226\347\225\2452.png" new file mode 100644 index 0000000000000000000000000000000000000000..c40fd5e3f15cbd316c43dce31020740396c57d3f Binary files /dev/null and "b/readme/figures/\345\205\250\345\261\200\347\255\226\347\225\2452.png" differ diff --git "a/readme/figures/\347\255\226\347\225\245\347\261\273\345\236\2132.png" "b/readme/figures/\347\255\226\347\225\245\347\261\273\345\236\2132.png" new file mode 100644 index 0000000000000000000000000000000000000000..1ad38251b4d9abba2076bfc2df91fa14c81ac07d Binary files /dev/null and "b/readme/figures/\347\255\226\347\225\245\347\261\273\345\236\2132.png" differ diff --git "a/readme/\345\205\254\345\205\261\345\237\272\347\241\200README.md" "b/readme/\345\205\254\345\205\261\345\237\272\347\241\200README.md" index 6d3220d47f40f56d32625b19c1263e0c968727fd..5d0c573366541439a8617b411cf9d04a59fd5e39 100755 --- "a/readme/\345\205\254\345\205\261\345\237\272\347\241\200README.md" +++ "b/readme/\345\205\254\345\205\261\345\237\272\347\241\200README.md" @@ -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 ## 目录 ``` -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适配层接口实现 ``` ## 约束 @@ -61,7 +60,7 @@ vendor/hisi/hi3861/hi3861_adapter/hals/iot_hardware #IoT外设控制HAL层

KV存储

LiteOS-M平台、LiteOS-A平台

+

LiteOS-M内核、LiteOS-A内核

为应用程序提供KV存储机制。

文件操作

LiteOS-M平台

+

LiteOS-M内核

提供统一的文件操作接口,屏蔽对底层不同芯片组件的差异。

定时器

LiteOS-M平台、LiteOS-A平台

+

LiteOS-M内核、LiteOS-A内核

提供统一的定时器操作接口,屏蔽对底层不同芯片组件的差异。

IoT外设控制

LiteOS-M平台

+

LiteOS-M内核

IoT外设控制模块提供对外围设备的操作能力。

- - - - @@ -87,7 +84,7 @@ OpenHarmony内核是华为推出面向IoT领域的实时操作系统内核,它 ## 约束 -系统启动默认使用jffs2的文件系统,该文件系统支持可读可写,若要使用其他文件系统,需要适配新增。 +Hi3518EV300默认使用jffs2文件系统,Hi3516DV300默认使用vfat文件系统。若要使用其他文件系统,需要新增适配。 ## 使用 @@ -95,11 +92,11 @@ OpenHarmony内核是华为推出面向IoT领域的实时操作系统内核,它 ## 涉及仓 -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) diff --git "a/readme/\345\210\206\345\270\203\345\274\217\344\273\273\345\212\241\350\260\203\345\272\246\345\255\220\347\263\273\347\273\237README.md" "b/readme/\345\210\206\345\270\203\345\274\217\344\273\273\345\212\241\350\260\203\345\272\246\345\255\220\347\263\273\347\273\237README.md" index 6cf4b30117466a7473e650710da510b3b3bf01c2..b8ddb55f5f360eeebdcf91aef9bbe362325c50ea 100755 --- "a/readme/\345\210\206\345\270\203\345\274\217\344\273\273\345\212\241\350\260\203\345\272\246\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/\345\210\206\345\270\203\345\274\217\344\273\273\345\212\241\350\260\203\345\272\246\345\255\220\347\263\273\347\273\237README.md" @@ -2,9 +2,9 @@ ## 简介 -分布式任务调度模块,通过主(智慧屏设备)从设备(运动手表等小内存设备)服务代理机制,在异构操作系统上建立起分布式服务平台,支持OpenHarmony智慧屏与拉起其它OpenHarmony设备FA的能力。轻量分布式调度模块组成如下图所示: +分布式任务调度模块负责跨设备组件管理,提供访问和控制远程组件的能力,支持分布式场景下的应用协同。分布式调度模块组成如下图所示: -![](figures/zh-cn_image_0000001055199362.png) +![](figures/zh-cn_image_0000001055103250.png) ## 目录 @@ -21,17 +21,12 @@ - - - - - @@ -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 @@ ## 约束 -语言限制:C语言。 组网环境:必须确保设备在同一个局域网中。操作系统限制:OpenHarmony操作系统。 +**语言限制**:C/C++语言 + +**组网环境**:必须确保设备在同一个局域网中,主从设备能互相ping通 + +**操作系统限制**:OpenHarmony操作系统 **远程启动的约束与限制:** -- 支持远程启动FA,不支持远程启动SA。 -- 远程启动前必须确保主设备(智慧屏设备)与从设备间(运动手表等小内存设备)分布式组网成功(需要在同一网段内,可互相ping通),否则无法远程启动。 +- 支持远程启动FA,不支持远程启动SA +- 远程启动前必须确保主设备与从设备间分布式组网成功,否则无法远程启动 ## 使用 -**轻量级分布式调度模块编译** +- **轻量级分布式调度模块编译** -轻量级分布式调度模块通过一些特性宏来定制不同平台上参与编译的功能代码,该部分代码位于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 ## 涉及仓 diff --git "a/readme/\345\220\257\345\212\250\346\201\242\345\244\215README.md" "b/readme/\345\220\257\345\212\250\346\201\242\345\244\215README.md" index 96725f0b5634104b0817673fa42eb755baf5f257..51b3eb02573cc51a0077e7af6c6545a99c58648f 100755 --- "a/readme/\345\220\257\345\212\250\346\201\242\345\244\215README.md" +++ "b/readme/\345\220\257\345\212\250\346\201\242\345\244\215README.md" @@ -2,7 +2,7 @@ ## 简介 -启动恢复负责在内核启动之后,应用启动之前的操作系统中间层的启动。涉及以下模块: +启动恢复负责在内核启动之后到应用启动之前的系统关键进程和服务的启动过程。涉及以下模块: - 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内容,并根据解析结果依次加载系统服务。配置文件格式和内容说明如下所示: diff --git "a/readme/\345\252\222\344\275\223\345\255\220\347\263\273\347\273\237README.md" "b/readme/\345\252\222\344\275\223\345\255\220\347\263\273\347\273\237README.md" index 781942e0002162f2ef4847cab3fca85bd924039e..cecd0977ca9cbdd4e55d80b5dccb16701b1564d4 100755 --- "a/readme/\345\252\222\344\275\223\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/\345\252\222\344\275\223\345\255\220\347\263\273\347\273\237README.md" @@ -2,9 +2,7 @@ ## 简介 -该仓主要用于存放媒体子系统的源码信息,旨在为多媒体应用开发者开发者提供统一的开发接口,使得开发者可以专注于应用业务的开发,轻松使用多媒体的资源。 - -本次开源基于本仓代码信息将相关设备配置文件放入到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文件解复用成音频和视频数据,分别送入对应编码器解码,然后进行播放。 ## 目录 @@ -29,27 +27,27 @@ - - - - - @@ -59,18 +57,20 @@ - C++11版本或以上 - 目前支持3516dv300、3518ev300开发板,其中仅3516dv300支持播放功能 +- 当前3516dv300开发板默认支持索尼imx335、3518ev300默认支持晶相jxf23。 ## 安装 - 请提前加载内核及相关驱动,参考内核及驱动子系统readme。 -- 配置合适的配置文件,可以参考test/devini下配置文件,说明参见《配置文件说明文档》,当前仅支持imx335和imx327sensor,如果适配其他sensor可在开源社区中求助。 -- 北向接口调用参见test下demo实现。 +- 配置合适的配置文件,可以参考applications/sample/camera/media下配置文件,如果适配其他sensor可在开源社区中求助。用户使用时将配置文件放入到开发板/storage/data目录,开发者通过该配置文件可以去适配sensor及分辨率、帧率等能力。 +- 应用接口调用参见applications/sample/camera/media下demo实现。 ## 使用 -开发者使用多媒体接口用于录像、预览和播放音视频等资源,使用这些资源前先创建camerakit组件对象,注册各种事件回调,这些事件回调是用户实现用来响应多媒体模块中事件响应的,之后调用创建camera就可以创建一个操作camera资源的对象,使用这个对象可以启动预览、录像或抓拍取流,及设置取流的相关参数。 - +Native应用接口调用可以参考applications/sample/camera/media下demo实现 +应用开发者使用多媒体接口实现录像、预览和播放音视频,使用可以参考《多媒体开发指南》。 例:下面是用户重写事件类的实例 +用户先创建camerakit组件对象,注册各种事件回调,这些事件回调是用户实现用来响应多媒体模块中事件响应的,之后调用创建camera就可以创建一个操作camera资源的对象,使用这个对象可以启动预览、录像或抓拍取流,及设置取流的相关参数。 ``` /* diff --git "a/readme/\345\256\211\345\205\250\345\255\220\347\263\273\347\273\237README.md" "b/readme/\345\256\211\345\205\250\345\255\220\347\263\273\347\273\237README.md" index 8138f6596c8cac2f197bb234938cccf9cef51149..ec7b36ea2b5463497aeb5631cc1133dfa7b6bd6d 100755 --- "a/readme/\345\256\211\345\205\250\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/\345\256\211\345\205\250\345\255\220\347\263\273\347\273\237README.md" @@ -39,7 +39,7 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生 ## 应用权限管理 -应用权限是软件用来访问系统资源和使用系统能力的一种通行方式,存在涉及个人隐私相关功能和数据的场景,例如:访问个人设备的硬件特性,如摄像头、麦克风,以及获取个人数据,如通讯录,日历等存储的信息等。操作系统通过应用权限管理来保护这些数据以及能力。 +应用权限是软件用来访问系统资源和使用系统能力的一种通行方式,存在涉及个人隐私相关功能和数据的场景,例如:访问个人设备的硬件特性,如摄像头、麦克风,以及读写媒体文件等。操作系统通过应用权限管理来保护这些数据以及能力。 权限定义字段说明: @@ -64,7 +64,6 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生 @@ -85,19 +84,28 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生 ## IPC通信鉴权 - 在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策略示例 -![](figures/Feature策略示例.png "Feature策略示例") + + +![](figures/bms策略举例.png) 访问策略有三种类型: **图 2** 访问策略结构体 -![](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策略注册 -![](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 -在分布式场景下,不同终端设备的硬件能力和运行系统环境都不尽相同,这些设备在分布式场景下,均需要建立信任关系,最典型的应用即是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 @@ -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) ## 涉及仓 diff --git "a/readme/\346\265\213\350\257\225\345\255\220\347\263\273\347\273\237README.md" "b/readme/\346\265\213\350\257\225\345\255\220\347\263\273\347\273\237README.md" index d02604e98a8be295814b48938983761a5cefad55..e9f54ff7ea793afa9e80314d13bb899f70122394 100755 --- "a/readme/\346\265\213\350\257\225\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/\346\265\213\350\257\225\345\255\220\347\263\273\347\273\237README.md" @@ -2,11 +2,11 @@ ## 简介 -开发过程采用测试驱动开发模式,开发者基于系统新增特性可以通过开发者自己开发用例保证,对于系统已有特性的修改,也可通过修改项目中原有自测试用例保证,开发者自测试旨在帮助开发者在开发阶段就能开发出高质量代码 +开发过程采用测试驱动开发模式,开发者基于系统新增特性可以通过开发者自己开发用例保证,对于系统已有特性的修改,也可通过修改项目中原有的测试用例保证,开发者测试旨在帮助开发者在开发阶段就能开发出高质量代码 ## 目录 -**表 1** 开发者自测试工具源代码目录结构 +**表 1** 开发者测试工具源代码目录结构

名称

@@ -72,14 +74,9 @@ OpenHarmony内核是华为推出面向IoT领域的实时操作系统内核,它

系统调用。

test

-

内核和用户态的测试用例。

-

tools

编译配置和menuconfig相关的代码。

+

构建工具及相关配置和代码。

dtbschedmgr_lite

轻量级分布式任务调度实现。

+

分布式任务调度实现

safwk_lite

系统服务进程实现。

-

samgr_lite

-

本地服务管理实现。

+

foundation进程实现

foundation\multimedia\frameworks

北向接口内部框架实现,包括audio,camera,player.recorder

+

内部框架实现,包括audio,camera,player.recorder

foundation\multimedia\interfaces\kits

北向接口对外头文件

+

应用接口对外头文件

foundation\multimedia\services\media_lite

北向接口底层服务实现

+

应用接口底层服务实现

foundation\multimedia\utils\lite

北向接口通用模块实现

+

应用接口通用模块实现

foundation\multimedia\test\lite

北向接口测试代码。

+

应用接口测试代码。

多语言字符串id

应用申请此权限的目的。

-

上架审核、弹框授权、用户管理权限时使用到

used-scene{

@@ -76,7 +75,7 @@ x509镜像包生成:参考编译构建子系统编译方式,执行编译生

when:inuse, always

调用受此权限管控的接口的场景。

-

声明在哪些组件下、以及是否前台还是前后台都会去调用受权限管控的接口

+

声明在哪些组件和场景(前台/后台)下调用受管控的接口。

- - - - @@ -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) ## 编写测试用例 -- 自测试用例规范 +- 测试用例规范 - 命名规范 测试用例源文件名称和测试套内容保持一致,测试套与用例之间关系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) -- 自测试用例模板 +- 测试用例模板 - 详见测试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) ## 使用测试框架 - 安装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 + ``` + + + ## 测试结果与日志 - 通过在测试框架中执行测试指令,即可以生成测试日志和测试报告 diff --git "a/readme/\347\263\273\347\273\237\346\234\215\345\212\241\346\241\206\346\236\266\345\255\220\347\263\273\347\273\237README.md" "b/readme/\347\263\273\347\273\237\346\234\215\345\212\241\346\241\206\346\236\266\345\255\220\347\263\273\347\273\237README.md" index 8acae2fb4728d9efac20487a364fc80c02b68c30..ae6c3939d8c30b76e2c00e9b151e5678af248653 100755 --- "a/readme/\347\263\273\347\273\237\346\234\215\345\212\241\346\241\206\346\236\266\345\255\220\347\263\273\347\273\237README.md" +++ "b/readme/\347\263\273\347\273\237\346\234\215\345\212\241\346\241\206\346\236\266\345\255\220\347\263\273\347\273\237README.md" @@ -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\(\)函数 ## 涉及仓 -distributedschedule\_interfaces\_innerkits\_samgr\_lite +distributedschedule\_interfaces\_kits\_samgr\_lite distributedschedule\_services\_samgr\_lite

名称

@@ -17,7 +17,7 @@

developertest

开发自测试框架

+

开发测试框架

developertest/src

@@ -32,7 +32,7 @@

developertest/src/core/build

自测试用例编译

+

测试用例编译

developertest/src/core/command

@@ -107,12 +107,12 @@

developertest/start.bat

开发者自测试入口(Windows)

+

开发者测试入口(Windows)

developertest/start.sh

开发者自测试入口(Linux)

+

开发者测试入口(Linux)