diff --git a/en/device-dev/guide/development-example-for-clock-apps.md b/en/device-dev/guide/development-example-for-clock-apps.md index 71a09027d8ce763fd9b2dc49ffe7d3850f66f8c5..d461a0dd393f8283f806ded37aa1b4830e13a56f 100644 --- a/en/device-dev/guide/development-example-for-clock-apps.md +++ b/en/device-dev/guide/development-example-for-clock-apps.md @@ -10,4 +10,6 @@ - **[Running on the Device](running-on-the-device-9.md)** +- **[FAQs](faqs-10.md)** + diff --git a/en/device-dev/guide/faqs-10.md b/en/device-dev/guide/faqs-10.md new file mode 100644 index 0000000000000000000000000000000000000000..b9828da1546f7dc0a067b0dc0a684bd33cc30e57 --- /dev/null +++ b/en/device-dev/guide/faqs-10.md @@ -0,0 +1,39 @@ +# FAQs + +- [hdc\_std Fails to Connect to a Device](#section1221016541119) +- [hdc\_std Fails to Run](#section219185710311) + +## hdc\_std Fails to Connect to a Device + +- **Symptom** + + **\[Empty\]** is displayed in the output after the **hdc\_std list targets** command is run. + +- **Possible Causes and Solutions** + 1. The device cannot be identified. + + Check whether **HDC Device** exists in the universal serial bus device of the device manager. If **HDC Device** does not exist, the device cannot be connected. In this case, remove and then insert the device or burn the latest image for the device. + + 2. hdc\_std works improperly. + + Run the **hdc kill** or **hdc start -r** command to kill or restart the hdc service, and then run the **hdc list targets** command to check whether device information is obtained. + + If no device information is obtained, check whether the adb process exists in the task manager. If the adb process exists, kill this process because it may affect the hdc service. After that, run **hdc kill** or **hdc start -r** and then **hdc list targets** again. + + 3. hdc\_std does not match the device. + + If the latest image is burnt for the device, hdc\_std must also be of the latest version. As hdc\_std is updated continuously, obtain hdc\_std of the latest version from the **developtools\_hdc\_standard** repository in the **prebuilt** directory. + + + +## hdc\_std Fails to Run + +- **Symptom** + + The **hdc\_std.exe** file does not run after being clicked. + +- **Possible Causes and Solutions** + + **hdc\_std.exe** requires no installation and can be directly used on a disk. It can also be added to environment variables. Open the cmd window and run the **hdc\_std** command to use **hdc\_std.exe**. + + diff --git a/en/device-dev/guide/figures/en-us_image_0000001078563230.png b/en/device-dev/guide/figures/en-us_image_0000001078563230.png new file mode 100644 index 0000000000000000000000000000000000000000..02075cda950596315c8c79ac3ab96587edf29394 Binary files /dev/null and b/en/device-dev/guide/figures/en-us_image_0000001078563230.png differ diff --git a/en/device-dev/guide/preparations-8.md b/en/device-dev/guide/preparations-8.md index d799aeb288dfe6db102f8efb106d4ea69f4c7cdd..ac9580af22446d41963ea2f3b4114344ee900de6 100644 --- a/en/device-dev/guide/preparations-8.md +++ b/en/device-dev/guide/preparations-8.md @@ -4,5 +4,5 @@ ## Setting Up the Development Environment and Creating a Project -Download and install DevEco Studio. For details, see the [DHUAWEI DevEco Studio User Guide](../docs/zh-cn/application-dev/quick-start/DevEco-Studio(OpenHarmony)使用指南.md). +Download and install DevEco Studio. For details, see the [HUAWEI DevEco Studio User Guide](../docs/zh-cn/application-dev/quick-start/DevEco-Studio(OpenHarmony)使用指南.md). diff --git a/en/device-dev/guide/signing-and-packaging.md b/en/device-dev/guide/signing-and-packaging.md index 25434a849b6b7538a632c9b9562a931632540e08..caf4f334990152d07c45932a771ef584c1cbfecd 100644 --- a/en/device-dev/guide/signing-and-packaging.md +++ b/en/device-dev/guide/signing-and-packaging.md @@ -1,4 +1,4 @@ # Signing and Packaging -After finishing writing the app code, you need to sign and package the app before running it on a real device. For details, see Signing and Packaging Guide. +After finishing writing the app code, you need to sign and package the app before running it on a real device. For details, see [Signing and Packaging Guide](../docs/zh-cn/application-dev/quick-start/配置OpenHarmony应用签名信息.md). diff --git a/en/device-dev/quick-start/Readme-EN.md b/en/device-dev/quick-start/Readme-EN.md index 8a509b79f4fb2c8d294e7a1170700ce6beb2e47f..4aab1f04bc1ebcfdf3856df5a8f7b02d9cf26265 100644 --- a/en/device-dev/quick-start/Readme-EN.md +++ b/en/device-dev/quick-start/Readme-EN.md @@ -1,5 +1,6 @@ # Getting Started +- [Overview](overview.md) - [Mini and Small Systems](mini-and-small-systems.md) - [Overview](overview-0.md) - [Introduction to the Development Boards](introduction-to-the-development-boards.md) @@ -8,6 +9,7 @@ - [Hi3518 Development Board](hi3518-development-board.md) - [Environment Setup](environment-setup.md) + - [Overview](overview-1.md) - [Windows Development Environment](windows-development-environment.md) - [Ubuntu Build Environment](ubuntu-build-environment.md) - [FAQ](faq.md) @@ -20,22 +22,22 @@ - [FAQs](faqs.md) - [Hi3516](hi3516.md) - - [Setting Up the Environment](setting-up-the-environment-1.md) + - [Setting Up the Environment](setting-up-the-environment-2.md) - [Running a Hello OHOS Program](running-a-hello-ohos-program.md) - [Developing a Driver](developing-a-driver.md) - - [FAQs](faqs-2.md) + - [FAQs](faqs-3.md) - [Hi3518](hi3518.md) - - [Setting Up the Environment](setting-up-the-environment-3.md) - - [Running a Hello OHOS Program](running-a-hello-ohos-program-4.md) - - [FAQs](faqs-5.md) + - [Setting Up the Environment](setting-up-the-environment-4.md) + - [Running a Hello OHOS Program](running-a-hello-ohos-program-5.md) + - [FAQs](faqs-6.md) - [Standard System](standard-system.md) - - [Overview](overview-6.md) - - [Environment Setup](environment-setup-7.md) - - [Overview](overview-8.md) - - [Windows Development Environment](windows-development-environment-9.md) - - [Ubuntu Build Environment](ubuntu-build-environment-10.md) + - [Overview](overview-7.md) + - [Environment Setup](environment-setup-8.md) + - [Overview](overview-9.md) + - [Windows Development Environment](windows-development-environment-10.md) + - [Preparing the Ubuntu Build Environment](preparing-the-ubuntu-build-environment.md) - [FAQs](faqs-11.md) - [How to Develop](how-to-develop-12.md) diff --git a/en/device-dev/quick-start/developing-a-driver.md b/en/device-dev/quick-start/developing-a-driver.md index 904527f3b2f305cbfa08931d2bd95d31d5f7cacb..ab35222428df5f2d3c2b909f178486c45c4c9e40 100644 --- a/en/device-dev/quick-start/developing-a-driver.md +++ b/en/device-dev/quick-start/developing-a-driver.md @@ -430,7 +430,7 @@ Compile and burn images by referring to [Building](../quick-start/running-a-hel 1. Connect to a serial port. >![](public_sys-resources/icon-notice.gif) **NOTICE:** - >If the connection fails, rectify the fault by referring to [FAQs](../quick-start/faqs-2.md). + >If the connection fails, rectify the fault by referring to [FAQs](../quick-start/faqs-3.md). **Figure 1** Serial port connection @@ -463,7 +463,7 @@ Compile and burn images by referring to [Building](../quick-start/running-a-hel

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

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

-

rootaddr=10 M, rootsize=20 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 rootfs.img file in the IDE.

+

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

saveenv

