OpenHarmony开发者论坛

标题: 搭建一站式OpenHarmony设备开发Windows开发环境 [打印本页]

作者: 润开鸿_坚果    时间: 2023-11-24 04:45
标题: 搭建一站式OpenHarmony设备开发Windows开发环境
[md]## 搭建一站式OpenHarmony设备开发Windows开发环境

本次实验用的开发板是润和的3861智能家居套件

## 需要准备的物料有

windows电脑一台

智能家居套件一套

USB数据线一根

## 需要提前准备的几个素材为

1.vscode:

下载地址:https://code.visualstudio.com/download

2.DevEco Device TooL

下载地址:[DevEco Device Tool3.1 Release](https://device.harmonyos.com/cn/develop/ide#download)

3.源码

下载地址:[hi3861_hdu_iot_application](https://gitee.com/HiSpark/hi3861_hdu_iot_application)

4.Hi3861V100编译工具链:

下载地址: [https://hispark.obs.cn-east-3.my ... Hi3861V100_v1.0.zip](https://gitee.com/link?target=ht ... Hi3861V100_v1.0.zip)

## DevEco Device TooL的安装

第一步,解压并双击exe文件

![image-20230421083043157](https://luckly007.oss-cn-beijing ... 230421083043157.png)

![image-20230421083101879](https://luckly007.oss-cn-beijing ... 230421083101879.png)

点击我接受

![image-20230421083130775](https://luckly007.oss-cn-beijing ... 230421083130775.png)

点击下一步

![image-20230421083155357](https://luckly007.oss-cn-beijing ... 230421083155357.png)

点击安装

![image-20230421083457315](https://luckly007.oss-cn-beijing ... 230421083457315.png)

完成安装

## 导入源码

打开VScode

![image-20230421084249701](https://luckly007.oss-cn-beijing ... 230421084249701.png)

选择Import Project

![image-20230421084327121](https://luckly007.oss-cn-beijing ... 230421084327121.png)

在导入工程弹窗,SOC栏选择Hi3861,开发板栏、框架栏默认,分别是hi3861、hb,之后点击“导入”即可。

选择对应的源码文件。可以点击这个连接进行源码的下载,[hi3861_hdu_iot_application](https://gitee.com/HiSpark/hi3861_hdu_iot_application),然后解压到自己想要保存的目录,我的是在D盘的D:\sample\hi3861_hdu_iot

![image-20230421084434738](https://luckly007.oss-cn-beijing ... 230421084434738.png)

![image-20230421084642221](https://luckly007.oss-cn-beijing ... 230421084642221.png)

在导入工程弹窗,SOC栏选择Hi3861,开发板栏、框架栏默认,分别是hi3861、hb,之后点击“导入”即可。

![image-20230421084717117](https://luckly007.oss-cn-beijing ... 230421084717117.png)

## 配置开发工具

### 第一步,解压工具链DevTools_Hi3861V100_v1.0

工具链的下载地址: [https://hispark.obs.cn-east-3.my ... Hi3861V100_v1.0.zip](https://gitee.com/link?target=ht ... Hi3861V100_v1.0.zip)

### 第二步,点开工程配置

选择点击左侧的“工程配置”,在右侧窗口找到“compiler_bin_path”,选择到之前下载的开发工具。注意工具目录层级,选择到最内层。我的是在D:\3861\DevTools_Hi3861V100_v1.0

![image-20230421085151351](https://luckly007.oss-cn-beijing ... 230421085151351.png)

![image-20230421085209462](https://luckly007.oss-cn-beijing ... 230421085209462.png)

### 第三步,点击manage

![image-20230421085303767](https://luckly007.oss-cn-beijing ... 230421085303767.png)

点击ok

![image-20230421085319124](https://luckly007.oss-cn-beijing ... 230421085319124.png)

### 第四步,点击编译

点击编译,就会参与编译,然后等待编译完成就好

![image-20230421085401344](https://luckly007.oss-cn-beijing ... 230421085401344.png)

可以看到编译完成

![image-20230421085457900](https://luckly007.oss-cn-beijing ... 230421085457900.png)

刚才编译的是啥都没有的案例

![image-20230421085738070](https://luckly007.oss-cn-beijing ... 230421085738070.png)

## 编译点灯

![image-20230421085840608](https://luckly007.oss-cn-beijing ... 230421085840608.png)

## 重新编译

![image-20230421085950747](https://luckly007.oss-cn-beijing ... 230421085950747.png)

## 安装串口工具

点击DevTools_Hi3861V100_v1.0\usb_serial_driver下的串口工具,进行安装

![image-20230421101835245](https://luckly007.oss-cn-beijing ... 230421101835245.png)

![image-20230421101846651](https://luckly007.oss-cn-beijing ... 230421101846651.png)

## 配置工具

![image-20230421090248026](https://luckly007.oss-cn-beijing ... 230421090248026.png)

## 点击upload,烧录

开始烧录,点击upload。开发板上按一下复位键

出现sucess,表示成功

![image-20230421090517362](https://luckly007.oss-cn-beijing ... 230421090517362.png)

这个时候就可以点击开发板的复位键,就可以看到灯在闪烁,说明你已经完成了从工具下载,环境配置,源码下载,编译,烧录的一整个流程。有没有觉得你很厉害,已经学到了这个地方。



[/md]




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5