未验证 提交 e1fa112b 编写于 作者: O openharmony_ci 提交者: Gitee

!3185 2937 处理完成:更新设备开发FAQ

Merge pull request !3185 from ester.zhou/TR-2937
# FAQs
- [Overview of FAQs](faqs-overview.md)
- [Environment Setup](faqs-environment-setup.md)
- [Compilation and Building Subsystem](faqs-building.md)
- [Burning](faqs-burning.md)
- [Kernel](faqs-kernel.md)
- [Porting](faqs-porting.md)
- [Startup](faqs-startup.md)
- [System Applications](faqs-system-applications.md)
- [Overview of FAQs](faqs-overview.md)
- [Environment Setup](faqs-environment-building.md)
- [Compilation and Building Subsystem](faqs-building.md)
- [Burning](faqs-burning.md)
- [Kernel](faqs-kernel.md)
- [Porting](faqs-transplant.md)
- [Startup](faqs-init.md)
- [System Applications](faqs-system-using.md)
# Compilation and Building Subsystem<a name="EN-US_TOPIC_0000001215530845"></a>
# Compilation and Building Subsystem
## Mini and Small Systems<a name="section78686441462"></a>
## Mini and Small Systems
### Invalid -- w Option<a name="section67961431372"></a>
- **Symptom**
### "usr/sbin/ninja: invalid option -- w" Displayed During the Build Process
The build fails, and "usr/sbin/ninja: invalid option -- w" is displayed.
- **Symptom**
The compilation fails, and **usr/sbin/ninja: invalid option -- w** is displayed.
- **Cause**
- **Possible Causes**
The Ninja version in the compilation environment is outdated and does not support the **--w** option.
The Ninja version in the build environment is outdated and does not support the **--w** option.
- **Solution**
Uninstall Ninja and GN in the environment and reinstall them by following instructions in [Obtaining Tools](../get-code/gettools-ide.md).
- **Solution**
Uninstall Ninja and GN and follow the instructions provided in [IDE](../get-code/gettools-ide.md) to install Ninja and GN of the required version.
### "/usr/bin/ld: cannot find -lncurses" Displayed During the Build Process
- **Symptom**
The compilation fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
### Library ncurses Not Found<a name="section199631617371"></a>
- **Possible Causes**
The ncurses library is not installed.
- **Symptom**
- **Solution**
```
Run **sudo apt-get install lib32ncurses5-dev** to install the library.
```
The build fails, and "/usr/bin/ld: cannot find -lncurses" is displayed.
- **Cause**
### "line 77: mcopy: command not found" Displayed During the Build Process
The ncurses library is not installed.
- **Symptom**
The compilation fails, and **line 77: mcopy: command not found** is displayed.
- **Solution**
- **Possible Causes**
Mcopy is not installed.
```
sudo apt-get install lib32ncurses5-dev
```
- **Solution**
```
Run **sudo apt-get install dosfstools mtools** to install mcopy.
```
### mcopy not Found<a name="section937435175"></a>
### "riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory" Displayed During the Build Process
- **Symptom**
- **Symptom**
The compilation fails, and the following information is displayed: **riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory**.
The build fails, and "line 77: mcopy: command not found" is displayed.
- **Possible Causes**
Permission is required to access files in the **riscv** compiler path.
- **Cause**
- **Solution**
Run the following command to query the directory where **gcc_riscv32** is located:
```
which riscv32-unknown-elf-gcc
```
mcopy is not installed.
Run the **chmod** command to change the directory permission to **755**.
- **Solution**
```
​sudo apt-get install dosfstools mtools
```
### "No module named 'Crypto'" Displayed During the Build Process
- **Symptom**
The compilation fails, and **No module named'Crypto loaded** is displayed.
### No riscv File or Directory<a name="section1115535018713"></a>
- **Possible Causes**
Crypto is not installed in Python3.
- **Symptom**
- **Solution**
1. Run the following command to query the Python version:
```
python3 --version
```
2. Ensure that Python 3.7 or later is installed, and then run the following command to install pycryptodome:
```
sudo pip3 install pycryptodome
```
The build fails, and the following information is displayed:
riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory.
### "xx.sh : xx unexpected operator" Displayed During the Build Process
- **Cause**
- **Symptom**
The compilation fails, and **xx.sh [: xx unexpected operator** is displayed.
Permission is required to access files in the **riscv** compiler directory.
- **Possible Causes**
The compilation environment is shell instead of bash.
- **Solution**
- **Solution**
```
sudo rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh
```
Run the following command to query the directory where **gcc\_riscv32** is located:
```
which riscv32-unknown-elf-gcc
```
### "Could not find a version that satisfies the requirement six&gt;=1.9.0" Displayed During the Build Process
Run the **chmod** command to change the directory permission to **755**.
- **Symptom**
The following error occurs during compilation and building:
```
Could not find a version that satisfies the requirement six>=1.9.0
```
### No Crypto<a name="section17982573813"></a>
- **Possible Causes**
**six** is not installed.
- **Symptom**
- **Solution**
Solution 1: Run the **pip3 install six** command to install **six** online.
The build fails, and "No module named 'Crypto'" is displayed.
Method 2: Offline installation
- **Cause**
Download the installation package from [PyPI](https://pypi.org/project/six/#files).
Crypto is not installed in Python 3.
![en-us_image_0000001251276115](figures/en-us_image_0000001251276115.png)
- **Solution**
1. Run the following command to query the Python version:
Save the source code to the Linux server and run the **pip3 install six-1.14.0-py2.py3-none-any.whl** command to install **six**.
```
python3 --version
```
After the preceding installation is complete, rebuild an environment.
2. Ensure that Python 3.7 or later is installed, and then run the following command to install pycryptodome:
```
sudo pip3 install pycryptodome
```
### "cannot find -lgcc" Displayed During the Build Process
- **Symptom**
The following error occurs during the build process:
```
riscv32-unknown-elf-ld: cannot find -lgcc
```
### Unexpected Operator<a name="section53663205819"></a>
- **Possible Causes**
The PATH is incorrectly written by **gcc_riscv32**. There is an extra slash (/).
- **Symptom**
```
~/gcc_riscv32/bin/:/data/toolchain/
```
The build fails, and "xx.sh \[: xx unexpected operator" is displayed.
- **Solution**
Modify the PATH by deleting the slash (/).
- **Cause**
```
~/gcc_riscv32/bin:/data/toolchain/
```
The build environment is shell, not bash.
- **Solution**
### The Message Indicating Python Cannot Be Found Is Displayed During the Build Process
```
sudo rm -rf /bin/sh
sudo ln -s /bin/bash /bin/sh
```
- **Symptom**
The following error occurs during the build process:
```
-bash: /usr/bin/python: No such file or directory
```
### What should I do when the message **Could not find a version that satisfies the requirement six\>=1.9.0** is displayed during compilation and building?<a name="section1917790845"></a>
- **Possible Cause 1**
Python is not installed.
- **Symptom**
- **Solution**
Run the following command to install Python. The following uses Python 3.8 as an example.
The following error occurs during compilation and building:
```
sudo apt-get install python3.8
```
```
Could not find a version that satisfies the requirement six>=1.9.0
```
- **Possible Cause 2**
The soft link that points to the Python does not exist in the **usr/bin** directory.
![en-us_image_0000001243200677](figures/en-us_image_0000001243200677.png)
- **Possible Causes**
- **Solution**
Run the following commands to add a soft link:
**six** is not installed.
```
# cd /usr/bin/
# which python3
# ln -s /usr/local/bin/python3 python
# python --version
```
Example:
- **Solutions**
![en-us_image_0000001243320787](figures/en-us_image_0000001243320787.png)
Solution 1: Run the **pip3 install six** command to install **six** online.
Solution 2: Install **six** offline.
### The Message Indicating Python 3 Cannot Be Found Is Displayed During the Build Process
- Download the installation package from [https://pypi.org/project/six/\#files](https://pypi.org/project/six/#files).
- **Symptom**
![](figures/download-six.png)
![en-us_image_0000001251276255](figures/en-us_image_0000001251276255.png)
- Save the source code to the Linux server and run the **pip3 install six-1.14.0-py2.py3-none-any.whl** command to install **six**.
- Rebuild an environment.
### What should I do when the message **cannot find -lgcc** is displayed during compilation and building?<a name="section141771701647"></a>
- **Symptom**
The following error occurs during compilation and building:
```
riscv32-unknown-elf-ld: cannot find -lgcc
```
- **Possible Causes**
The PATH is incorrectly written by **gcc\_riscv32**. There is an extra slash \(/\).
```
~/gcc_riscv32/bin/:/data/toolchain/
```
- **Solutions**
Modify the PATH by deleting the slash \(/\).
```
~/gcc_riscv32/bin:/data/toolchain/
```
### What should I do when the message indicating Python cannot be found is displayed during compilation and building?<a name="section51781202415"></a>
- **Symptom**
The following error occurs during compilation and building:
```
-bash: /usr/bin/python: No such file or directory
```
- **Possible Cause 1:** Python is not installed.
- **Solutions**
[Install Python](../quick-start/quickstart-lite-env-setup-linux.md).
- **Possible Cause 2:** The soft link that points to the Python does not exist in the **usr/bin** directory.
![](figures/reason-no-python-soft-link.png)
- **Solutions**
Run the following commands to add a soft link:
```
# cd /usr/bin/
# which python3
# ln -s /usr/local/bin/python3 python
# python --version
```
Example:
![](figures/solution-add-soft-link.png)
### What should I do when the message indicating Python 3 cannot be found is displayed during compilation and building?<a name="section1917950148"></a>
- **Symptom**
![](figures/11.png)
- **Possible Causes**
Python 3 is not installed.
- **Solutions**
[Install Python](../quick-start/quickstart-lite-env-setup-linux.md).
- **Possible Causes**
Python 3 is not installed.
- **Solution**
Run the following command to install Python 3:
```
sudo apt-get install python3.8
```
# Burning<a name="EN-US_TOPIC_0000001170009518"></a>
# Burning
## Mini and Small Systems<a name="section278314413530"></a>
## Mini and Small Systems
### "Error: Opening COMxx: Access denied" Is Displayed After a Serial Port Is Selected for Burning<a name="section18988185615914"></a>
- **Symptom**
### "Error: Opening COMxx: Access denied" Displayed When I Start Burning
**Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port.
- **Symptom**
**Error: Opening COMxx: Access denied** is displayed after clicking **Burn** and selecting a serial port.
![](figures/failed-to-open-the-serial-port.png)
**Figure 1** Failed to open the serial port
![en-us_image_0000001243481961](figures/en-us_image_0000001243481961.png)
- **Possible Causes**
- **Possible Causes**
The serial port is in use.
The serial port has been used.
- **Solution**
- Solution
1. Search for the terminal using serial-xx from the drop-down list in the **TERMINAL** panel.
The serial port may be in use. Perform the following steps to troubleshoot:
**Figure 2** Checking whether the serial port is in use
![en-us_image_0000001243481989](figures/en-us_image_0000001243481989.png)
1. Search for the serial port from the drop-down list in the **TERMINAL** panel.
2. Click the dustbin icon as shown below to disable the terminal using the serial port.
**Figure 3** Disabling the terminal using the serial port
![](figures/terminal-list.png)
![en-us_image_0000001243082093](figures/en-us_image_0000001243082093.png)
2. Click the dustbin for the terminal using the serial port to disable the terminal.
3. Click **Burn**, select the serial port, and start burning images again.
**Figure 4** Restarting the burning task
![en-us_image_0000001198322224](figures/en-us_image_0000001198322224.png)
### What should I do when the image failed to be burnt?<a name="section1370982513317"></a>
- **Symptom**
### The Image Failed To Be Burnt
The burning status is not displayed after clicking **Burn** and selecting a serial port.
- **Symptom**
The burning status is not displayed after clicking **Burn** and selecting a serial port.
- **Possible Causes**
- **Possible Causes**
The IDE is not restarted after the DevEco plug-in is installed.
The IDE is not restarted after the DevEco plug-in is installed.
- **Solution**
Restart the IDE.
- **Solutions**
Restart the IDE.
### 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**.
### What should I do when no command output is displayed?<a name="section183421944953"></a>
- **Possible Cause 1**
The serial port is connected incorrectly.
- **Symptom**
- **Solution**
Change the serial port number.
The serial port shows that the connection has been established. After the board is restarted, nothing is displayed when you press **Enter**.
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 in the **Running an Image** section to change the serial port number.
- **Possible Cause 1**
- **Possible Cause 2**
The U-Boot of the board is damaged.
The serial port is connected incorrectly.
- **Solution**
Burn the U-Boot.
- **Solutions**
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:
Change the serial port number.
1. Obtain the U-Boot file.
> ![icon-notice.gif](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**
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 in the **Running an Image** section to change the serial port number.
2. Burn the U-Boot file by following the procedures for burning a U-Boot file over USB.
Select the U-Boot files of the corresponding development board for burning by referring to [Burning to Hi3516D V300](../quick-start/quickstart-ide-lite-steps-hi3516-burn.md).
3. Log in to the serial port after the burning is complete.
- **Possible Cause 2**
**Figure 5** Information displayed through the serial port after the U-Boot file is burnt
The U-Boot of the board is damaged.
![en-us_image_0000001243484907](figures/en-us_image_0000001243484907.png)
- **Solutions**
Burn the U-Boot.
### Windows-based PC Failed to Be Connected to the Board
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:
- **Symptom**
The file image cannot be obtained after clicking **Burn** and selecting a serial port.
**Figure 6** Failed to obtain the file image due to network disconnection
![en-us_image_0000001198322428](figures/en-us_image_0000001198322428.png)
1. Obtain the U-Boot file.
- **Possible Causes**
The board is disconnected from the Windows-based PC.
>![](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**
Windows Firewall does not allow Visual Studio Code to access the network.
2. Burn the U-Boot file by following the procedures for burning a U-Boot file over USB.
- **Solution**
Select the U-Boot files of corresponding development boards for burning by referring to [Programming Flash Memory on the Hi3516](../quick-start/quickstart-lite-steps-hi3516-running.md)/[Programming Flash Memory on the Hi3518](../quick-start/quickstart-lite-steps-hi3518-running.md)
1. Check whether the network cable is properly connected.
3. Log in to the serial port after the burning is complete.
2. Click **Windows Firewall**.
**Figure 7** Setting the firewall
![en-us_image_0000001198162584](figures/en-us_image_0000001198162584.png)
**Figure 1** Serial port displayed after the U-Boot is burnt<a name="en-us_topic_0000001128470856_en-us_topic_0000001053466255_fig155914681910"></a>
![](figures/serial-port-displayed-after-the-u-boot-is-burnt.png "serial-port-displayed-after-the-u-boot-is-burnt")
### What should I do when Windows-based PC failed to be connected to the board?<a name="section1215410450215"></a>
- **Symptom**
The file image cannot be obtained after clicking **Burn** and selecting a serial port.
**Figure 2** Failed to obtain the image file due to unavailable connection<a name="en-us_topic_0000001128470856_fig135261439195819"></a>
![](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**.
![](figures/hi3516-network-and-firewall-setting.png)
3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**.
![](figures/hi3516-firewall-and-network-protection.png)
4. Select the Visual Studio Code application.
![](figures/hi3516-selecting-the-visual-studio-code-application.png)
5. Select the **Private** and **Public** network access rights for the Visual Studio Code application.
![](figures/hi3516-allowing-the-visual-studio-code-application-to-access-the-network.png)
3. Click **Firewall & network protection**, and on the displayed page, click **Allow an app through the firewall**.
**Figure 8** Firewall & network protection
![en-us_image_0000001198323146](figures/en-us_image_0000001198323146.png)
4. Select Visual Studio Code.
**Figure 9** Selecting Visual Studio Code
![en-us_image_0000001198003232](figures/en-us_image_0000001198003232.png)
5. Select the **Private** and **Public** network access rights for Visual Studio Code.
**Figure 10** Allowing Visual Studio Code to access the network
![en-us_image_0000001243084579](figures/en-us_image_0000001243084579.png)
# Environment Setup
## Mini and Small Systems
### What should I do if garbled characters and segmentation faults occur during hb installation?
- **Symptom**
Garbled characters and segmentation faults occur during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
pip is of an early version.
- **Solution**
Upgrade pip.
```
python3 -m pip install -U pip
```
### What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?
- **Symptom**
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
The **distutils** module is unavailable.
- **Solution**
Install **distutils**.
```
sudo apt-get install python3.8-distutils
```
### What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?
- **Symptom**
The message "module 'platform' has no attribute 'linux_distribution'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
There is a compatibility issue of python3-pip.
- **Solution**
Reinstall pip.
```
sudo apt remove python3-pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
```
### 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.
- **Solution**
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 "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details
```
- **Possible Causes**
**gcc** is not installed.
- **Solution**
1. Run the **apt-get install gcc** command to install **gcc** online.
2. After the installation, reinstall Python 3.
### What should I do if the message "-bash: make: command not found is displayed" during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
-bash: make: command not found
```
- **Possible Causes**
**Make** is not installed.
- **Solution**
1. Run the **apt-get install make** command to install Make online.
2. After the installation, reinstall Python 3.
### What should I do if the message **zlib not available** is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
zipimport.ZipImportError: can't decompress data; zlib not available
```
- **Possible Causes**
**zlib** is not installed.
- **Solution**
Solution 1: Run the **apt-get install zlib** command to install **zlib** online.
Solution 2: If the software source does not contain **zlib**, download the source code from <xref href="http://www.zlib.net/" scope="external" class="- topic/xref " id="xref17252104445818">http://www.zlib.net/</xref>.
![en-us_image_0000001198001086](figures/en-us_image_0000001198001086.png)
Then run the following commands to install **zlib** offline:
```
# tar xvf zlib-1.2.11.tar.gz
# cd zlib-1.2.11
# ./configure
# make && make install
```
After the installation, reinstall Python 3.
### What should I do if the message "No module named 'Crypto'" is displayed during the build process?
- **Symptom**
The following error occurs during compilation and building:
```
ModuleNotFoundError: No module named 'Crypto'
```
- **Possible Causes**
**Crypto** is not installed.
- **Solution**
Solution 1: Run the **pip3 install Crypto** command to install **Crypto** online.
Method 2: Offline installation
Download the source code from [PyPI](https://pypi.org/project/pycrypto/#files).
![en-us_image_0000001251196005](figures/en-us_image_0000001251196005.png)
Save the source package to the Linux server, decompress the package, and run the **python3 setup.py install** command to install Crypto.
After the preceding installation is complete, rebuild an environment.
### What should I do when an error with **lsb_release** occurs during **kconfiglib** installation?
- **Symptom**
The following error occurs during **kconfiglib** installation:
```
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
```
- **Possible Causes**
The Python version matched with the **lsb_release** module is different from the current Python version.
- **Solution**
Run the **find / -name lsb_release** command, for example, **sudo rm -rf /usr/bin/lsb_release** to locate and delete **lsb_release**.
### What should I do if the message "ImportError: No module named apt_pkg" is displayed during the execution of an unidentifiable command?
- **Symptom**
The message "ImportError: No module named apt_pkg" is displayed when an unidentifiable command is executed on the Linux server.
- **Possible Causes**
There is a compatibility issue of python3-apt.
- **Solution**
Reinstall python3-apt.
```
sudo apt-get remove python3-apt
sudo apt-get install python3-apt
```
# Environment Setup<a name="EN-US_TOPIC_0000001215650793"></a>
## Mini and Small Systems<a name="section1742119306399"></a>
### What should I do if garbled characters and segmentation faults occur during hb installation?<a name="section36351051193919"></a>
- **Symptom**
Garbled characters and segmentation faults occur during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
pip is of an early version.
- **Solutions**
Upgrade pip.
```
python3 -m pip install -U pip
```
### What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?<a name="section48221013144011"></a>
- **Symptom**
The message "cannot import 'sysconfig' from 'distutils'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
The **distutils** module is unavailable.
- **Solutions**
Install **distutils**.
```
sudo apt-get install python3.8-distutils
```
### What should I do if the message "module 'platform' has no attribute 'linux\_distribution'" is displayed during hb installation?<a name="section10307193044111"></a>
- **Symptom**
The message "module 'platform' has no attribute 'linux\_distribution'" is displayed during the execution of the **python3 -m pip install --user ohos-build** command.
- **Possible Causes**
There is a compatibility issue of python3-pip.
- **Solutions**
Reinstall pip.
```
sudo apt remove python3-pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
```
### What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?<a name="section8692735427"></a>
- **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 when the message **configure: error: no acceptable C compiler found in $PATH** is displayed during Python 3 installation?<a name="section870082884217"></a>
- **Symptom**
The following error occurs during Python 3 installation:
```
configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details
```
- **Possible Causes**
**GCC** is not installed.
- **Solutions**
1. Run the **apt-get install gcc** command to install **GCC** online.
2. After the installation, reinstall Python 3.
### What should I do when the message **-bash: make: command not found** is displayed during Python 3 installation?<a name="section198707170455"></a>
- **Symptom**
The following error occurs during Python 3 installation:
```
-bash: make: command not found
```
- **Possible Causes**
**Make** is not installed.
- **Solutions**
1. Run the **apt-get install make** command to install **Make** online.
2. After the installation, reinstall Python 3.
### What should I do when the message **zlib not available** is displayed during Python 3 installation?<a name="section85401445204518"></a>
- **Symptom**
The following error occurs during Python 3 installation:
```
zipimport.ZipImportError: can't decompress data; zlib not available
```
- **Possible Causes**
**zlib** is not installed.
- **Solutions**
Solution 1: Run the **apt-get install zlib** command to install **zlib** online.
Solution 2: If the software source does not contain **zlib**, download the source code from https://www.zlib.net/.
![](figures/download-zlib.png)
Then run the following commands to install **zlib** offline:
```
# tar xvf zlib-1.2.11.tar.gz
# cd zlib-1.2.11
# ./configure
# make && make install
```
After the installation, reinstall Python 3.
### What should I do when the message **No module named '\_ctypes'** is displayed during Python 3 installation?<a name="section12202694460"></a>
- **Symptom**
The following error occurs during Python 3 installation:
```
ModuleNotFoundError: No module named '_ctypes'
```
- **Possible Causes**
**libffi** and **libffi-devel** are not installed.
- **Solutions**
1. Run the **apt-get install libffi\* -y** command to install **libffi** and **libffi-devel** online.
2. After the installation, reinstall Python 3.
### What should I do when an error with **lsb\_release** occurs during **kconfiglib** installation?<a name="section5803174135115"></a>
- **Symptom**
The following error occurs during **kconfiglib** installation:
```
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
```
- **Possible Causes**
The Python version matched with the **lsb\_release** module is different from the current Python version.
- **Solutions**
Run the **find / -name lsb\_release** command, for example, **sudo rm -rf /usr/bin/lsb\_release** to locate and delete **lsb\_release**.
### What should I do if the message "ImportError: No module named apt\_pkg" is displayed during the execution of an unidentifiable command?<a name="section510820516515"></a>
- **Symptom**
The message "ImportError: No module named apt\_pkg" is displayed when an unidentifiable command is executed on the Linux server.
- **Possible Causes**
There is a compatibility issue of python3-apt.
- **Solutions**
Reinstall python3-apt.
```
sudo apt-get remove python3-apt
sudo apt-get install python3-apt
```
# Startup
## System Startup Interrupted Due to "parse failed!" Error
**Symptom**
During system startup, the error message "[Init] InitReadCfg, parse failed! please check file /etc/init.cfg format." is printed, and the startup is interrupted, as shown in the following figure.
**Figure 1** Error information
![en-us_image_0000001200053087](figures/en-us_image_0000001200053087.png)
**Possible Causes**
During modification of the **init.cfg** file, required commas (,) or parentheses are missing or unnecessary ones are added. As a result, the file's JSON format becomes invalid.
**Solution**
Check the **init.cfg** file and ensure that its format meets the JSON specifications.
## System Restarted Repeatedly
**Symptom**
After the image burning is complete, the system restarts over and over again.
**Possible Causes**
Each service started by the init process has the **importance** attribute, as described in Table 3 in [init Module](../subsystems/subsys-boot-init.md).
- If the attribute value is **0**, the init process does not need to restart the development board when the current service process exits.
- If the attribute value is **1**, the init process needs to restart the development board when the current service process exits.
During the startup of a service whose **importance** is **1**, if the service exits due to a process crash or an error, the init process automatically restarts the development board.
**Solution**
1. View logs to identify the service that encounters a process crash or exits due to an error, rectify the issue, and then burn the image again.
2. Alternatively, change the value of **importance** to **0** for the service that exits due to a process crash or an error, and then burn the image again. In this way, the development board will not be restarted even if the service exits.
## Failed to Call the SetParameter or GetParameter API with Correct Parameter Values
**Symptom**
Calling the **SetParameter** or **GetParameter** API fails even if correct values are passed to all input parameters.
**Possible Causes**
Permission verification has been enabled for the **SetParameter** and **GetParameter** APIs. If the UID of the caller is greater than 1000, that is, the caller does not have the permission to call these APIs, API calls will fail even if the parameters are correct.
**Solution**
No action is required.
# Kernel<a name="EN-US_TOPIC_0000001169850498"></a>
# Kernel
## Basic Kernel<a name="section263912372168"></a>
### What are the differences between APIs provided by LiteOS-A and LiteOS-M?<a name="section447571122918"></a>
## Basic Kernel
Basic kernel APIs are different. LiteOS-A provides the standard Portable Operating System Interface \(POSIX\), and LiteOS-M provides standard POSIX and Common Microcontroller Software Interface Standard \(CMSIS\) interfaces. To support cross-platform functions, standard interfaces such as POSIX are recommended for third-party adaptation.
### How do I analyze thread stack overflow?<a name="section8623141711293"></a>
### What are the differences between APIs provided by LiteOS-A and LiteOS-M?
Basic kernel APIs are different. LiteOS-A provides the standard Portable Operating System Interface (POSIX), and LiteOS-M provides standard POSIX and Common Microcontroller Software Interface Standard (CMSIS) interfaces. To support cross-platform functions, standard interfaces such as POSIX are recommended for third-party adaptation.
### How do I analyze thread stack overflow?
**Symptom**
The system is abnormal, and the message "CURRENT task _ThreadName_ stack overflow!" is displayed.
The system is abnormal, and the message "CURRENT task *ThreadName* stack overflow!" is displayed.
**Solution**
1. When creating the thread, double the thread stack size. If the problem does not recur after multiple attempts, the task stack size is insufficient and needs to be increased.
2. If the problem persists after the thread stack size is increased, check whether an ultra-large array is defined in the thread or whether recursive invoking exists in the process.
3. If the preceding causes are excluded, check whether memory corruption occurs.
1. When creating the thread, double the thread stack size. If the problem does not recur after multiple attempts, the task stack size is insufficient and needs to be increased.
2. If the problem persists after the thread stack size is increased, check whether an ultra-large array is defined in the thread or whether recursive invoking exists in the process.
3. If the preceding causes are excluded, check whether memory corruption occurs.
## File System<a name="section098519592162"></a>
### What should I do when the Hi3516 board fails to open the same file in write mode \(LiteOS-A\)?<a name="section517972255311"></a>
## File System
### What should I do when the Hi3516 board fails to open the same file in write mode (LiteOS-A)?
When a file is already open, it is not allowed to open the file in write mode again, because the Hi3516 board uses the FAT file system.
### What hardware platforms are supported by the LiteOS kernel?<a name="section868413518533"></a>
LiteOS-A supports the Hi3516 and Hi3518 development boards. LiteOS-M supports the Hi3861 development board, STM32F103, STM32F429IGTb, and Nucleo\_f767zi. For details, see the **README.md** file in the **kernel/liteos\_m** directory.
### What hardware platforms are supported by the LiteOS kernel?
LiteOS-A supports the Hi3516 and Hi3518 development boards. LiteOS-M supports the Hi3861 development board, STM32F103, STM32F429IGTb, and Nucleo_f767zi. For details, see the **README.md** file in the **kernel/liteos_m** directory.
### What chip architectures are supported by the LiteOS kernel?<a name="section1131661465417"></a>
### What chip architectures are supported by the LiteOS kernel?
LiteOS-M supports RISC-V, Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M33, and Arm 9, and will support c-sky and Xtensa. LiteOS-A supports ARMv7-A and will support ARMv8-A. Any new update will be released in the OpenHarmony community.
## Third-party Components<a name="section971818231178"></a>
### What third-party components are supported by OpenHarmony?<a name="section74138185411"></a>
## Third-party Components
Open-source components \(such as mbedTLS and LwIP\) and third-party libraries have been provided and can be directly used. In addition, standard POSIX is provided for adaptation.
### What should I do if the key length verification fails when OpenSSL is used on OpenHarmony?<a name="section10564614135516"></a>
### Which third-party components are supported?
Check whether the architecture type \(such as ARM and x86\) and the number of system bits \(32-bit and 64-bit\) are correctly selected in OpenSSL compilation options.
Open-source components (such as mbedTLS and lwIP) and third-party libraries have been provided and can be directly used. In addition, standard POSIX is provided for adaptation.
### Does setsockopt support SO\_RCVBUF and SO\_SNDBUF?<a name="section2093373215556"></a>
No. It does not support SO\_RCVBUF or SO\_SNDBUF.
### What should I do if the key length verification fails when OpenSSL is used?
## Compilation and Linking<a name="section10955302179"></a>
Check whether the architecture type (such as ARM and x86) and the number of system bits (32-bit and 64-bit) are correctly selected in OpenSSL compilation options.
### How do I run an application developed by ARM Linux on LiteOS-A?<a name="section1164175713557"></a>
The application must be recompiled using the cross-compiler provided in OpenHarmony before it can run.
### Does setsockopt support SO_RCVBUF and SO_SNDBUF?
### What system is used for OpenHarmony compilation? What compiler is used?<a name="section132287223567"></a>
No. **setsockopt** does not support **SO_RCVBUF** or **SO_SNDBUF**.
## Compilation and Linking
### How do I run an application developed by ARM Linux on LiteOS-A?
The application must be recompiled using the cross-compiler provided before it can run.
### What operating system is used for compilation? What compiler is used?
LiteOS-A is compiled in the Linux environment by using the LLVM compiler. LiteOS-M can be compiled in the Linux or Windows environment by using compilers such as IAR, Keil, and GCC.
### For a third-party component that is independently compiled into a static library and used on LiteOS-M, what should I do when the component's global variable value is incorrect or the system is suspended after the component's function is called?<a name="section15189154225619"></a>
Check whether address-irrelevant compilation options, such as **-fPIE**, **-fpie**, **-fPIC**, and **-fpic**, exist in the third-party component compilation options. If yes, delete them and recompile the third-party component into a static library.
### For a third-party component that is independently compiled into a static library and used on LiteOS-M, what should I do when the component's global variable value is incorrect or the system is suspended after the component's function is called?
Check whether address-irrelevant compilation options, such as **-fPIE**, **-fpie**, **-fPIC**, and **-fpic**, exist in the third-party component compilation options. If yes, delete them and recompile the third-party component into a static library.
### What should I do if the message "use VFP register arguments, xxx.o does not" is displayed when LiteOS-A generates a target executable file?<a name="section193571012578"></a>
### What should I do if the message "use VFP register arguments, xxx.o does not" is displayed when LiteOS-A generates a target executable file?
Check whether the **-mfloat-abi=xxx**, **-mcpu=xxx**, and **-mfpu=xxx** compilation options are added during the compilation of **xxx.o**. If not, add them.
Check whether the **-mfloat-abi=xxx**, **-mcpu=xxx**, and **-mfpu=xxx** compilation options are added during the compilation of **xxx.o**. If not, add them.
### What should I do when calling clock\_gettime obtains an incorrect time?<a name="section8973152015717"></a>
In **struct timespec**, **tv\_sec** is **time\_t**, which is of the long long type, and the print control character is **%lld**. Check whether the print control character in use is correct.
### What should I do when calling clock_gettime obtains an incorrect time?
In **struct timespec**, **tv_sec** is **time_t**, which is of the long long type, and the print control character is **%lld**. Check whether the print control character in use is correct.
# Overview of FAQs<a name="EN-US_TOPIC_0000001169691604"></a>
# Overview of FAQs
FAQs are used to help developers solve problems frequently encountered during development. They cover a wide range of topics.
## Environment Setup<a name="section93289248249"></a>
### Mini and Small Systems<a name="section197234983111"></a>
## Environment setup
### Mini and Small Systems
- [What should I do if garbled characters and segmentation faults occur during hb installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "module 'platform' has no attribute 'linux_distribution'" is displayed during hb installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "-bash: make: command not found" is displayed during Python 3 installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "zlib not available" is displayed during Python 3 installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "No module named 'Crypto'" is displayed during the build process?](../faqs/faqs-environment-building.md)
- [What should I do when an error with lsb_release occurs during kconfiglib installation?](../faqs/faqs-environment-building.md)
- [What should I do if the message "ImportError: No module named apt_pkg" is displayed during the execution of an unidentifiable command?](../faqs/faqs-environment-building.md)
## Compilation and Building
### Mini and Small Systems
- ["usr/sbin/ninja: invalid option -- w" Displayed During the Build Process](../faqs/faqs-building.md)
- ["/usr/bin/ld: cannot find -lncurses" Displayed During the Build Process](../faqs/faqs-building.md)
- ["line 77: mcopy: command not found" Displayed During the Build Process](../faqs/faqs-building.md)
- ["riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory" Displayed During the Build Process](../faqs/faqs-building.md)
- ["No module named 'Crypto'" Displayed During the Build Process](../faqs/faqs-building.md)
- ["xx.sh : xx unexpected operator" Displayed During the Build Process](../faqs/faqs-building.md)
- ["Could not find a version that satisfies the requirement six>=1.9.0" Displayed During the Build Process](../faqs/faqs-building.md)
- ["cannot find -lgcc" Displayed During the Build Process](../faqs/faqs-building.md)
- [The Message Indicating Python Cannot Be Found Is Displayed During the Build Process](../faqs/faqs-building.md)
- [The Message Indicating Python 3 Cannot Be Found Is Displayed During the Build Process](../faqs/faqs-building.md)
## Burning
### Mini and Small Systems
- ["Error: Opening COMxx: Access denied" Displayed When I Start Burning](../faqs/faqs-burning.md)
- [The Image Failed To Be Burnt](../faqs/faqs-burning.md)
- [No Command Output Is Displayed](../faqs/faqs-burning.md)
- [Windows-based PC Failed to Be Connected to the Board](../faqs/faqs-burning.md)
## Kernel
### Basic Kernel
- [What are the differences between APIs provided by LiteOS-A and LiteOS-M?](../faqs/faqs-kernel.md)
- [How do I analyze thread stack overflow?](../faqs/faqs-kernel.md)
### File System
- [What should I do when the Hi3516 board fails to open the same file in write mode (LiteOS-A)?](../faqs/faqs-kernel.md)
### Chip Adaptation
- [What hardware platforms are supported by the LiteOS kernel?](../faqs/faqs-kernel.md)
- [What chip architectures are supported by the LiteOS kernel?](../faqs/faqs-kernel.md)
### Third-party Components
- [Which third-party components are supported?](../faqs/faqs-kernel.md)
- [What should I do if the key length verification fails when OpenSSL is used?](../faqs/faqs-kernel.md)
- [Does setsockopt support SO_RCVBUF and SO_SNDBUF?](../faqs/faqs-kernel.md)
### Compilation and Linking
- [How do I run an application developed by ARM Linux on LiteOS-A?](../faqs/faqs-kernel.md)
- [What operating system is used for compilation? What compiler is used?](../faqs/faqs-kernel.md)
- [For a third-party component that is independently compiled into a static library and used on LiteOS-M, what should I do when the component's global variable value is incorrect or the system is suspended after the component's function is called?](../faqs/faqs-kernel.md)
- [What should I do if the message "use VFP register arguments, xxx.o does not" is displayed when LiteOS-A generates a target executable file?](../faqs/faqs-kernel.md)
- [What should I do when calling clock_gettime obtains an incorrect time?](../faqs/faqs-kernel.md)
## Porting
- [How Do I Mount the Heap Memory to the Kernel?](../faqs/faqs-transplant.md)
- [What should I do if garbled characters and segmentation faults occur during hb installation?](faqs-environment-setup.md#section36351051193919)
- [What should I do if the message "cannot import 'sysconfig' from 'distutils'" is displayed during hb installation?](faqs-environment-setup.md#section48221013144011)
- [What should I do if the message "module 'platform' has no attribute 'linux\_distribution'" is displayed during hb installation?](faqs-environment-setup.md#section10307193044111)
- [What should I do if the message "Could not find a version that satisfies the requirement ohos-build" is displayed during hb installation?](faqs-environment-setup.md#section8692735427)
- [What should I do when the message configure: error: no acceptable C compiler found in $PATH is displayed during Python 3 installation?](faqs-environment-setup.md#section870082884217)
- [What should I do when the message -bash: make: command not found is displayed during Python 3 installation?](faqs-environment-setup.md#section198707170455)
- [What should I do when the message zlib not available is displayed during Python 3 installation?](faqs-environment-setup.md#section85401445204518)
- [What should I do when the message No module named '\_ctypes' is displayed during Python 3 installation?](faqs-environment-setup.md#section12202694460)
- [What should I do when an error with lsb\_release occurs during kconfiglib installation?](faqs-environment-setup.md#section5803174135115)
- [What should I do if the message "ImportError: No module named apt\_pkg" is displayed during the execution of an unidentifiable command?](faqs-environment-setup.md#section510820516515)
## Startup and Recovery
## Compilation and Building<a name="section18826114693810"></a>
- [System Startup Interrupted Due to "parse failed!" Error](../faqs/faqs-init.md)
### Mini and Small Systems<a name="section693410399"></a>
- [System Restarted Repeatedly](../faqs/faqs-init.md)
- [Invalid -- w Option](faqs-building.md#section67961431372)
- [Library ncurses Not Found](faqs-building.md#section199631617371)
- [mcopy not Found](faqs-building.md#section937435175)
- [No riscv File or Directory](faqs-building.md#section1115535018713)
- [No Crypto](faqs-building.md#section17982573813)
- [Unexpected Operator](faqs-building.md#section53663205819)
- [What should I do when the message Could not find a version that satisfies the requirement six\>=1.9.0 is displayed during compilation and building?](faqs-building.md#section1917790845)
- [What should I do when the message cannot find -lgcc is displayed during compilation and building?](faqs-building.md#section141771701647)
- [What should I do when the message indicating Python cannot be found is displayed during compilation and building?](faqs-building.md#section51781202415)
- [What should I do when the message indicating Python 3 cannot be found is displayed during compilation and building?](faqs-building.md#section1917950148)
- [Failed to Call the SetParameter or GetParameter API with Correct Parameter Values](../faqs/faqs-init.md)
## Burning<a name="section6556741113712"></a>
### Mini and Small Systems<a name="section1029933713812"></a>
## System Applications
- ["Error: Opening COMxx: Access denied" Is Displayed After a Serial Port Is Selected for Burning](faqs-burning.md#section18988185615914)
- [What should I do when the image failed to be burnt?](faqs-burning.md#section1370982513317)
- [What should I do when no command output is displayed?](faqs-burning.md#section183421944953)
- [What should I do when Windows-based PC failed to be connected to the board?](faqs-burning.md#section1215410450215)
### Utils
## Kernel<a name="section13741125564211"></a>
- [Failure in running the KV store on the LiteOS-A kernel (Hi3516 or Hi3518) due to incorrect path setting for the KV store](../faqs/faqs-system-using.md)
### Basic Kernel<a name="section1723365191114"></a>
- [What are the differences between APIs provided by LiteOS-A and LiteOS-M?](faqs-kernel.md#section447571122918)
- [How do I analyze thread stack overflow?](faqs-kernel.md#section8623141711293)
### Visual Applications
### File System<a name="section14523145918136"></a>
- [Is there a global variable that can be accessed by all pages?](../faqs/faqs-system-using.md)
- [What should I do when the Hi3516 board fails to open the same file in write mode \(LiteOS-A\)?](faqs-kernel.md#section517972255311)
- [How do I obtain DOM elements?](../faqs/faqs-system-using.md)
### Chip Adaptation<a name="section141541939159"></a>
- [How do I pass values between pages?](../faqs/faqs-system-using.md)
- [What hardware platforms are supported by the LiteOS kernel?](faqs-kernel.md#section868413518533)
- [What chip architectures are supported by the LiteOS kernel?](faqs-kernel.md#section1131661465417)
- [How do I scroll a list to an item?](../faqs/faqs-system-using.md)
### Third-party Components<a name="section4988163321816"></a>
- [Does the <text> component support multiple lines?](../faqs/faqs-system-using.md)
- [What third-party components are supported by OpenHarmony?](faqs-kernel.md#section74138185411)
- [What should I do if the key length verification fails when OpenSSL is used on OpenHarmony?](faqs-kernel.md#section10564614135516)
- [Does setsockopt support SO\_RCVBUF and SO\_SNDBUF?](faqs-kernel.md#section2093373215556)
- [Why is a component not displayed?](../faqs/faqs-system-using.md)
### Compilation and Linking<a name="section080219574225"></a>
- [How do I implement scrolling on a page?](../faqs/faqs-system-using.md)
- [How do I run an application developed by ARM Linux on LiteOS-A?](faqs-kernel.md#section1164175713557)
- [What system is used for OpenHarmony compilation? What compiler is used?](faqs-kernel.md#section132287223567)
- [For a third-party component that is independently compiled into a static library and used on LiteOS-M, what should I do when the component's global variable value is incorrect or the system is suspended after the component's function is called?](faqs-kernel.md#section15189154225619)
- [What should I do if the message "use VFP register arguments, xxx.o does not" is displayed when LiteOS-A generates a target executable file?](faqs-kernel.md#section193571012578)
- [What should I do when calling clock\_gettime obtains an incorrect time?](faqs-kernel.md#section8973152015717)
- [Why do not the left and top attributes take effect?](../faqs/faqs-system-using.md)
## Porting<a name="section129331824154313"></a>
- [Why does not dynamic binding take effect?](../faqs/faqs-system-using.md)
- [How Do I Mount the Heap Memory to the Kernel?](faqs-porting.md#section21471536184914)
- [How do I implement relative and absolute positioning?](../faqs/faqs-system-using.md)
## Startup and Recovery<a name="section83501764443"></a>
- [How do I display or hide a component?](../faqs/faqs-system-using.md)
- [System startup interrupted due to "parse failed!" error](faqs-startup.md#section835662214302)
- [System automatically restarted again and again](faqs-startup.md#section3857921143117)
- [Failed to call the SetParameter or GetParameter API with correct parameter values](faqs-startup.md#section548818116328)
- [What are the precautions for using the Margin attribute?](../faqs/faqs-system-using.md)
## System Services<a name="section19567132114455"></a>
- [What are the precautions for event subscription?](../faqs/faqs-system-using.md)
### Utils<a name="section3214181711465"></a>
- [What are the precautions for using dynamic binding?](../faqs/faqs-system-using.md)
- [1. Failure in running the KV store on the LiteOS-A kernel \(Hi3516 or Hi3518\) due to incorrect path setting for the KV store](faqs-system-applications.md#section16520347131511)
- [How does the loop attribute take effect for <swiper>?](../faqs/faqs-system-using.md)
### Visual Applications<a name="section295651815466"></a>
- [What are the precautions for using an array?](../faqs/faqs-system-using.md)
- [Is there a global variable that can be accessed by all pages?](faqs-system-applications.md#section187297991718)
- [How do I obtain DOM elements?](faqs-system-applications.md#section1833493719175)
- [How do I pass values between pages?](faqs-system-applications.md#section184283812183)
- [How do I scroll a list to an item?](faqs-system-applications.md#section11897734131811)
- [Does the <text\> component support multiple lines?](faqs-system-applications.md#section5872656121814)
- [Why is a component not displayed?](faqs-system-applications.md#section7397125317107)
- [How do I implement scrolling on a page?](faqs-system-applications.md#section338794422010)
- [Why do not the left and top attributes take effect?](faqs-system-applications.md#section2597193611217)
- [Why does not dynamic binding take effect?](faqs-system-applications.md#section6939050172115)
- [How do I implement relative and absolute positioning?](faqs-system-applications.md#section5547311192215)
- [How do I display or hide a component?](faqs-system-applications.md#section16107113352213)
- [What are the precautions for using the margin attribute?](faqs-system-applications.md#section1524910142314)
- [What are the precautions for event subscription?](faqs-system-applications.md#section1537132012231)
- [What are the precautions for using dynamic binding?](faqs-system-applications.md#section96561452236)
- [How does the loop attribute take effect for <swiper\>?](faqs-system-applications.md#section690166112414)
- [What are the precautions for using an array?](faqs-system-applications.md#section1554552822414)
### HDC<a name="section178081876506"></a>
### hdc
- [hdc\_std Fails to Connect to a Device](faqs-system-applications.md#section1965012223257)
- [hdc\_std Fails to Run](faqs-system-applications.md#section1157575212515)
- [Why does hdc_std fail to connect to a device?](../faqs/faqs-system-using.md)
- [hdc_std fail to run](../faqs/faqs-system-using.md)
# Porting<a name="EN-US_TOPIC_0000001215769367"></a>
## How Do I Mount the Heap Memory to the Kernel?<a name="section21471536184914"></a>
- The following table describes the macros for configuring the kernel heap memory. You can configure them as required in the **target\_config.h** file.
**Table 1** Macros for configuring the kernel heap memory
<a name="en-us_topic_0000001153683024_table04172020563"></a>
<table><thead align="left"><tr id="en-us_topic_0000001153683024_row5462035616"><th class="cellrowborder" valign="top" width="39.12%" id="mcps1.2.3.1.1"><p id="en-us_topic_0000001153683024_p1456204569"><a name="en-us_topic_0000001153683024_p1456204569"></a><a name="en-us_topic_0000001153683024_p1456204569"></a>Macro</p>
</th>
<th class="cellrowborder" valign="top" width="60.88%" id="mcps1.2.3.1.2"><p id="en-us_topic_0000001153683024_p19502005618"><a name="en-us_topic_0000001153683024_p19502005618"></a><a name="en-us_topic_0000001153683024_p19502005618"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0000001153683024_row14522018560"><td class="cellrowborder" valign="top" width="39.12%" headers="mcps1.2.3.1.1 "><p id="en-us_topic_0000001153683024_p35112025620"><a name="en-us_topic_0000001153683024_p35112025620"></a><a name="en-us_topic_0000001153683024_p35112025620"></a>LOSCFG_SYS_EXTERNAL_HEAP</p>
</td>
<td class="cellrowborder" valign="top" width="60.88%" headers="mcps1.2.3.1.2 "><p id="en-us_topic_0000001153683024_p5127138175710"><a name="en-us_topic_0000001153683024_p5127138175710"></a><a name="en-us_topic_0000001153683024_p5127138175710"></a>Specifies whether the internal kernel heap memory or the user heap memory will be used. The default value is <strong id="en-us_topic_0000001153683024_b161891157141719"><a name="en-us_topic_0000001153683024_b161891157141719"></a><a name="en-us_topic_0000001153683024_b161891157141719"></a>0</strong> and indicates that the internal heap memory whose size is <strong id="en-us_topic_0000001153683024_b116218121820"><a name="en-us_topic_0000001153683024_b116218121820"></a><a name="en-us_topic_0000001153683024_b116218121820"></a>0x10000</strong> will be used. If you want to use the external heap memory, set this macro to <strong id="en-us_topic_0000001153683024_b2744657141814"><a name="en-us_topic_0000001153683024_b2744657141814"></a><a name="en-us_topic_0000001153683024_b2744657141814"></a>1</strong>.</p>
</td>
</tr>
<tr id="en-us_topic_0000001153683024_row20514209567"><td class="cellrowborder" valign="top" width="39.12%" headers="mcps1.2.3.1.1 "><p id="en-us_topic_0000001153683024_p5532017563"><a name="en-us_topic_0000001153683024_p5532017563"></a><a name="en-us_topic_0000001153683024_p5532017563"></a>LOSCFG_SYS_HEAP_ADDR</p>
</td>
<td class="cellrowborder" valign="top" width="60.88%" headers="mcps1.2.3.1.2 "><p id="en-us_topic_0000001153683024_p65520125619"><a name="en-us_topic_0000001153683024_p65520125619"></a><a name="en-us_topic_0000001153683024_p65520125619"></a>Specifies the start address of the kernel heap memory.</p>
</td>
</tr>
<tr id="en-us_topic_0000001153683024_row15302929115615"><td class="cellrowborder" valign="top" width="39.12%" headers="mcps1.2.3.1.1 "><p id="en-us_topic_0000001153683024_p113021529145612"><a name="en-us_topic_0000001153683024_p113021529145612"></a><a name="en-us_topic_0000001153683024_p113021529145612"></a>LOSCFG_SYS_HEAP_SIZE</p>
</td>
<td class="cellrowborder" valign="top" width="60.88%" headers="mcps1.2.3.1.2 "><p id="en-us_topic_0000001153683024_p1030252965619"><a name="en-us_topic_0000001153683024_p1030252965619"></a><a name="en-us_topic_0000001153683024_p1030252965619"></a>Specifies the size of the kernel heap memory, that is, size of the memory block specified by <strong id="en-us_topic_0000001153683024_b1611815991419"><a name="en-us_topic_0000001153683024_b1611815991419"></a><a name="en-us_topic_0000001153683024_b1611815991419"></a>LOSCFG_SYS_HEAP_ADDR</strong>.</p>
</td>
</tr>
</tbody>
</table>
- Note:
Ensure that the specified heap memory range is not used by other modules. Otherwise, functions of the heap memory will be damaged due to the heap memory corruption.
# Startup<a name="EN-US_TOPIC_0000001215449321"></a>
## System startup interrupted due to "parse failed!" error<a name="section835662214302"></a>
**Problem**
During system startup, the error message "\[Init\] InitReadCfg, parse failed! please check file /etc/init.cfg format." is displayed, and the startup is interrupted, as shown in the following figure.
**Figure 1** Error information<a name="en-us_topic_0000001063231870_fig15217111545118"></a>
![](figures/error-information.png "error-information")
**Cause**
During the modification of the **init.cfg** file, required commas \(,\) or parentheses are missing or unnecessary ones are added. As a result, the file's JSON format becomes invalid.
**Solution**
Check the **init.cfg** file and ensure that its format meets the JSON specifications.
## System automatically restarted again and again<a name="section3857921143117"></a>
**Problem**
After the image burning is complete, the system keeps restarting.
**Cause**
Each service started by the init process has the **importance** attribute, as described in Table 3 in init Module.
- If the attribute value is **0**, the init process does not need to restart the development board when the current service process exits.
- If the attribute value is **1**, the init process needs to restart the development board when the current service process exits.
During the startup of a service whose **importance** is **1**, if the service exits due to a process crash or an error, the init process automatically restarts the development board.
**Solution**
1. View logs to identify the service that encounters a process crash or exits due to an error, rectify the issue, and then burn the image again.
2. Alternatively, change the value of **importance** to **0** for the service that exits due to a process crash or an error, and then burn the image again. In this way, the development board will not be restarted even if the service exits.
## Failed to call the **SetParameter** or **GetParameter** API with correct parameter values<a name="section548818116328"></a>
**Problem**
Calling the **SetParameter** or **GetParameter** API fails even if correct values are passed to all input parameters.
**Cause**
Permission verification has been enabled for the **SetParameter** and **GetParameter** APIs. If the UID of the caller is greater than 1000, that is, the caller does not have the permission to call these APIs, API calls will fail even if the parameters are correct.
**Solution**
No action is required.
# System Applications<a name="EN-US_TOPIC_0000001169690992"></a>
## Utils<a name="section639433461512"></a>
### 1. Failure in running the KV store on the LiteOS-A kernel \(Hi3516 or Hi3518\) due to incorrect path setting for the KV store<a name="section16520347131511"></a>
**Problem**
When the LiteOS-A kernel \(Hi3516 or Hi3518 platform\) directly calls the API provided by the KV store, the compiled executable program fails to run.
**Possible Causes**
The compiled executable program is run directly without being converted to an application using **AbilityKit** APIs. In this case, the Bundle Manager Service \(BMS\) cannot correctly set the path for storing application data during application installation. As a result, the KV store fails to run.
**Solution**
Call the **UtilsSetEnv** function of the KV store to set the data storage path.
```
UtilsSetEnv("/storage/com.example.kv");
```
## Visual Applications<a name="section787718474161"></a>
### Is there a global variable that can be accessed by all pages?<a name="section187297991718"></a>
There is no such a global variable.
### How do I obtain DOM elements?<a name="section1833493719175"></a>
You can obtain DOM elements via the **ref** attribute. You can use methods of the obtained elements but cannot change their attributes. The sample code is as follows:
```
<!--index.hml-->
<div class="container">
<!-- Set the ref attribute of the component to animator -->.
<image-animator class="image-player" ref="animator" images="{{images}}" duration="1s" onclick="handleClick"></image-animator>
</div>
/* index.js */
export default {
data: {
images:[
{src:"common/frame1.png"},
{src:"common/frame2.png"},
{src:"common/frame3.png"}
]
},
handleClick(){
// Obtain the component through the $refs attribute. (The ref attribute of the component has been set to animator in the HML file.)
const animator = this.$refs.animator;
const state = animator.getState();
if(state == "paused"){
animator.resume();
}else if(state == "stopped"){
animator.start();
}else{
animator.pause();
}
}
}
```
### How do I pass values between pages?<a name="section184283812183"></a>
You can pass values through **params** of the **router.replace** method. The sample code is as follows:
Set **params** to the values to be passed on a page.
```
router.replace({
uri:'pages/detail/detail', // URI of the page to switch to.
params:{transferData:this.data} // Data to be transferred. You need to define the data amount and name.
});
```
Receive the passed values on another page.
```
onInit(){
const data = this.transferData; // Receive the transferred data by the onInit function.
}
```
### How do I scroll a list to an item?<a name="section11897734131811"></a>
Call the **scrollTo** method of the list. The input parameter of this method is the index of the target item. You can specify an item index, or obtain the index through the **scrollend** event.
### Does the **<text\>** component support multiple lines?<a name="section5872656121814"></a>
Yes. You can use the Enter key to start a new line. Alternatively, the component automatically starts a new line based on the content, without the need to set the height attribute of the text.
### Why is a component not displayed?<a name="section7397125317107"></a>
**Description**
The component added to the **.hml** file cannot be displayed.
**Possible Causes**
- The width and height of the component may not be set.
- The style setting may be incorrect.
**Solution**
\(1\) Check whether the width and height values are set explicitly.
\(2\) Check whether the style of the component is set correctly.
### How do I implement scrolling on a page?<a name="section338794422010"></a>
There are three ways to implement page scrolling: **scroll**, **<list\>**, or **<swiper\>**. For a root component with **scroll** set, the scrolling effect is automatically implemented when the component size exceeds the screen size. For details, see the development specifications.
### Why do not the **left** and **top** attributes take effect?<a name="section2597193611217"></a>
**left** and **top** attributes must work with the **<stack\>** component in addition to the root component.
### Why does not dynamic binding take effect?<a name="section6939050172115"></a>
The object or its attributes are not defined before dynamic binding.
### How do I implement relative and absolute positioning?<a name="section5547311192215"></a>
You can use the **<div\>** and **<stack\>** \(with **top** and **left** attributes\) components.
### How do I display or hide a component?<a name="section16107113352213"></a>
You can use **display**, **show**, or **if**. When an **if** clause evaluates to **false**, the corresponding component will be removed from the VDOM. When **show** is set to **false**, the component will be invisible during rendering, but will not be removed from the VDOM.
### What are the precautions for using the **margin** attribute?<a name="section1524910142314"></a>
The **margin** attribute cannot be set for child components of the **<stack\>** component.
### What are the precautions for event subscription?<a name="section1537132012231"></a>
Only one page exists when the application is running. Therefore, the **router.replace** function destroys the previous page and then creates a new one. For pages involving event subscription, an event should be subscribed every time a page is created, and unsubscribed before page switching.
### What are the precautions for using dynamic binding?<a name="section96561452236"></a>
Do not use too many dynamic bindings because they consume too much memory.
### How does the **loop** attribute take effect for **<swiper\>**?<a name="section690166112414"></a>
If the total length of the child components, except for the first and last ones, is greater than the length of **<swiper\>**, the **loop** attribute takes effect.
### What are the precautions for using an array?<a name="section1554552822414"></a>
Do not include too many elements in an array. Avoid frequent operations on a large array.
## HDC<a name="section412357182518"></a>
### hdc\_std Fails to Connect to a Device<a name="section1965012223257"></a>
- **Symptom**
**\[Empty\]** is displayed in the output after the **hdc\_std list targets** command is executed.
- **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. Then, run the **hdc list targets** command to check whether device information can be obtained.
3. hdc\_std does not match the device.
If the latest image is burnt on the device, the latest hdc\_std version must be used. 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<a name="section1157575212515"></a>
- **Symptom**
The **hdc\_std.exe** file does not run after being clicked.
- **Solutions**
**hdc\_std.exe** requires no installation. It can be directly used on a disk or added to environment variables. Open the cmd window and run the **hdc\_std** command to use **hdc\_std.exe**.
# System Applications
## Utils FAQs
### Failure in running the KV store on the LiteOS-A kernel (Hi3516 or Hi3518) due to incorrect path setting for the KV store
**Symptom**
When the LiteOS-A kernel (Hi3516 or Hi3518) directly calls the API provided by the KV store, the compiled executable program fails to run.
**Possible Causes**
The compiled executable program is run directly without being converted to an application using **AbilityKit** APIs. In this case, the Bundle Manager Service (BMS) cannot correctly set the path for storing application data during application installation. As a result, the KV store fails to run.
**Solution**
Call the **UtilsSetEnv** function of the KV store to set the data storage path.
```
UtilsSetEnv("/storage/com.example.kv");
```
## Visual Application
### Is there a global variable that can be accessed by all pages?
There is no such a global variable.
### How do I obtain DOM elements?
You can obtain DOM elements via the **ref** attribute. You can use methods of the obtained elements but cannot change their attributes. The sample code is as follows:
```
/* index.js */
export default {
data: {
images:[
{src:"common/frame1.png"},
{src:"common/frame2.png"},
{src:"common/frame3.png"}
]
},
handleClick(){
// Obtain the component through the $refs attribute. (The ref attribute of the component has been set to animator in the HML file.)
const animator = this.$refs.animator;
const state = animator.getState();
if(state == "paused"){
animator.resume();
}else if(state == "stopped"){
animator.start();
}else{
animator.pause();
}
}
}
```
### How do I pass values between pages?
You can pass values through **params** of the **router.replace** method. The sample code is as follows:
Set **params** to the values to be passed on a page. The sample code is as follows:
```
router.replace({
uri:'pages/detail/detail', // URI of the page to be redirected to.
params:{transferData:this.data} // Data to be transferred. You need to define the data amount and name.
});
```
Receive the passed values on another page.
```
onInit(){
const data = this.transferData; // Use the onInit function to receive the passed data.
}
```
### How do I scroll a list to an item?
Call the **scrollTo** method of the list. The input parameter of this method is the index of the target item. You can specify an item index, or obtain the index through the **scrollend** event.
### Does the <text> component support multiple lines?
Yes. The **<text>** component supports multiple lines. You can use the **Enter** key to start a new line. If you do not set the height attribute of the text, the component automatically starts a new line based on the content.
### Why is a component not displayed?
**Symptom**
The component added to the **.hml** file cannot be displayed.
**Possible Causes**
- The width and height of the component may not be set.
- The style setting may be incorrect.
**Solution**
(1) Check whether the width and height values are set explicitly.
(2) Check whether the style of the component is set correctly.
### How do I implement scrolling on a page?
There are three ways to implement page scrolling: **scroll**, **<list>**, or **<swiper>**. For a root component with **scroll** set, the scrolling effect is automatically implemented when the component size exceeds the screen size. For details, see the development specifications.
### Why do not the left and top attributes take effect?
The **left** and **top** attributes must work with the **<stack>** component, except those of the root component.
### Why does not dynamic binding take effect?
The object or its attributes are not defined before dynamic binding.
### How do I implement relative and absolute positioning?
You can use the **<div>** and **<stack>** (with **top** and **left** attributes) components to implement relative positioning and absolute positioning.
### How do I display or hide a component?
You can use **display**, **show**, or **if** to display or hide a component. When an **if** clause evaluates to **false**, the corresponding component will be removed from the VDOM. When **show** is set to **false**, the component will be invisible during rendering, but will not be removed from the VDOM.
### What are the precautions for using the Margin attribute?
The **margin** attribute cannot be set for child components of the **<stack>** component.
### What are the precautions for event subscription?
Only one page exists when the application is running. Therefore, the **router.replace** function destroys the previous page and then creates a new one. For pages involving event subscription, an event should be subscribed every time a page is created, and unsubscribed before page switching.
### What are the precautions for using dynamic binding?
Do not use too many dynamic bindings because they consume too much memory.
### How does the loop attribute take effect for <swiper>?
If the total length of child components, except for the first and last ones, is greater than the length of **<swiper>**, the **loop** attribute takes effect.
### What are the precautions for using an array?
Do not include too many elements in an array. Avoid frequent operations on a large array.
## HDC FAQs
### Why does hdc_std fail to connect to a device?
- **Symptom**
After the **hdc_std list targets** command is executed, **[Empty]** is displayed.
- **Solution**
1. The device cannot be identified.
Check whether **HDC Device** exists under the **Universal Serial Bus controllers** in the **Device Manager**. If **HDC Device** does not exist, the device cannot be connected. In this case, disconnect and then reconnect the USB connection between the test PC and the OpenHarmony device, or burn the latest image.
2. hdc_std works improperly.
Run the **hdc kill** command to terminate the hdc_std process or run the **hdc start -r** command to restart the hdc service. Then, run the **hdc list targets** command to check whether device information can be obtained.
3. hdc_std does not match the device.
If the latest image is burnt on the device, the latest hdc_std version must be used.
### hdc_std fail to run
- **Symptom**
After you click **hdc_std.exe**, the file fails to execute.
- **Solution**
**hdc_std.exe** requires no installation. You can use it after placing it to a local directory or adding the tool path to environment variables. Run the **cmd** command and then run the **hdc_std** command to start the tool.
# Porting
## How Do I Mount the Heap Memory to the Kernel?
- The following table describes the macros for configuring the kernel heap memory. You can configure them as required in the **target_config.h** file.
**Table 1** Macros for configuring the kernel heap memory
| Macro | Description |
| -------- | -------- |
| LOSCFG_SYS_EXTERNAL_HEAP | Specifies whether the internal kernel heap memory or the user heap memory will be used. The default value is **0** and indicates that the internal heap memory whose size is **0x10000** will be used. If you want to use the external heap memory, set this macro to **1**. |
| LOSCFG_SYS_HEAP_ADDR | Specifies the start address of the kernel heap memory. |
| LOSCFG_SYS_HEAP_SIZE | Specifies the size of the kernel heap memory, that is, size of the memory block specified by **LOSCFG_SYS_HEAP_ADDR**. |
- Note:
Ensure that the specified heap memory range is not used by other modules. Otherwise, functions of the heap memory will be damaged due to the heap memory corruption.
# FAQs
- **[Overview of FAQs](faqs-overview.md)**
- **[Environment Setup](faqs-environment-building.md)**
- **[Compilation and Building Subsystem](faqs-building.md)**
- **[Burning](faqs-burning.md)**
- **[Kernel](faqs-kernel.md)**
- **[Porting](faqs-transplant.md)**
- **[Startup and Recovery](faqs-init.md)**
- **[System Applications](faqs-system-using.md)**
......@@ -56,15 +56,15 @@
1. Check whether the network cable is properly connected.
2. Click Windows Firewall.
2. Click **Windows Firewall**.
**Figure 6** Network and firewall settings
![en-us_image_0000001226634732](figures/en-us_image_0000001226634732.png)
3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**.
3. Click **Firewall & network protection**, and on the displayed page, click **Allow an app through the firewall**.
**Figure 7** Firewall and network protection
**Figure 7** Firewall & network protection
![en-us_image_0000001271354749](figures/en-us_image_0000001271354749.png)
......
......@@ -15,20 +15,20 @@
Reinstall python3-apt.
```
sudo apt-get remove python3-apt
sudo apt-get install python3-apt
```
## What should I do when the message indicating Python cannot be found is displayed during compilation and building?
## What should I do if the message indicating Python cannot be found is displayed during compilation and building?
- **Symptom**
The following error occurs during compilation and building:
```
-bash: /usr/bin/python: No such file or directory
```
......@@ -41,7 +41,7 @@
Run the following command to install Python. The following uses Python 3.8 as an example.
```
sudo apt-get install python3.8
```
......@@ -56,7 +56,7 @@
Run the following commands to add a soft link:
```
# cd /usr/bin/
# which python3
......@@ -69,7 +69,7 @@
![en-us_image_0000001227114636](figures/en-us_image_0000001227114636.png)
## What should I do when the message indicating Python 3 cannot be found is displayed during compilation and building?
## What should I do if the message indicating Python 3 cannot be found is displayed during compilation and building?
- **Symptom**
......@@ -83,19 +83,19 @@
Run the following command to install Python 3:
```
sudo apt-get install python3.8
```
## What should I do when the message configure: error: no acceptable C compiler found in $PATH is displayed during Python 3 installation?
## What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details
```
......@@ -110,13 +110,13 @@
2. After the installation, reinstall Python 3.
## What should I do when the message -bash: make: command not found is displayed during Python 3 installation?
## What should I do if the message "-bash: make: command not found is displayed" during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
-bash: make: command not found
```
......@@ -131,13 +131,13 @@
2. After the installation, reinstall Python 3.
## What should I do when the message No module named '_ctypes' is displayed during Python 3 installation?
## What should I do if the message "No module named '_ctypes'" is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
ModuleNotFoundError: No module named '_ctypes'
```
......@@ -152,13 +152,13 @@
2. After the installation, reinstall Python 3.
## "No module named 'Crypto'" Displayed During the Build Process
## What should I do if the message "No module named 'Crypto'" is displayed during the build process?
- **Symptom**
The following error occurs during compilation and building:
```
ModuleNotFoundError: No module named 'Crypto'
```
......@@ -182,13 +182,13 @@
After the preceding installation is complete, rebuild an environment.
## What should I do when the message No module named 'ecdsa' is displayed during compilation and building? (Hi3861)
## What should I do if the message "No module named 'ecdsa'" is displayed during the build process? (Hi3861)
- **Symptom**
The following error occurs during compilation and building:
```
ModuleNotFoundError: No module named 'ecdsa'
```
......@@ -212,13 +212,13 @@
After the preceding installation is complete, rebuild an environment.
## What should I do when the message Could not find a version that satisfies the requirement six>=1.9.0 is displayed during compilation and building? (Hi3861)
## What should I do if the message "Could not find a version that satisfies the requirement six>=1.9.0" is displayed during the build process? (Hi3861)
- **Symptom**
The following error occurs during compilation and building:
```
Could not find a version that satisfies the requirement six>=1.9.0
```
......@@ -242,13 +242,13 @@
After the preceding installation is complete, rebuild an environment.
## What should I do when the message cannot find -lgcc is displayed during compilation and building? (Hi3861)
## What should I do if the message "cannot find -lgcc" is displayed during the build process? (Hi3861)
- **Symptom**
The following error occurs during compilation and building:
```
riscv32-unknown-elf-ld: cannot find -lgcc
```
......@@ -257,7 +257,7 @@
The PATH is incorrectly written by **gcc_riscv32**. There is an extra slash (/).
```
~/gcc_riscv32/bin/:/data/toolchain/
```
......@@ -266,7 +266,7 @@
Modify the PATH by deleting the slash (/).
```
~/gcc_riscv32/bin:/data/toolchain/
```
......@@ -278,7 +278,7 @@
The following error occurs during **kconfiglib** installation:
```
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
```
......
......@@ -56,15 +56,15 @@
1. Check whether the network cable is properly connected.
2. Click Windows Firewall.
2. Click **Windows Firewall**.
**Figure 6** Network and firewall settings
![en-us_image_0000001226634732](figures/en-us_image_0000001226634732.png)
3. Click **Firewall & network protection**, and on the displayed page, click **Allow applications to communicate through Windows Firewall**.
3. Click **Firewall & network protection**, and on the displayed page, click **Allow an app through the firewall**.
**Figure 7** Firewall and network protection
**Figure 7** Firewall & network protection
![en-us_image_0000001271202457](figures/en-us_image_0000001271202457.png)
......
......@@ -15,20 +15,20 @@
Reinstall python3-apt.
```
sudo apt-get remove python3-apt
sudo apt-get install python3-apt
```
## What should I do when the message indicating Python cannot be found is displayed during compilation and building?
## What should I do if the message indicating Python cannot be found is displayed during compilation and building?
- **Symptom**
The following error occurs during compilation and building:
```
-bash: /usr/bin/python: No such file or directory
```
......@@ -41,7 +41,7 @@
Run the following command to install Python. The following uses Python 3.8 as an example.
```
sudo apt-get install python3.8
```
......@@ -56,7 +56,7 @@
Run the following commands to add a soft link:
```
# cd /usr/bin/
# which python3
......@@ -69,7 +69,7 @@
![en-us_image_0000001271562453](figures/en-us_image_0000001271562453.png)
## What should I do when the message indicating Python 3 cannot be found is displayed during compilation and building?
## What should I do if the message indicating Python 3 cannot be found is displayed during the build process?
- **Symptom**
......@@ -83,19 +83,19 @@
Run the following command to install Python 3:
```
sudo apt-get install python3.8
```
## What should I do when the message configure: error: no acceptable C compiler found in $PATH is displayed during Python 3 installation?
## What should I do if the message "configure: error: no acceptable C compiler found in $PATH" is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
configure: error: no acceptable C compiler found in $PATH. See 'config.log' for more details
```
......@@ -110,13 +110,13 @@
2. After the installation, reinstall Python 3.
## What should I do when the message -bash: make: command not found is displayed during Python 3 installation?
## What should I do if the message "-bash: make: command not found" is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
-bash: make: command not found
```
......@@ -131,13 +131,13 @@
2. After the installation, reinstall Python 3.
## What should I do when the message No module named '_ctypes' is displayed during Python 3 installation?
## What should I do if the message "No module named '_ctypes'" is displayed during Python 3 installation?
- **Symptom**
The following error occurs during Python 3 installation:
```
ModuleNotFoundError: No module named '_ctypes'
```
......@@ -152,13 +152,13 @@
2. After the installation, reinstall Python 3.
## "No module named 'Crypto'" Displayed During the Build Process
## What should I do if the message "No module named 'Crypto'" is displayed during the build process?
- **Symptom**
The following error occurs during compilation and building:
```
ModuleNotFoundError: No module named 'Crypto'
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册