diff --git a/en/device-dev/quick-start/environment-setup-8.md b/en/device-dev/quick-start/environment-setup-8.md new file mode 100644 index 0000000000000000000000000000000000000000..2428c3c9e47baa0d290309f02302c9b49a9336fd --- /dev/null +++ b/en/device-dev/quick-start/environment-setup-8.md @@ -0,0 +1,11 @@ +# Environment Setup + +- **[Overview](overview-9.md)** + +- **[Windows Development Environment](windows-development-environment-10.md)** + +- **[Preparing the Ubuntu Build Environment](preparing-the-ubuntu-build-environment.md)** + +- **[FAQs](faqs-11.md)** + + diff --git a/en/device-dev/quick-start/environment-setup.md b/en/device-dev/quick-start/environment-setup.md index 9b5f768b14398f56359629bfa8a1ea0b7d035f17..d1b7756c427d8503df33e4091497f2a54abf3a79 100644 --- a/en/device-dev/quick-start/environment-setup.md +++ b/en/device-dev/quick-start/environment-setup.md @@ -1,12 +1,6 @@ # Environment Setup -Use the DevEco Device Tool for development, build, burning, and debugging of OpenHarmony. - -The DevEco Device Tool is currently available on Windows and Ubuntu. This document takes the Windows version as an example. - -For details about how to use the Ubuntu version, see the [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). - -The Windows version supports build for the Hi3861 development board only. For other development boards, you should use the Ubuntu version and switch to the Ubuntu platform. The following describes how to set up the development environment and build environment for mini and small OpenHarmony. +- **[Overview](overview-1.md)** - **[Windows Development Environment](windows-development-environment.md)** diff --git a/en/device-dev/quick-start/faq.md b/en/device-dev/quick-start/faq.md index b5ab1255f5d8e916656a9991f854c9fd8241c378..b1c6da1ec2a9aa32b80bc52b228db109730b05df 100644 --- a/en/device-dev/quick-start/faq.md +++ b/en/device-dev/quick-start/faq.md @@ -2,7 +2,8 @@ - [What should I do if garbled characters and segmentation faults occur during hb installation?](#section411894616119) - [What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?](#section629417571626) -- [What should I do if the message "module 'platform' has no attribute 'linux\_distribution'" is displayed during hb Installation?](#section10871523332) +- [What should I do if the message "module 'platform' has no attribute 'linux\_distribution'" is displayed during hb installation?](#section10871523332) +- [What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?](#section47351657163213) - [What should I do if the message "ImportError: No module named apt\_pkg" is displayed during the execution of an unidentifiable command?](#section159891252236) ## What should I do if garbled characters and segmentation faults occur during hb installation? @@ -45,7 +46,7 @@ ``` -## What should I do if the message "module 'platform' has no attribute 'linux\_distribution'" is displayed during hb Installation? +## What should I do if the message "module 'platform' has no attribute 'linux\_distribution'" is displayed during hb installation? - **Symptom** @@ -67,6 +68,27 @@ ``` +## What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation? + +- **Symptom** + + The message "Could not find a version that satisfies the requirement ohos-build" is displayed during the execution of the **python3 -m pip install --user ohos-build** command. + + +- **Possible Causes** + + The installation fails due to poor network connectivity. + +- **Solutions** + 1. Ensure that your computer has a good network connection. If the network connection is unstable, rectify the network fault and reinstall hb. + 2. If the network is functional, run the following commands to install hb by specifying a temporary PyPI source: + + ``` + python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ohos-build + ``` + + + ## What should I do if the message "ImportError: No module named apt\_pkg" is displayed during the execution of an unidentifiable command? - **Symptom** diff --git a/en/device-dev/quick-start/faqs-3.md b/en/device-dev/quick-start/faqs-3.md new file mode 100644 index 0000000000000000000000000000000000000000..f756777596c26d45581846666d5bf7a16ab3c632 --- /dev/null +++ b/en/device-dev/quick-start/faqs-3.md @@ -0,0 +1,172 @@ +# FAQs + +- [What should I do when the images failed to be burnt over the selected serial port?](#section627268185113) +- [What should I do when Windows-based PC failed to be connected to the board?](#section195391036568) +- [What should I do when the image failed to be burnt?](#section571164016565) +- [What should I do when the message indicating Python cannot be found is displayed during compilation and building?](#section1039835245619) +- [What should I do when no command output is displayed?](#section14871149155911) + +## What should I do when the images failed to be burnt over the selected serial port? + +- **Symptom** + + **Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port. + + **Figure 1** Failed to open the serial port + ![](figures/failed-to-open-the-serial-port.png "failed-to-open-the-serial-port") + +- **Possible Causes** + + The serial port has been used. + +- **Solutions** + +1. Search for the terminal using serial-xx from the drop-down list in the **TERMINAL** panel. + + **Figure 2** Checking whether the serial port is used + ![](figures/checking-whether-the-serial-port-is-used.png "checking-whether-the-serial-port-is-used") + +2. Click the dustbin icon as shown in the following figure to disable the terminal using the serial port. + + **Figure 3** Disabling the terminal using the serial port + ![](figures/disabling-the-terminal-using-the-serial-port.png "disabling-the-terminal-using-the-serial-port") + +3. Click **Burn**, select the serial port, and start burning images again. + + **Figure 4** Restarting burning + + + ![](figures/changjian1.png) + + +## What should I do when Windows-based PC failed to be connected to the board? + +- **Symptom** + + The file image cannot be obtained after clicking **Burn** and selecting a serial port. + + **Figure 5** Failed to obtain the image file due to unavailable connection + ![](figures/failed-to-obtain-the-image-file-due-to-unavailable-connection.png "failed-to-obtain-the-image-file-due-to-unavailable-connection") + +- **Possible Causes** + + The board is disconnected from the Windows-based PC. + + Windows Firewall does not allow Visual Studio Code to access the network. + +- **Solutions** + +1. Check whether the network cable is properly connected. +2. Click **Windows Firewall**. + + **Figure 6** Network and firewall setting + ![](figures/network-and-firewall-setting.png "network-and-firewall-setting") + +3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**. + + **Figure 7** Firewall and network protection + ![](figures/firewall-and-network-protection.png "firewall-and-network-protection") + +4. Select the Visual Studio Code application. + + **Figure 8** Selecting the Visual Studio Code application + ![](figures/selecting-the-visual-studio-code-application.png "selecting-the-visual-studio-code-application") + +5. Select the **Private** and **Public** network access rights for the Visual Studio Code application. + + **Figure 9** Allowing the Visual Studio Code application to access the network + ![](figures/allowing-the-visual-studio-code-application-to-access-the-network.png "allowing-the-visual-studio-code-application-to-access-the-network") + + +## What should I do when the image failed to be burnt? + +- **Symptom** + + The burning status is not displayed after clicking **Burn** and selecting a serial port. + +- **Possible Causes** + + The IDE is not restarted after the DevEco plug-in is installed. + +- **Solutions** + + Restart the IDE. + + +## What should I do when the message indicating Python cannot be found is displayed during compilation and building? + +- **Symptom** + + ![](figures/en-us_image_0000001105056492.png) + + +- **Possible Cause 1**: Python is not installed. +- **Solutions** + + Install Python by referring to [Installing and Configuring Python](../quick-start/ubuntu-build-environment.md). + +- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. + + ![](figures/en-us_image_0000001151976069.png) + +- **Solutions** + + Run the following commands: + + ``` + # cd /usr/bin/ + # which python3 + # ln -s /usr/local/bin/python3 python + # python --version + ``` + + Example: + + ![](figures/en-us_image_0000001152176139.png) + + +## What should I do when no command output is displayed? + +- **Symptom** + + The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**. + +- **Possible Cause 1** + + The serial port is connected incorrectly. + +- **Solutions** + + Change the serial port number. + + Start **Device Manager** to check whether the serial port connected to the board is the same as that connected to the terminal device. If the serial ports are different, perform step [1](../quick-start/running-a-hello-ohos-program.md) in the **Running an Image** section to change the serial port number. + + +- **Possible Cause 2** + + The U-boot of the board is damaged. + +- **Solutions** + + Burn the U-boot. + + If the fault persists after you perform the preceding operations, the U-boot of the board may be damaged. You can burn the U-boot by performing the following steps: + + +1. Obtain the U-boot file. + + >![](public_sys-resources/icon-notice.gif) **NOTICE:** + >The U-boot file of the two boards can be obtained from the following paths, respectively. + >Hi3516D V300: **device\\hisilicon\\hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3516dv300.bin** + >Hi3518E V300: **device\\hisilicon\\hispark\_aries\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3518ev300.bin** + +2. Burn the U-boot file by following the procedures for burning a U-boot file over USB. + + Select the U-boot files of corresponding development boards for burning by referring to [Programming Flash Memory on the Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681)/[Programming Flash Memory on the Hi3518](https://device.harmonyos.com/en/docs/ide/user-guides/hi3518_upload-0000001057313128) + +3. Log in to the serial port after the burning is complete. + + **Figure 10** Serial port displayed after the U-boot is burnt + ![](figures/serial-port-displayed-after-the-u-boot-is-burnt.png "serial-port-displayed-after-the-u-boot-is-burnt") + + diff --git a/en/device-dev/quick-start/faqs-6.md b/en/device-dev/quick-start/faqs-6.md new file mode 100644 index 0000000000000000000000000000000000000000..b428e3cf9fa250e5f077130f331806683bfbd8cf --- /dev/null +++ b/en/device-dev/quick-start/faqs-6.md @@ -0,0 +1,174 @@ +# FAQs + +- [What should I do when the images failed to be burnt over the selected serial port?](#section1498892119619) +- [What should I do when Windows-based PC failed to be connected to the board?](#section8512971816) +- [What should I do when the image failed to be burnt?](#section1767804111198) +- [What should I do when the message indicating Python cannot be found is displayed during compilation and building?](#en-us_topic_0000001053466255_section1039835245619) +- [What should I do when no command output is displayed?](#en-us_topic_0000001053466255_section14871149155911) + +## What should I do when the images failed to be burnt over the selected serial port? + +- **Symptom** + + **Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port. + + **Figure 1** Failed to open the serial port + ![](figures/failed-to-open-the-serial-port-8.png "failed-to-open-the-serial-port-8") + +- **Possible Causes** + + The serial port has been used. + +- **Solutions** + +1. Search for the terminal using serial-xx from the drop-down list in the **TERMINAL** panel. + + **Figure 2** Checking whether the serial port is used + ![](figures/checking-whether-the-serial-port-is-used-9.png "checking-whether-the-serial-port-is-used-9") + +2. Click the dustbin icon as shown in the following figure to disable the terminal using the serial port. + + **Figure 3** Disabling the terminal using the serial port + ![](figures/disabling-the-terminal-using-the-serial-port-10.png "disabling-the-terminal-using-the-serial-port-10") + +3. Click **Burn**, select the serial port, and start burning images again. + + **Figure 4** Restarting burning + + + ![](figures/changjian1-11.png) + + +## What should I do when Windows-based PC failed to be connected to the board? + +- **Symptom** + + The file image cannot be obtained after clicking **Burn** and selecting a serial port. + + **Figure 5** Failed to obtain the image file due to unavailable connection + ![](figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-12.png "failed-to-obtain-the-image-file-due-to-unavailable-connection-12") + +- **Possible Causes** + + The board is disconnected from the Windows-based PC. + + Windows Firewall does not allow Visual Studio Code to access the network. + +- **Solutions** + +1. Check whether the network cable is properly connected. +2. Click **Windows Firewall**. + + **Figure 6** Network and firewall setting + ![](figures/network-and-firewall-setting-13.png "network-and-firewall-setting-13") + +3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**. + + **Figure 7** Firewall and network protection + ![](figures/firewall-and-network-protection-14.png "firewall-and-network-protection-14") + +4. Select the Visual Studio Code application + + **Figure 8** Selecting the Visual Studio Code application + ![](figures/selecting-the-visual-studio-code-application-15.png "selecting-the-visual-studio-code-application-15") + +5. Select the **Private** and **Public** network access rights for the Visual Studio Code application. + + **Figure 9** Allowing the Visual Studio Code application to access the network + ![](figures/allowing-the-visual-studio-code-application-to-access-the-network-16.png "allowing-the-visual-studio-code-application-to-access-the-network-16") + + +## What should I do when the image failed to be burnt? + +- **Symptom** + + The burning status is not displayed after clicking **Burn** and selecting a serial port. + +- **Possible Causes** + + The IDE is not restarted after the DevEco plug-in is installed. + +- **Solutions** + + Restart the IDE. + + +## What should I do when the message indicating Python cannot be found is displayed during compilation and building? + +- **Symptom** + + ![](figures/en-us_image_0000001105376260.png) + + +- **Possible Cause 1** + + Python is not installed. + +- **Solutions** + + Install Python by referring to [Installing and Configuring Python](../quick-start/ubuntu-build-environment.md). + +- **Possible Cause 2**: The soft link that points to the Python does not exist in the usr/bin directory. + + ![](figures/en-us_image_0000001105216304.png) + +- **Solutions** + + Run the following commands: + + ``` + # cd /usr/bin/ + # which python3 + # ln -s /usr/local/bin/python3 python + # python --version + ``` + + Example: + + ![](figures/en-us_image_0000001152256235.png) + + +## What should I do when no command output is displayed? + +- **Symptom** + + The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**. + +- **Possible Cause 1** + + The serial port is connected incorrectly. + +- **Solutions** + + Change the serial port number. + + Start **Device Manager** to check whether the serial port connected to the board is the same as that connected to the terminal device. If the serial ports are different, perform step [1](../quick-start/running-a-hello-ohos-program.md) in the **Running an Image** section to change the serial port number. + + +- **Possible Cause 2** + + The U-boot of the board is damaged. + +- **Solutions** + + Burn the U-boot. + + If the fault persists after you perform the preceding operations, the U-boot of the board may be damaged. You can burn the U-boot by performing the following steps: + + +1. Obtain the U-boot file. + + >![](public_sys-resources/icon-notice.gif) **NOTICE:** + >The U-boot file of the two boards can be obtained from the following paths, respectively. + >Hi3516D V300: **device\\hisilicon\\hispark\_taurus\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3516dv300.bin** + >Hi3518E V300: **device\\hisilicon\\hispark\_aries\\sdk\_liteos\\uboot\\out\\boot\\u-boot-hi3518ev300.bin** + +2. Burn the U-boot file by following the procedures for burning a U-boot file over USB. + + Select the U-boot files of corresponding development boards for burning by referring to [Programming Flash Memory on the Hi3516](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_upload-0000001052148681)/[Programming Flash Memory on the Hi3518](https://device.harmonyos.com/en/docs/ide/user-guides/hi3518_upload-0000001057313128) + +3. Log in to the serial port after the burning is complete. + + ![](figures/en-us_image_0000001105536118.png) + + diff --git a/en/device-dev/quick-start/figures/1-19.png b/en/device-dev/quick-start/figures/1-19.png new file mode 100644 index 0000000000000000000000000000000000000000..8ed1535a6bc23dc5bd02fbd5a3f1392f46ad8d83 Binary files /dev/null and b/en/device-dev/quick-start/figures/1-19.png differ diff --git a/en/device-dev/quick-start/figures/2021-01-27_170334-17.png b/en/device-dev/quick-start/figures/2021-01-27_170334-17.png new file mode 100644 index 0000000000000000000000000000000000000000..1e7dd2cdb515e871a1c5d34b3332b097bc02351b Binary files /dev/null and b/en/device-dev/quick-start/figures/2021-01-27_170334-17.png differ diff --git a/en/device-dev/quick-start/figures/2021-01-27_170334-18.png b/en/device-dev/quick-start/figures/2021-01-27_170334-18.png index 1e7dd2cdb515e871a1c5d34b3332b097bc02351b..5b573a4ddfe89fe25cb1b567736823244fdb9e97 100644 Binary files a/en/device-dev/quick-start/figures/2021-01-27_170334-18.png and b/en/device-dev/quick-start/figures/2021-01-27_170334-18.png differ diff --git a/en/device-dev/quick-start/figures/2021-01-27_170334-5.png b/en/device-dev/quick-start/figures/2021-01-27_170334-5.png index b17002227e6effa92e5ced9ed418476e7fd70098..5b573a4ddfe89fe25cb1b567736823244fdb9e97 100644 Binary files a/en/device-dev/quick-start/figures/2021-01-27_170334-5.png and b/en/device-dev/quick-start/figures/2021-01-27_170334-5.png differ diff --git a/en/device-dev/quick-start/figures/allowing-the-visual-studio-code-application-to-access-the-network-16.png b/en/device-dev/quick-start/figures/allowing-the-visual-studio-code-application-to-access-the-network-16.png new file mode 100644 index 0000000000000000000000000000000000000000..13d77ce93c78ac07039c8f09741db1db1d05a124 Binary files /dev/null and b/en/device-dev/quick-start/figures/allowing-the-visual-studio-code-application-to-access-the-network-16.png differ diff --git a/en/device-dev/quick-start/figures/changjian1-11.png b/en/device-dev/quick-start/figures/changjian1-11.png new file mode 100644 index 0000000000000000000000000000000000000000..208a4fbace342514f59f0000c4d50f5dc9321f0f Binary files /dev/null and b/en/device-dev/quick-start/figures/changjian1-11.png differ diff --git a/en/device-dev/quick-start/figures/checking-whether-the-serial-port-is-used-9.png b/en/device-dev/quick-start/figures/checking-whether-the-serial-port-is-used-9.png new file mode 100644 index 0000000000000000000000000000000000000000..cfa0ceb21f5a11d459b93721f512309c9d6da2ac Binary files /dev/null and b/en/device-dev/quick-start/figures/checking-whether-the-serial-port-is-used-9.png differ diff --git a/en/device-dev/quick-start/figures/chuankou1-6.png b/en/device-dev/quick-start/figures/chuankou1-6.png new file mode 100644 index 0000000000000000000000000000000000000000..8eb26425f53028a08eb40e3037ecd302f3082270 Binary files /dev/null and b/en/device-dev/quick-start/figures/chuankou1-6.png differ diff --git a/en/device-dev/quick-start/figures/disabling-the-terminal-using-the-serial-port-10.png b/en/device-dev/quick-start/figures/disabling-the-terminal-using-the-serial-port-10.png new file mode 100644 index 0000000000000000000000000000000000000000..0c1f60638087d0fe56127f2f842244355afad85f Binary files /dev/null and b/en/device-dev/quick-start/figures/disabling-the-terminal-using-the-serial-port-10.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001117463460.png b/en/device-dev/quick-start/figures/en-us_image_0000001117463460.png new file mode 100644 index 0000000000000000000000000000000000000000..72dd05e3ae1eb91156df98cb1915b6264b3bbe5a Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001117463460.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001119945810.png b/en/device-dev/quick-start/figures/en-us_image_0000001119945810.png new file mode 100644 index 0000000000000000000000000000000000000000..8a4060e64fdd059143a3ec1adb9ee6937fa4af84 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001119945810.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001163529159.png b/en/device-dev/quick-start/figures/en-us_image_0000001163529159.png new file mode 100644 index 0000000000000000000000000000000000000000..7d6dc91c5762822a67a439fe9cf26c8650c4a469 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001163529159.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001163568181.png b/en/device-dev/quick-start/figures/en-us_image_0000001163568181.png new file mode 100644 index 0000000000000000000000000000000000000000..7bd316dfd5a64c873682bf865a79ec1f2354cc40 Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001163568181.png differ diff --git a/en/device-dev/quick-start/figures/en-us_image_0000001163569275.png b/en/device-dev/quick-start/figures/en-us_image_0000001163569275.png new file mode 100644 index 0000000000000000000000000000000000000000..8dde7632636856203030c2abf0867f03abaafcba Binary files /dev/null and b/en/device-dev/quick-start/figures/en-us_image_0000001163569275.png differ diff --git a/en/device-dev/quick-start/figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-12.png b/en/device-dev/quick-start/figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-12.png new file mode 100644 index 0000000000000000000000000000000000000000..548e03da4b76123cb67d41cbd1de4a0f33f5ef4b Binary files /dev/null and b/en/device-dev/quick-start/figures/failed-to-obtain-the-image-file-due-to-unavailable-connection-12.png differ diff --git a/en/device-dev/quick-start/figures/failed-to-open-the-serial-port-8.png b/en/device-dev/quick-start/figures/failed-to-open-the-serial-port-8.png new file mode 100644 index 0000000000000000000000000000000000000000..25308b9cab52a166955e70ada35c3191d90dd64c Binary files /dev/null and b/en/device-dev/quick-start/figures/failed-to-open-the-serial-port-8.png differ diff --git a/en/device-dev/quick-start/figures/firewall-and-network-protection-14.png b/en/device-dev/quick-start/figures/firewall-and-network-protection-14.png new file mode 100644 index 0000000000000000000000000000000000000000..82faf7d05d2a40e9deae2649a1f59fccea67bdc2 Binary files /dev/null and b/en/device-dev/quick-start/figures/firewall-and-network-protection-14.png differ diff --git a/en/device-dev/quick-start/figures/network-and-firewall-setting-13.png b/en/device-dev/quick-start/figures/network-and-firewall-setting-13.png new file mode 100644 index 0000000000000000000000000000000000000000..9487849c5f8a860e9680016ff3657404b2c0ad6e Binary files /dev/null and b/en/device-dev/quick-start/figures/network-and-firewall-setting-13.png differ diff --git a/en/device-dev/quick-start/figures/selecting-the-visual-studio-code-application-15.png b/en/device-dev/quick-start/figures/selecting-the-visual-studio-code-application-15.png new file mode 100644 index 0000000000000000000000000000000000000000..81812f492838b439ea507d4afb763ff751c0a467 Binary files /dev/null and b/en/device-dev/quick-start/figures/selecting-the-visual-studio-code-application-15.png differ diff --git a/en/device-dev/quick-start/figures/successful-system-startup-and-program-execution-7.png b/en/device-dev/quick-start/figures/successful-system-startup-and-program-execution-7.png new file mode 100644 index 0000000000000000000000000000000000000000..6a85551cd30c8c0576c138d86dc66ddf73dccb44 Binary files /dev/null and b/en/device-dev/quick-start/figures/successful-system-startup-and-program-execution-7.png differ diff --git a/en/device-dev/quick-start/hi3516.md b/en/device-dev/quick-start/hi3516.md index 785d642cf2d37899c3c360413bdff974bb6fd363..17987269923620c2ceb55de66d076c128da4da15 100644 --- a/en/device-dev/quick-start/hi3516.md +++ b/en/device-dev/quick-start/hi3516.md @@ -1,11 +1,11 @@ # Hi3516 -- **[Setting Up the Environment](setting-up-the-environment-1.md)** +- **[Setting Up the Environment](setting-up-the-environment-2.md)** - **[Running a Hello OHOS Program](running-a-hello-ohos-program.md)** - **[Developing a Driver](developing-a-driver.md)** -- **[FAQs](faqs-2.md)** +- **[FAQs](faqs-3.md)** diff --git a/en/device-dev/quick-start/hi3518.md b/en/device-dev/quick-start/hi3518.md index 980d0c4d98d46ece5c3120959e33a6a090203bc7..3f7e2e5dcd0bddac839cd3184a3a27920df556e6 100644 --- a/en/device-dev/quick-start/hi3518.md +++ b/en/device-dev/quick-start/hi3518.md @@ -1,9 +1,9 @@ # Hi3518 -- **[Setting Up the Environment](setting-up-the-environment-3.md)** +- **[Setting Up the Environment](setting-up-the-environment-4.md)** -- **[Running a Hello OHOS Program](running-a-hello-ohos-program-4.md)** +- **[Running a Hello OHOS Program](running-a-hello-ohos-program-5.md)** -- **[FAQs](faqs-5.md)** +- **[FAQs](faqs-6.md)** diff --git a/en/device-dev/quick-start/hi3861-development-board.md b/en/device-dev/quick-start/hi3861-development-board.md index 8aff33d4d2fbb4144d42d369b02e9eae67a7de21..4e9d3ce1665264cd57b814aaea67f1f5039c9cd8 100644 --- a/en/device-dev/quick-start/hi3861-development-board.md +++ b/en/device-dev/quick-start/hi3861-development-board.md @@ -19,7 +19,7 @@ The Hi3861 WLAN module can also be connected to the Hi3861 mother board to expan **Figure 2** Appearance of the Hi3861 mother board -![](figures/3861背面.png) +![](figures/en-us_image_0000001119945810.png) - The RF circuit includes modules such as the power amplifier \(PA\), low noise amplifier \(LNA\), RF Balun, antenna switch, and power management. It supports a standard bandwidth of 20 MHz and a narrow bandwidth of 5 MHz or 10 MHz, and provides a maximum rate of 72.2 Mbit/s at the physical layer. - The Hi3861 WLAN baseband supports the orthogonal frequency division multiplexing \(OFDM\) technology and is backward compatible with the direct sequence spread spectrum \(DSSS\) and complementary code keying \(CCK\) technologies. In addition, the Hi3861 WLAN baseband supports various data rates specified in the IEEE 802.11 b/g/n protocol. diff --git a/en/device-dev/quick-start/how-to-develop-12.md b/en/device-dev/quick-start/how-to-develop-12.md index 4d06d23b2aa571b146c82025811278d6eb924ee9..ac22414da4adfdbdfcb98c777b98ca066d9fe6fc 100644 --- a/en/device-dev/quick-start/how-to-develop-12.md +++ b/en/device-dev/quick-start/how-to-develop-12.md @@ -10,14 +10,14 @@ ## Environment Setup -For details about setting up the standard OpenHarmony environment, see [Setting Up the Environment](overview-8.md). +For details about setting up the standard OpenHarmony environment, see [Setting Up the Environment](overview-9.md). >![](public_sys-resources/icon-note.gif) **NOTE:** >For details about the environment requirements of the third-party development board, refer to the official guide of the development board. ## Build -Perform the following operations in the Linux environment. +If you are using the Docker environment, refer to the Docker usage guide to build the system. If you are using the installation package, perform the following operations in the Linux environment. 1. Go to the root directory of the source code and run the following command to build the distribution. @@ -72,7 +72,7 @@ The Hi3516DV300 supports programming through the USB port in Windows or Linux+Wi 3. Open DevEco Device Tool and go to **Projects** \> **Settings**. - ![](figures/2021-01-27_170334-18.png) + ![](figures/2021-01-27_170334-17.png) 4. On the **Partition Configuration** tab page, enter the information about the files to be programmed, including the following. @@ -216,7 +216,7 @@ The Hi3516DV300 supports programming through the USB port in Windows or Linux+Wi ![](figures/en-us_image_0000001160528243.png) 6. When you finish modifying, click **Save** in the upper right corner. -7. Open the project file, go to ![](figures/2021-01-27_170334-19.png) \> **PROJECT TASKS** \> **fastboot** \> **Erase** to erase U-boot. +7. Open the project file, go to ![](figures/2021-01-27_170334-18.png) \> **PROJECT TASKS** \> **fastboot** \> **Erase** to erase U-boot. ![](figures/en-us_image_0000001163045527.png) @@ -233,7 +233,7 @@ The Hi3516DV300 supports programming through the USB port in Windows or Linux+Wi >![](public_sys-resources/icon-note.gif) **NOTE:** >If this is the first time you program flash memory on the Hi3516 or Hi3518 board, the message "not find the Devices" may be displayed. In this case, follow the steps in [Installing the USB Driver on the Hi3516 or Hi3518 Series Development Boards](https://device.harmonyos.com/en/docs/ide/user-guides/usb_driver-0000001058690393) and start programming again. - ![](figures/1-20.png) + ![](figures/1-19.png) 11. If the following message is displayed, it indicates that the programming is successful. @@ -242,5 +242,5 @@ The Hi3516DV300 supports programming through the USB port in Windows or Linux+Wi ## Development Example -You have completed the quick start for the standard system. Get yourself familiar with OpenHarmony by a [Development Example for Platform Drivers](../guide/overview-13.md). +You have completed the quick start for the standard system. Get yourself familiar with OpenHarmony by a [Development Example for Platform Drivers](../guide/overview-11.md). diff --git a/en/device-dev/quick-start/overview-0.md b/en/device-dev/quick-start/overview-0.md index 3c91304fc26ca65e12b99c9b2da5d912446a508b..9a73241369434d4ec249a00b0f9231c5a9d83a3a 100644 --- a/en/device-dev/quick-start/overview-0.md +++ b/en/device-dev/quick-start/overview-0.md @@ -1,6 +1,6 @@ # Overview -The mini and small OpenHarmony systems are suitable for IoT devices with limited memory. This document describes the system development with three typical development boards: Hi3861, Hi3516, and Hi3518. +The mini and small OpenHarmony systems are suitable for IoT devices with limited memory. This document describes the system development with three typical development boards: Hi3861 WLAN module, Hi3516D V300, and Hi3518E V300. -With this document, you will quickly get familiar with environment setup, build, burning, debugging, and simple driver development for mini and small systems. +With this document, you will quickly get familiar with environment setup, build, burning, debugging, and simple app and driver development for mini and small systems. diff --git a/en/device-dev/quick-start/overview-1.md b/en/device-dev/quick-start/overview-1.md new file mode 100644 index 0000000000000000000000000000000000000000..d490f51d2ebc128dda830e011b63b20e637b1136 --- /dev/null +++ b/en/device-dev/quick-start/overview-1.md @@ -0,0 +1,10 @@ +# Overview + +Use the DevEco Device Tool for development, build, burning, and debugging of OpenHarmony. + +The DevEco Device Tool is currently available on Windows and Ubuntu. This document takes the Windows version as an example. + +For details about how to use the Ubuntu version, see the [HUAWEI DevEco Device Tool User Guide](https://device.harmonyos.com/en/docs/ide/user-guides/service_introduction-0000001050166905). + +The Windows version supports build for the Hi3861 development board only. For other development boards, you should use the Ubuntu version and switch to the Ubuntu platform. The following describes how to set up the development environment and build environment for mini and small OpenHarmony. + diff --git a/en/device-dev/quick-start/overview-7.md b/en/device-dev/quick-start/overview-7.md new file mode 100644 index 0000000000000000000000000000000000000000..c4f01181922cdde3dd4924e6ef8978c03f260a1c --- /dev/null +++ b/en/device-dev/quick-start/overview-7.md @@ -0,0 +1,4 @@ +# Overview + +This document helps you quickly understand how to set up a standard OpenHarmony system, and how to build, burn, and start the system. This document uses the recommended Hi3516D V300 development board as an example. + diff --git a/en/device-dev/quick-start/overview-9.md b/en/device-dev/quick-start/overview-9.md new file mode 100644 index 0000000000000000000000000000000000000000..2afccc92c3ac98b0d6f181c1ba69f706364a0562 --- /dev/null +++ b/en/device-dev/quick-start/overview-9.md @@ -0,0 +1,58 @@ +# Overview + +- [Introduction](#section18217135811916) +- [Environment Requirements](#section466851916410) + - [Hardware](#section19682305453) + - [Software](#section1595725202314) + + +## Introduction + +In a standard OpenHarmony system, you can use the DevEco Device Tool for development and burning in Windows, and for build in Linux. This document describes how to set up the environment. + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>The procedure for setting up a Windows standard-system environment is basically the same as that for setting up a Windows mini- or small-system environment. Therefore, you can skip section [Windows Development Environment](windows-development-environment-10.md) if you have set up a Windows mini- or small-system environment. + +## Environment Requirements + +### Hardware + +- Linux compile server +- Windows workstation \(host computer\) + +### Software + +**Table 1** Development platform requirements + + + + + + + + + + + + + + + + + + +

