1# Setting Up the Development Environment 2 3 4In embedded development, Windows-based tools, such as Visual Studio Code, are widely used in code editing. Yet, because the source code of most development boards, such as Hi3861 and Hi3516, cannot be built in Windows, these development boards require the Ubuntu build environment. Therefore, for these development boards, you need Ubuntu to build source code and Windows to burn images. 5 6Set up the Windows and Ubuntu development environments that meet the [Windows Requirements](#windows-requirements) and [Ubuntu Requirements](#ubuntu-requirements), respectively. Then enable Windows to remotely access Ubuntu. No specific requirements are placed on the development devices. 7 8 9> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** 10> 11> OpenHarmony also provides the [Docker environment](https://gitee.com/openharmony/docs/blob/master/en/device-dev/get-code/gettools-acquire.md), which can significantly simplify the environment configuration before compilation. You can build your source code in the Docker environment if you are more accustomed to using the command line. 12 13 14 15 16 17## Windows Requirements 18 1964-bit Windows 10 20 21 22## Ubuntu Requirements 23 24- OS: Ubuntu 18.04 or later. The recommended memory is 16 GB or higher. 25 26- User name: cannot contain Chinese characters 27 28 29## Preparing for Remote Access 30 31When burning images in Windows, you need to remotely access the source code and image files in Ubuntu. To achieve this, use a file transfer or sharing tool. 32 33In this example the Samba server is used. 34 35 36### Configuring the Samba Server 37 38Perform the following operations in Ubuntu: 39 401. Install the Samba software package. 41 42 ``` 43 sudo apt-get install samba samba-common 44 ``` 45 462. Configure the sharing information in the Samba configuration file. 47 48 Open the **smb.conf** file. 49 50 ``` 51 sudo gedit /etc/samba/smb.conf 52 ``` 53 54 Append the following information to the configuration file: 55 56 57 ``` 58 [Share] # Name of the root folder mapped in Windows (Share is used as an example) 59 comment = Shared Folder # Information about the sharing 60 path = /home/share # Shared directory 61 valid users = username # User who can access the shared directory (user name in Ubuntu) 62 directory mask = 0775 # Default directory permissions 63 create mask = 0775 # Default file permissions 64 public = yes # Whether to enable public access 65 writable = yes # Whether to enable write access 66 available = yes # Whether the directory is available 67 browseable = yes # Whether the directory is browseable 68 ``` 69 703. Add the user name and password for accessing the Samba server. 71 72 ``` 73 sudo smbpasswd -a username # Enter the Ubuntu user name. Then set the password as prompted. 74 ``` 75 764. Run the following command to restart the Samba service: 77 78 ``` 79 sudo service smbd restart 80 ``` 81 82 83### Mapping a Network Drive in Windows 84 85Perform the following operations in Windows: 86 871. Right-click **This PC** and choose **Map network drive** from the shortcut menu. In the **Drive** list, select a drive letter. In the **Folder** field, enter the path in the format of *\\Ubuntu device IP address\Ubuntu shared folder*. 88 89 ![quickstart-pkg-prepare-networkdriver](figures/quickstart-pkg-prepare-networkdriver.png) 90 912. Enter the user name and password for accessing the Samba server, which has been set up in [Configuring the Samba Server](#configuring-the-samba-server). 92 93 ![quickstart-pkg-prepare-setsamba](figures/quickstart-pkg-prepare-setsamba.png) 94 953. The shared directory is displayed in Windows and available for access. 96