# Setting Up the Hi3516 Development Environment
- [Prerequisites](#section2074878255)
- [Requirements Specific to the Hi3516 Development Environment](#section179175261196)
- [Hardware Requirements](#section5840424125014)
- [Software Requirements](#section965634210501)
- [Installing the Linux Compilation Environment](#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](#section8352161417450)
- [Installing hc-gen](#section2075110583451)
- [Installing the JVM](#section101989994613)
## Prerequisites
You must complete the settings in [Basic OS Environment Setup](basic-os-environment-setup.md).
## Requirements Specific to the Hi3516 Development Environment
### Hardware Requirements
- Hi3516D V300 IoT camera development board
- USB-to-serial cable and network cable \(The Windows workstation is connected to 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 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 the Linux Compilation Environment](#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
|
hc-gen
|
Configures and compiles files.
|
https://repo.huaweicloud.com/harmonyos/compiler/hc-gen/0.65/linux/hc-gen-0.65-linux.tar
|
Java virtual machine (JVM)
|
Compiles, debugs, and runs Java programs.
|
apt-get install
|
## Installing the Linux Compilation Environment
>![](public_sys-resources/icon-notice.gif) **NOTICE:**
>- If you acquire the source code using an HPM component or HPM CLI tool, the compilation tool **hc-gen** is not required.
>- \(Recommended\) If you obtain the source code through an image site or a code repository, you should install the compilation tool **hc-gen**. When installing **hc-gen**, ensure that the environment variable paths of the compilation tools are 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
```
### 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
```