Platform

+

Software

+

Description

+

Remarks

+

Linux compile server

+

Operating system

+

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

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

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

+

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

+

Windows workstation

+

Operating system

+

Windows XP/Windows7/Windows10

+
+ diff --git a/en/device-dev/quick-start/overview.md b/en/device-dev/quick-start/overview.md index 5535b8f3cf2d668ca331acb8d990f15cca81bb6e..a0564a41e59a5dfd0f8986d9298f67e5b39d6260 100644 --- a/en/device-dev/quick-start/overview.md +++ b/en/device-dev/quick-start/overview.md @@ -59,7 +59,7 @@ In addition, OpenHarmony provides a series of optional system components that ca

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

- +

Basic capabilities

diff --git a/en/device-dev/quick-start/preparing-the-ubuntu-build-environment.md b/en/device-dev/quick-start/preparing-the-ubuntu-build-environment.md new file mode 100644 index 0000000000000000000000000000000000000000..a3f62435509c2081c8d9899ee1c08b1c4e8e0f2d --- /dev/null +++ b/en/device-dev/quick-start/preparing-the-ubuntu-build-environment.md @@ -0,0 +1,147 @@ +# Preparing the Ubuntu Build Environment + +- [Setting up an Ubuntu Build Environment Using a Docker Environment](#section1643363843714) + - [Obtaining System Source Code](#section58448331029) + - [Installing and Using the Docker Environment](#section22916211916) + +- [Setting up an Ubuntu Build Environment Using an Installation Package](#section25961010189) + - [Installing Dependent Tools](#section109262032104819) + - [Obtaining Standard-System Source Code](#section6325556113718) + - [Obtaining prebuilts](#section16453104219209) + - [Configuring the Node.js Environment and Obtaining the Node\_modules Dependency Package](#section133741330192119) + - [Installing the hc-gen Tool](#section149281248182116) + + +You can use either the Docker environment or installation package provided by OpenHarmony to set up an Ubuntu build environment. This section describes the two methods. + +## Setting up an Ubuntu Build Environment Using a Docker Environment + +The standard OpenHarmony system provides a Docker environment which encapsulates build tools. To use the Docker environment, perform the following steps: + +1. Obtain the system source code. +2. Install and use the Docker environment. + +### Obtaining System Source Code + +For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md). + +### Installing and Using the Docker Environment + +For details, see [Installing and Using Docker](../get-code/tool-acquisition.md). + +## Setting up an Ubuntu Build Environment Using an Installation Package + +The procedure is as follows: + +1. Install dependent tools. +2. Obtain the system source code. +3. Obtain prebuilts. +4. Configure the Node.js environment and obtain the Node\_modules dependency package. +5. Install the hc-gen tool. + +### Installing Dependent Tools + +The installation command is as follows: + +``` +sudo apt-get install binutils git-core git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 +``` + +>![](public_sys-resources/icon-caution.gif) **CAUTION:** +>The preceding command is applicable to Ubuntu 18.04. For other Ubuntu versions, use the corresponding installation commands based on the installation package name. If the Ubuntu version is later than 18.04, Python 2.7 and python-minimal must be installed. + +### Obtaining Standard-System Source Code + +For details, see [Source Code Acquisition](../get-code/source-code-acquisition.md). + +### Obtaining prebuilts + +1. Go to the OpenHarmony working directory. + + ``` + cd OpenHarmony + ``` + +2. Download the script. + + ``` + curl https://gitee.com/landwind/script-tools/raw/master/Shell/OpenHarmony/OpenHarmony_2.0_canary_prebuilts_download.sh >./prebuilts_download.sh + ``` + +3. Download and decompress the prebuilts package in a specified directory. + + ``` + bash ./prebuilts_download.sh + ``` + + By default, binary files are stored in the **OpenHarmony\_2.0\_canary\_prebuilts** directory, which is in the same directory as **OpenHarmony**. To change the storage path, change the value of **bin\_dir** in **prebuilts\_download.sh**. + +4. Return to the previous directory. + + ``` + cd - + ``` + + +### Configuring the Node.js Environment and Obtaining the Node\_modules Dependency Package + +To build the JS framework, you need to download and configure Node.js on a Linux server. The procedure is as follows \(the **OpenHarmony** directory in the following steps is the root directory of the current project and is configurable\): + +1. Download Node.js on a Linux server. + + ``` + mkdir -p OpenHarmony/prebuilts/build-tools/common/nodejs # Create the nodejs directory. + cd OpenHarmony/prebuilts/build-tools/common/nodejs # Go to the nodejs directory. + wget --no-check-certificate https://nodejs.org/download/release/v12.18.4/node-v12.18.4-linux-x64.tar.gz # Download the Node.js package. + tar -zxvf node-v12.18.4-linux-x64.tar.gz # Decompress the Node.js package. + cd - # Return to the previous directory. + ``` + +2. Configure the Node.js variable and download the **node\_modules** package. + + ``` + cd OpenHarmony/third_party/jsframework # Go to the jsframework directory. + export PATH=../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin:${PATH} # Configure the Node.js variable. + npm install # Download the node_modules package. + cd - # Return to the previous directory. + ``` + +3. Store the **node\_modules** package in the **prebuilts/build-tools/common/js-framework** directory of the OpenHarmony code. + + ``` + mkdir -p OpenHarmony/prebuilts/build-tools/common/js-framework # Create the js-framework directory. + cp -rp OpenHarmony/third_party/jsframework/node_modules OpenHarmony/prebuilts/build-tools/common/js-framework/ + ``` + + +### Installing the hc-gen Tool + +hc-gen is used to compile the driver. To install hc-gen, perform the following steps: + +1. Start a Linux server. +2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar). +3. Decompress the hc-gen installation package to **\~/hc-gen** on the Linux server. + + ``` + tar -xvf hc-gen-0.65-linux.tar -C ~/ + ``` + +4. Set an environment variable. + + ``` + vim ~/.bashrc + ``` + + Copy the following command to the last line of the **.bashrc** file, save the file, and exit. + + ``` + export PATH=~/hc-gen:$PATH + ``` + +5. Validate the environment variable. + + ``` + source ~/.bashrc + ``` + + diff --git a/en/device-dev/quick-start/running-a-hello-ohos-program-5.md b/en/device-dev/quick-start/running-a-hello-ohos-program-5.md new file mode 100644 index 0000000000000000000000000000000000000000..713bd45a6bda1acfa95c9b2061669fd5475ebb1a --- /dev/null +++ b/en/device-dev/quick-start/running-a-hello-ohos-program-5.md @@ -0,0 +1,262 @@ +# Running a Hello OHOS Program + +- [Creating a Program](#section1550972416485) +- [Building](#section234175193114) +- [Burning](#section7609155824819) +- [Running an Image](#section17612105814480) +- [Follow-up Learning](#section9712145420182) + +This section describes how to create, compile, burn, and run the first program, and finally print **Hello OHOS!** on the develop board. + +## Creating a Program + +1. Create a directory and the program source code. + + Create the **applications/sample/camera/apps/src/helloworld.c** directory and file whose code is shown in the following example. You can customize the content to be printed. For example, you can change **OHOS** to **World**. You can use either C or C++ to develop a program. + + ``` + #include + + int main(int argc, char **argv) + { + printf("\n************************************************\n"); + printf("\n\t\tHello OHOS!\n"); + printf("\n************************************************\n\n"); + + return 0; + } + ``` + +2. Create a build file. + + Create the **applications/sample/camera/apps/BUILD.gn** file. The file content is as follows: + + ``` + import("//build/lite/config/component/lite_component.gni") + lite_component("hello-OHOS") { + features = [ ":helloworld" ] + } + executable("helloworld") { + output_name = "helloworld" + sources = [ "src/helloworld.c" ] + include_dirs = [] + defines = [] + cflags_c = [] + ldflags = [] + } + ``` + +3. Add a new component. + + Add the configuration of the **hello\_world\_app** component to the **build/lite/components/applications.json** file. The sample code below shows some configurations defined in the **applications.json** file, and the code between **\#\#start\#\#** and **\#\#end\#\#** is the new configuration \(Delete the rows where **\#\#start\#\#** and **\#\#end\#\#** are located after the configurations are added.\) + + ``` + { + "components": [ + { + "component": "camera_sample_communication", + "description": "Communication related samples.", + "optional": "true", + "dirs": [ + "applications/sample/camera/communication" + ], + "targets": [ + "//applications/sample/camera/communication:sample" + ], + "rom": "", + "ram": "", + "output": [], + "adapted_kernel": [ "liteos_a" ], + "features": [], + "deps": { + "components": [], + "third_party": [] + } + }, + ##start## + { + "component": "hello_world_app", + "description": "Communication related samples.", + "optional": "true", + "dirs": [ + "applications/sample/camera/apps" + ], + "targets": [ + "//applications/sample/camera/apps:hello-OHOS" + ], + "rom": "", + "ram": "", + "output": [], + "adapted_kernel": [ "liteos_a" ], + "features": [], + "deps": { + "components": [], + "third_party": [] + } + }, + ##end## + { + "component": "camera_sample_app", + "description": "Camera related samples.", + "optional": "true", + "dirs": [ + "applications/sample/camera/launcher", + "applications/sample/camera/cameraApp", + "applications/sample/camera/setting", + "applications/sample/camera/gallery", + "applications/sample/camera/media" + ], + ``` + +4. Modify the board configuration file. + + Add the **hello\_world\_app** component to the **vendor/hisilicon/hispark\_aries/config.json** file. The sample code below shows the configurations of the **applications** subsystem, and the code between **\#\#start\#\#** and **\#\#end\#\#** is the new configuration \(Delete the rows where **\#\#start\#\#** and **\#\#end\#\#** are located after the configurations are added.\) + + ``` + { + "subsystem": "applications", + "components": [ + ##start## + { "component": "hello_world_app", "features":[] }, + ##end## + { "component": "camera_sample_app", "features":[] } + + ] + }, + ``` + + +## Building + +If the Linux environment is installed using Docker, perform the building by referring to [Using Docker to Prepare the Build Environment](../get-code/tool-acquisition.md). If the Linux environment is installed using a software package, go to the root directory of the source code and run the following commands for source code compilation: + +``` +hb set (Set the building path.) +. (Select the current path.) +Select ipcamera_hispark_aries@hisilicon and press Enter. +hb build -f (Start building.) +``` + +The result files are generated in the **out/hispark\_aries/ipcamera\_hispark\_aries** directory. + +**Figure 1** Settings +![](figures/settings-4.png "settings-4") + +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>The U-boot file of the Hi3518E V300 development board can be obtained from the following path: device/hisilicon/hispark\_aries/sdk\_liteos/uboot/out/boot/u-boot-hi3518ev300.bin + +## Burning + +The USB port is the only burning mode supported by the Hi3518 development board. + +1. Connect the PC and the target development board through the serial port and USB port. In this section, the Hi3518EV300 is used as an example. For details, please refer to [Introduction to the Hi3518 Development Board](https://device.harmonyos.com/en/docs/start/introduce/oem_camera_start_hi3518-0000001050170473). +2. Open Device Manager, then check and record the serial port number corresponding to the development board. + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >If the serial port number is not displayed correctly, follow the steps described in [Installing the Serial Port Driver on the Hi3516 or Hi3518 Series Development Boards](https://device.harmonyos.com/en/docs/ide/user-guides/hi3516_hi3518-drivers-0000001050743695). + + ![](figures/en-us_image_0000001073057176.png) + +3. Open DevEco Device Tool and go to **Projects** \> **Settings**. + + ![](figures/en-us_image_0000001077956808.png) + +4. On the **Partition Configuration** tab page, modify the settings. In general cases, you can leave the fields at their default settings. +5. On the **hi3518ev300** tab page, set the programming options. + + - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001057313128_li46411811196). + - **upload\_protocol**: Select the programming protocol **hiburn-usb**. + - **upload\_partitions**: Select the file to be programmed. By default, the **fastboot**, **kernel**, **rootfs**, and **userfs** files are programmed at the same time. + + ![](figures/en-us_image_0000001096963405.png) + +6. When you finish modifying, click **Save** in the upper right corner. +7. Open the project file, go to ![](figures/2021-01-27_170334-5.png) \> **PROJECT TASKS** \> **hi3518ev300\_fastboot** \> **Erase** to erase U-boot. + + ![](figures/en-us_image_0000001163529159.png) + +8. When the following message is displayed, power off the development board and then power it on. + + ![](figures/en-us_image_0000001078089378.png) + +9. If the following message is displayed, it indicates that U-Boot is erased successfully. + + ![](figures/en-us_image_0000001073835952.png) + +10. Go to **hi3518ev300** \> **Upload** to start programming. + + ![](figures/en-us_image_0000001163568181.png) + +11. If the following message is displayed, it indicates that the programming is successful. + + ![](figures/en-us_image_0000001073242197.png) + + +## Running an Image + +1. Connect to a serial port. + + >![](public_sys-resources/icon-notice.gif) **NOTICE:** + >If the connection fails, rectify the fault by referring to [FAQs](../quick-start/faqs-6.md). + + **Figure 2** Serial port connection + + + ![](figures/chuankou1-6.png) + + 1. Click **Monitor** to enable the serial port. The **TERMINAL** window is displayed. + 2. Press **Enter** repeatedly until **hisilicon** displays. + 3. Go to [step 2](#li9441185382314) if the board is started for the first time or the startup parameters need to be modified; go to [step 3](#li6442853122312) otherwise. + +2. \(Mandatory for the first burning\) Modify the **bootcmd** and **bootargs** parameters of U-boot. This step is a fixed operation and the result can be saved. However, you need to perform the following steps again if U-boot needs to be reburnt. + + **Table 1** Parameters of the U-boot + + + + + + + + + + + + + + + + + + + + + + +

