环境准备
• 硬件准备
1、
Windows10 64位(DevEco
device Tool Windows开发环境)
2、
Ubuntu18及以上版本(DevEco Device Tool Ubuntu开发环境)
3、Windows + Ubuntu(本次课程讲解)
• 软件准备
1、代码编辑器(Visual Studio Code)
2、虚拟机(Virtual Box)(可选)
3、编译工具链
4、远程连接工具(MobaXterm)(可选)
5、烧录工具
6、
串口驱动
7、串口调试工具
环境配置--Visual Studio Code安装
• 安装步骤
1、根据下载链接下载安装包
2、双击安装包开始安装,安装过程中主要要勾选“添加到PATH(重启后生效)”,安装完成后,重启计算机。
环境配置--虚拟机安装
• 安装步骤
1、根据下载链接下载安装包
2、双击安装包开始安装,安装过程中要勾选“ Create a shortcut on the desktop”和”Create a shortcut in the Quick Lanch Bar”,安装完成后,可以选择直接开启VirtualBox软件。
环境配置--基础软件安装
• 安装
linux使用基础软件
1、sudo apt-get update && sudo apt-get install -y vim net-tools
--sudo apt-get update 更新软件列表
--vim linux 编辑器
--net-tools linux网络工具(ifconfig查看网络工具)
2、sudo apt-get install -y openssh-server
--openssh-server ssh服务,便于ssh远程连接
环境配置--编译基础软件安装
• 安装编译依赖基础软件:
sudo apt-get install -y build-essential gcc g++
MAKE zlib* libffi-dev
--build-essential 提供编译程序必须软件包的列表信息
--gcc gcc编译器
--g++ g++编译器
--make 编译工具
--zlib* 数据压缩函式库
--libffi-dev libffi的开发文件
源码下载
• 配置repo
mkdir ~/bin/
#sudo apt install -y curl # 如果没有curl命令需要先下载
curl
https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > ~/bin/repo
chmod +x ~/bin/repo
echo 'export PATH=~/bin

PATH' >> ~/.bashrc
source ~/.bashrc
• 下载OpenH
armony源码
mkdir -p ~/
HarmonyOS/openharmony && cd ~/harmonyos/openharmony
sudo apt install --no-install-recommends git git-lfs # repo工具本身是
python脚本,它会调用git命令下载单个代码仓
# 开始前需要配置`user.name`和`user.email`,如果没有配置,使用如下命令进行配置:
# git config --global user.name "yourname"
# git config --global user.email "your-email-address"
repo init -u
https://gitee.com/openharmony/manifest.git -b master --no-repo-verify
repo sync -c # 以后每天同步远程仓的修改,只需要执行这一条命令即可
repo forall -c 'git lfs pull
......
更多详细内容请下载附件查看