Command

+

Description

+

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

+

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

+

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

+

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=7M rootsize=8M indicates the actual start address and length of the rootfs.img file to be burnt, respectively. The file size must be the same as that of the rootfs.img file in the IDE.

+

saveenv

+

saveenv means to save the current configuration.

+

reset

+

reset means to reset the board.

+

pri

+

pri means to view the displayed parameters.

+
+ + >![](public_sys-resources/icon-notice.gif) **NOTICE:** + >**go 0x40000000** \(optional\) indicates that the command is fixed in the startup parameters by default and the board automatically starts after it is reset. If you want to manually start the board, press **Enter** in the countdown phase of the U-boot startup to interrupt the automatic startup. + +3. If **hisilicon \#** is displayed during the startup, run the **reset** command. After the system automatically starts and **OHOS** is displayed, run the **./bin/helloworld** command and then press **Enter**. The system is started successfully if information shown in the following figure is displayed. + + **Figure 3** Successful system startup and program execution + ![](figures/successful-system-startup-and-program-execution-7.png "successful-system-startup-and-program-execution-7") + + +## Follow-up Learning + +Congratulations! You have finished all steps! You are advised to go on learning how to develop [Cameras with a Screen](../guide/cameras-with-a-screen.md). + diff --git a/en/device-dev/quick-start/running-a-hello-ohos-program.md b/en/device-dev/quick-start/running-a-hello-ohos-program.md index 3bf9919aa00ef90ac9f8dfff0d0d79c677219961..5f38a61c19e21dfa897231cf60086708b586ca67 100644 --- a/en/device-dev/quick-start/running-a-hello-ohos-program.md +++ b/en/device-dev/quick-start/running-a-hello-ohos-program.md @@ -179,7 +179,7 @@ The Hi3516 development board allows you to burn flash memory over the USB port, - **upload\_net\_client\_gw**: Set the gateway of the development board, such as 192.168.1.1. Once the **upload\_net\_server\_ip** field is set, this field will be automatically populated. - **upload\_net\_client\_ip**: Set the IP address of the development board, such as 192.168.1.3. Once the **upload\_net\_server\_ip** field is set, this field will be automatically populated. - ![](figures/en-us_image_0000001160649345.png) + ![](figures/en-us_image_0000001117463460.png) 8. When you finish modifying, click **Save** in the upper right corner. 9. Open the project file and go to ![](figures/2021-01-27_170334-2.png) \> **PROJECT TASKS** \> **hi3516dv300** \> **Upload** to start programming. @@ -200,7 +200,7 @@ The Hi3516 development board allows you to burn flash memory over the USB port, 1. Connect to a serial port. >![](public_sys-resources/icon-notice.gif) **NOTICE:** - >If the connection fails, rectify the fault by referring to [FAQs](../quick-start/faqs-2.md). + >If the connection fails, rectify the fault by referring to [FAQs](../quick-start/faqs-3.md). **Figure 2** Serial port connection @@ -233,7 +233,7 @@ The Hi3516 development board allows you to burn flash memory over the USB port,

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

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

-

rootaddr=10 M, rootsize=20 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 rootfs.img file in the IDE.

+

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

saveenv

diff --git a/en/device-dev/quick-start/setting-up-the-environment-2.md b/en/device-dev/quick-start/setting-up-the-environment-2.md new file mode 100644 index 0000000000000000000000000000000000000000..03af20f97abd65f5147b8688b60cedad15b2c3bd --- /dev/null +++ b/en/device-dev/quick-start/setting-up-the-environment-2.md @@ -0,0 +1,151 @@ +# Setting Up the Environment + +- [Environment Requirements](#section179175261196) + - [Hardware](#section5840424125014) + - [Software](#section965634210501) + +- [Installing Linux Build Tools](#section182916865219) + - [Changing Linux Shell to Bash](#section1715027152617) + - [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251) + - [Installing a File Packing Tool](#section1969111820270) + - [Installing the JVM](#section1692618112713) + + +## Environment Requirements + +### Hardware + +- Hi3516D V300 IoT camera development board +- USB-to-serial cable and network cable \(The Windows workstation is connected to the Hi3516D V300 development board through the USB-to-serial cable and network cable.\) + +The following figure shows the hardware connections. + +**Figure 1** Hardware connections + + +![](figures/矩形备份-292.png) + +### Software + +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>This section describes how to use an installation package to set up the compilation and development environment. If you are going to use Docker to set up the environment, skip this section and [Installing Linux Build Tools](#section182916865219). + +The following table describes the tools required for setting up the general environment for a Linux server of the Hi3516 development board and how to obtain these tools. + +**Table 1** Development tools and obtaining methods + + + + + + + + + + + + + + + + + + + + + + + + +

Development Tool

+

Description

+

How to Obtain

+

bash

+

Processes CLI commands.

+

System configuration

+

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

+

Provides a basic software package for compilation and building.

+

Internet

+

dosfstools, mtools, and mtd-utils

+

Pack files.

+

apt-get install

+

Java virtual machine (JVM)

+

Compiles, debugs, and runs Java programs.

+

apt-get install

+
+ +## Installing Linux Build Tools + +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install compilation tools like **LLVM** and **hc-gen**. +>- \(Recommended\) If you obtain the source code via the mirror site or code repository, install **hc-gen**. When installing the compilation tool, ensure that its environment variable path is unique. + +### Changing Linux Shell to Bash + +Check whether bash is used as the shell. + +``` +ls -l /bin/sh +``` + +If **/bin/sh -\> bash** is not displayed, do as follows to change shell to bash. + +**Method 1:** Run the following command on the device and then click **No**. + +``` +sudo dpkg-reconfigure dash +``` + +**Method 2:** Run the first command to delete **sh** and then run the second command to create a new soft link. + +``` +sudo rm -rf /bin/sh +sudo ln -s /bin/bash /bin/sh +``` + +### Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\) + +Install the software. + +``` +sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev +``` + +### Installing a File Packing Tool + +1. Start a Linux server. +2. Install **dosfstools**. + + ``` + sudo apt-get install dosfstools + ``` + +3. Install **mtools**. + + ``` + sudo apt-get install mtools + ``` + +4. Install **mtd-utils**. + + ``` + sudo apt-get install mtd-utils + ``` + + +### Installing the JVM + +1. Start a Linux server. +2. Install the Java Runtime Environment \(JRE\). + + ``` + sudo apt-get install default-jre + ``` + +3. Install the Java Development Kit \(JDK\). + + ``` + sudo apt-get install default-jdk + ``` + + diff --git a/en/device-dev/quick-start/setting-up-the-environment-4.md b/en/device-dev/quick-start/setting-up-the-environment-4.md new file mode 100644 index 0000000000000000000000000000000000000000..ae739691758d246f216824d1848940ad0cec5143 --- /dev/null +++ b/en/device-dev/quick-start/setting-up-the-environment-4.md @@ -0,0 +1,156 @@ +# Setting Up the Environment + +- [Environment Requirements](#section1724111409282) + - [Hardware](#section487353718276) + - [Software Requirements](#section17315193935817) + +- [Installing Linux Build Tools](#section8831868501) + - [Changing Linux Shell to Bash](#section1715027152617) + - [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251) + - [Installing a File Packing Tool](#section1686964015274) + - [Installing hc-gen](#section18706403274) + + +## Environment Requirements + +### Hardware + +- Hi3518E V300 IoT camera development board +- USB-to-serial cable and network cable \(The Windows workstation is connected to the Hi3518E V300 development board through the USB-to-serial cable and network cable.\) + + The following figure shows the hardware connections. + + +**Figure 1** Hardware connections +![](figures/hardware-connections-3.png "hardware-connections-3") + +### Software Requirements + +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>This section describes how to use an installation package to set up the compilation and development environment. If you are going to use Docker to set up the environment, skip this section and [Installing Linux Build Tools](#section8831868501). + +The following table describes the tools required for setting up the general environment for a Linux server of the Hi3518 development board and how to obtain these tools. + +**Table 1** Development tools and obtaining methods + + + + + + + + + + + + + + + + + + + + +

Development Tool

+

Description

+

How to Obtain

+

bash

+

Processes CLI commands.

+

System configuration

+

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

+

Provides a basic software package for compilation and building.

+

Internet

+

dosfstools, mtools, and mtd-utils

+

Pack files.

+

apt-get install

+
+ +## Installing Linux Build Tools + +>![](public_sys-resources/icon-notice.gif) **NOTICE:** +>- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install **hc-gen**. +>- \(Recommended\) If you obtain the source code via the mirror site or code repository, install **hc-gen**. When installing the compilation tool, ensure that its environment variable path is unique. + +### Changing Linux Shell to Bash + +Check whether bash is used as the shell. + +``` +ls -l /bin/sh +``` + +If **/bin/sh -\> bash** is not displayed, do as follows to change shell to bash. + +**Method 1:** Run the following command on the device and then click **No**. + +``` +sudo dpkg-reconfigure dash +``` + +**Method 2:** Run the first command to delete **sh** and then run the second command to create a new soft link. + +``` +sudo rm -rf /bin/sh +sudo ln -s /bin/bash /bin/sh +``` + +### Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\) + +Install the software. + +``` +sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get install g++ && sudo apt-get install make && sudo apt-get install zlib* && sudo apt-get install libffi-dev +``` + +### Installing a File Packing Tool + +1. Start a Linux server. +2. Install **dosfstools**. + + ``` + sudo apt-get install dosfstools + ``` + +3. Install **mtools**. + + ``` + sudo apt-get install mtools + ``` + +4. Install **mtd-utils**. + + ``` + sudo apt-get install mtd-utils + ``` + + +### Installing hc-gen + +1. Start a Linux server. +2. Download [hc-gen](https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar). +3. Decompress the hc-gen installation package to **\~/hc-gen** on the Linux server. + + ``` + tar -xvf hc-gen-0.65-linux.tar -C ~/ + ``` + +4. Set an environment variable. + + ``` + vim ~/.bashrc + ``` + + Copy the following command to the last line of the **.bashrc** file, save the file, and exit. + + ``` + export PATH=~/hc-gen:$PATH + ``` + +5. Validate the environment variable. + + ``` + source ~/.bashrc + ``` + + diff --git a/en/device-dev/quick-start/setting-up-the-environment.md b/en/device-dev/quick-start/setting-up-the-environment.md index ca99190db50ec394cce465b152de250ce25392b3..e97949c8b45801dc03a3774e50f03765e139c929 100644 --- a/en/device-dev/quick-start/setting-up-the-environment.md +++ b/en/device-dev/quick-start/setting-up-the-environment.md @@ -4,7 +4,7 @@ - [Hardware](#section19202111020215) - [Software](#section727451210318) -- [Install Linux Build Tools](#section497484245614) +- [Installing Linux Build Tools](#section497484245614) - [Installing Basic Software Used for Compilation and Building \(Required Only for Ubuntu 20+\)](#section45512412251) - [Installing Scons](#section7438245172514) - [Installing Python Modules](#section88701892341) @@ -94,7 +94,7 @@ The following table lists the tools required for the Hi3861 development board. -## Install Linux Build Tools +## Installing Linux Build Tools >![](public_sys-resources/icon-notice.gif) **NOTICE:** >- If you acquire the source code using an HPM component or HPM CLI tool, you do not need to install **gcc\_riscv32**. @@ -320,7 +320,7 @@ sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get >If you use the compiled **riscv32 gcc** package, perform the following steps to set environment variables: >1. Decompress the package to the root directory. > ``` - > tar -xvf gcc_riscv32-linux-7.3.0.tar.gz -C /opt + > tar -xvf gcc_riscv32-linux-7.3.0.tar.gz -C ~ > ``` >2. Set an environment variable. > ``` @@ -328,7 +328,7 @@ sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get > ``` >3. Copy the following command to the last line of the **.bashrc** file, save the file, and exit. > ``` - > export PATH=/opt/gcc_riscv32/bin:$PATH + > export PATH=~/gcc_riscv32/bin:$PATH > ``` ``` @@ -338,7 +338,7 @@ sudo apt-get install build-essential && sudo apt-get install gcc && sudo apt-get Copy the following command to the last line of the **.bashrc** file, save the file, and exit. ``` - export PATH=/opt/gcc_riscv32/bin:$PATH + export PATH=~/gcc_riscv32/bin:$PATH ``` 17. Validate the environment variable. diff --git a/en/device-dev/quick-start/standard-system.md b/en/device-dev/quick-start/standard-system.md index cf466a128a9c0d7903d0a9a829333aeb3a43aec9..33f6ed2a876d5ef8f93d7ee22c0546ea37ba9c67 100644 --- a/en/device-dev/quick-start/standard-system.md +++ b/en/device-dev/quick-start/standard-system.md @@ -1,8 +1,8 @@ # Standard System -- **[Overview](overview-6.md)** +- **[Overview](overview-7.md)** -- **[Environment Setup](environment-setup-7.md)** +- **[Environment Setup](environment-setup-8.md)** - **[How to Develop](how-to-develop-12.md)** diff --git a/en/device-dev/quick-start/windows-development-environment-10.md b/en/device-dev/quick-start/windows-development-environment-10.md new file mode 100644 index 0000000000000000000000000000000000000000..91c42c4f088d5f467479bb40cd1819e67277cfe4 --- /dev/null +++ b/en/device-dev/quick-start/windows-development-environment-10.md @@ -0,0 +1,183 @@ +# Windows Development Environment + +- [Obtaining the Software](#en-us_topic_0000001058091994_section1483143015558) +- [Installing Visual Studio Code](#en-us_topic_0000001058091994_section71401018163318) +- [Installing Python](#en-us_topic_0000001058091994_section16266553175320) +- [Installing Node.js](#en-us_topic_0000001058091994_section5353233124511) +- [Installing hpm](#en-us_topic_0000001058091994_section173054793610) +- [Installing the DevEco Device Tool Plug-in](#en-us_topic_0000001058091994_section4336315185716) + +Operating system: 64-bit version of Windows 10. + +DevEco Device Tool is a plug-in for Visual Studio Code. The installation procedure includes five parts: + +1. Installing Visual Studio Code +2. Installing Python +3. Installing Node.js +4. Installing hpm +5. Installing the DevEco Device Tool Plug-in + +## Obtaining the Software + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Tool

+

Description

+

Version

+

Obtaining Channel

+

Visual Studio Code

+

Code editing tool

+

V1.53 or later (64-bit)

+

https://code.visualstudio.com/Download

+

Python

+

Programming tool

+

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

+

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

+

Node.js

+

The npm environment provider

+

v12.0.0 or later (64-bit)

+

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

+

hpm

+

Package manager

+

Latest version

+

Run the following command:

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

DevEco Device Tool

+

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

+

v2.2 Beta1

+

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

+

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

+
+ +## Installing Visual Studio Code + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>If you have installed Visual Studio Code, open the CLT and run **code --version** to check whether the version is 1.53 or later. If the version number is returned, it indicates that the environment variables are set correctly. + +1. Double-click the Visual Studio Code package to install it. During the installation, select **Add to PATH \(requires shell restart\)**. + + ![](figures/en-us_image_0000001057335403.png) + +2. After the installation is complete, restart the computer for the environment variables of Visual Studio Code to take effect. +3. Open the CLT and run **code --version**. If the version number can be displayed, it indicates that the installation is successful. + +## Installing Python + +1. Double-click the Python software package, select **Add Python xx to PATH**, and click **Install Now**. + + ![](figures/en-us_image_0000001096154076.png) + +2. After the installation is complete, click **Close**. + + ![](figures/en-us_image_0000001142794291.png) + +3. Open the CLT, and run **python --version** to check the installation result. + + ![](figures/en-us_image_0000001143154485.png) + +4. In the CLT, run the following commands to set the pip source for downloading the dependencies required for later installation: + + ``` + pip config set global.trusted-host repo.huaweicloud.com + pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple + pip config set global.timeout 120 + ``` + + +## Installing Node.js + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>If you have installed Node.js, open the CLT and run **node -v** to check whether the version is 12.0.0 or later. + +1. Run the downloaded software package to install. Use the default settings when following the installation wizard, and click **Next** until **Finish** is displayed. During the installation, Node.js will automatically set the system Path environment variable to the installation directory of **node.exe**. +2. Open the CLT and run **node -v**. If the version number of Node.js is displayed, it indicates that Node.js has been successfully installed. + + ![](figures/en-us_image_0000001056814287.png) + + +## Installing hpm + +Before installing hpm, ensure that Node.js has been installed + +and that your network can access the Internet. If your network requires a proxy to access the Internet, [set up the npm proxy](https://device.harmonyos.com/cn/docs/ide/user-guides/npm_proxy-0000001054491032) first. + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>If hpm has been installed, run **npm update -g @ohos/hpm-cli** to update it to the latest version. + +1. You are advised to set the npm source to an image in China, for example, a HUAWEI CLOUD image source. + + ``` + npm config set registry https://repo.huaweicloud.com/repository/npm/ + ``` + +2. Open the CLT and run the following command to install the latest version of hpm: + + ``` + npm install -g @ohos/hpm-cli + ``` + + ![](figures/en-us_image_0000001073840162.png) + +3. After the installation is complete, run the following command to obtain the installation result: + + ``` + hpm -V + ``` + + ![](figures/en-us_image_0000001100641602.png) + + +## Installing the DevEco Device Tool Plug-in + +To install the DevEco Device Tool plug-in, ensure that the **user name of the host cannot contain Chinese characters**; otherwise, the plug-in may fail to run. + +DevEco Device Tool will automatically download and install the C/C++ and CodeLLDB plug-ins from the Visual Studio Code Marketplace during the installation process. Therefore, make sure Visual Studio Code can access the Internet. If your network requires a proxy to access the Internet, [set up the Visual Studio Code proxy](https://device.harmonyos.com/cn/docs/ide/user-guides/vscode_proxy-0000001074231144) first. + +>![](public_sys-resources/icon-note.gif) **NOTE:** +>Before installing DevEco Device Tool, ensure that Visual Studio Code is closed. + +1. Decompress the DevEco Device Tool plug-in package and double-click the installer to install. +2. During the installation, the dependency files \(such as C/C++ and CodeLLDB plug-ins\) and execution programs required by DevEco Device Tool are automatically installed. + + ![](figures/en-us_image_0000001072468991.png) + +3. After the installation is complete, the CLT is automatically closed. +4. Open Visual Studio Code, click the ![](figures/en-us_image_0000001072757874.png) button on the left, and check whether C/C++, CodeLLDB, and DevEco Device Tool are listed in **INSTALLED**. + + >![](public_sys-resources/icon-note.gif) **NOTE:** + >If the C/C++ and CodeLLDB plug-ins fail to be installed, DevEco Device Tool cannot run properly. To solve the issue, see [Installing the C/C++ and CodeLLDB Plug-ins Offline](https://device.harmonyos.com/en/docs/ide/user-guides/offline_plugin_install-0000001074376846). + + ![](figures/en-us_image_0000001142802505.png) + + diff --git a/en/device-dev/quick-start/wlan-connection.md b/en/device-dev/quick-start/wlan-connection.md index 77fd92b52ce853e06a123c4e3a54b09b42f63b92..cc0192a6873b1b66a3224c224b63dab3aabb06ef 100644 --- a/en/device-dev/quick-start/wlan-connection.md +++ b/en/device-dev/quick-start/wlan-connection.md @@ -75,7 +75,8 @@ You can use the DevEco tool to perform the image burning of the Hi3861 WLAN modu ![](figures/en-us_image_0000001078404538.png) -4. On the **hi3861** tab page, set the programming options. +4. On the **Partition Configuration** tab page, modify the settings. In general cases, you can leave the fields at their default settings. +5. On the **hi3861** tab page, set the programming options. - **upload\_port**: Select the serial port number obtained in step [2](#en-us_topic_0000001056563976_li848662117291). - **upload\_protocol**: Select the programming protocol **burn-serial**. @@ -83,17 +84,10 @@ You can use the DevEco tool to perform the image burning of the Hi3861 WLAN modu ![](figures/en-us_image_0000001078244328.png) -5. Modify the settings of the **hi3861\_app** file. In general cases, you can leave the fields at their default settings. To change the default settings, select the target item in the **New Option** field first. - - ![](figures/en-us_image_0000001120802173.png) - 6. When you finish modifying, click **Save** in the upper right corner. +7. Open the project file. In the DevEco Device Tool window, go to **PROJECT TASKS** \> **hi3861** \> **Upload** to start programming. - ![](figures/en-us_image_0000001078313582.png) - -7. Open the project file. In the DevEco Device Tool window, go to **PROJECT TASKS** \> **env:hi3861** \> **Upload** to start programming. - - ![](figures/en-us_image_0000001120802383.png) + ![](figures/en-us_image_0000001163569275.png) 8. When the following information is displayed, press the RST button on the development board to restart it. diff --git a/en/device-dev/subsystems/figures/build-process.jpg b/en/device-dev/subsystems/figures/build-process.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c8d58bc3d172524c78e3c45455622d081429529c Binary files /dev/null and b/en/device-dev/subsystems/figures/build-process.jpg differ diff --git a/en/device-dev/subsystems/hdc_std-faqs.md b/en/device-dev/subsystems/hdc_std-faqs.md new file mode 100644 index 0000000000000000000000000000000000000000..a767f3e60aad365ce1f66252889c5ccd3eb99773 --- /dev/null +++ b/en/device-dev/subsystems/hdc_std-faqs.md @@ -0,0 +1,39 @@ +# hdc\_std FAQs + +- [hdc\_std Fails to Connect to a Device](#section1221016541119) +- [hdc\_std Fails to Run](#section219185710311) + +## hdc\_std Fails to Connect to a Device + +- **Symptom** + + **\[Empty\]** is displayed in the output after the **hdc\_std list targets** command is run. + +- **Possible Causes and Solutions** + 1. The device cannot be identified. + + Check whether **HDC Device** exists in the universal serial bus device of the device manager. If **HDC Device** does not exist, the device cannot be connected. In this case, remove and then insert the device or burn the latest image for the device. + + 2. hdc\_std works improperly. + + Run the **hdc kill** or **hdc start -r** command to kill or restart the hdc service, and then run the **hdc list targets** command to check whether device information is obtained. + + If no device information is obtained, check whether the adb process exists in the task manager. If the adb process exists, kill this process because it may affect the hdc service. After that, run **hdc kill** or **hdc start -r** and then **hdc list targets** again. + + 3. hdc\_std does not match the device. + + If the latest image is burnt for the device, hdc\_std must also be of the latest version. As hdc\_std is updated continuously, obtain hdc\_std of the latest version from the **developtools\_hdc\_standard** repository in the **prebuilt** directory. + + + +## hdc\_std Fails to Run + +- **Symptom** + + The **hdc\_std.exe** file does not run after being clicked. + +- **Possible Causes and Solutions** + + **hdc\_std.exe** requires no installation and can be directly used on a disk. It can also be added to environment variables. Open the cmd window and run the **hdc\_std** command to use **hdc\_std.exe**. + + diff --git a/en/device-dev/subsystems/hdc_std-usage-guidelines.md b/en/device-dev/subsystems/hdc_std-usage-guidelines.md index 842056cc1433a52b91e42f947744804beff9f18c..76a821114ce609f1355d03c91c7cc7df7b43433b 100644 --- a/en/device-dev/subsystems/hdc_std-usage-guidelines.md +++ b/en/device-dev/subsystems/hdc_std-usage-guidelines.md @@ -212,9 +212,9 @@ Stops a service process. **Table 5** Command description -

Parameter

+ - - -

Parameter

Description

+

Description

-r

@@ -222,9 +222,9 @@ Stops a service process.

Triggers the service restart.

Return Value

+

Return Value

Description

+

Description

①Kill server finish

@@ -248,7 +248,7 @@ Starts the service process. **Table 6** Command description -

Parameter

+ @@ -258,9 +258,9 @@ Starts the service process. - -

Parameter

Description

Restarts the service process if it has started.

Return Value

+

Return Value

Description

+

Description

None

@@ -438,7 +438,7 @@ Sends a file to a remote device. Example: -hdc\_std file send E:\\a.txt /data/local/tmp +hdc\_std file send E:\\a.txt /data/local/tmp/a.txt - **file recv \[-a\] _remote local_** @@ -484,7 +484,7 @@ Receives a file from a remote device. Example: -hdc\_std file recv /tmp/fileb ./ +hdc\_std file recv /data/local/tmp/a.txt ./a.txt ## App Commands diff --git a/en/device-dev/subsystems/r-d-tools.md b/en/device-dev/subsystems/r-d-tools.md index 2360cfd5dbe12e167da5909c2353d2b4b74a280f..03f6b950d21aabb40bae141a58f40f1c42793407 100644 --- a/en/device-dev/subsystems/r-d-tools.md +++ b/en/device-dev/subsystems/r-d-tools.md @@ -4,4 +4,6 @@ - **[hdc\_std Usage Guidelines](hdc_std-usage-guidelines.md)** +- **[hdc\_std FAQs](hdc_std-faqs.md)** +