最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

OpenHarmony

IT圈 admin 18浏览 0评论

OpenHarmony

轻量与小型系统入门概述
简介
OpenHarmony轻量和小型系统适用于内存较小的IOT设备(参考内存≥128KiB)。通过本文,开发者可以快速熟悉OpenHarmony轻量和小型系统的环境搭建、编译、烧录、调测以及运行“Hello World”等。

开发环境
开发者通常习惯采用Windows+Ubuntu环境进行OpenHarmony开发:
Windows:用于源码开发、烧录等。
Ubuntu:用于源码编译。

开发板
本文基于以下两款典型开发板进行开发介绍 :Hi3861 WLAN模组、Hi3516DV300。开发板规格

系统要求
Windows系统要求:Windows10 64位系统。
Ubuntu系统要求:Ubuntu20.04及以上版本,内存推荐16 GB及以上。
Windows系统和Ubuntu系统的用户名不能包含中文字符。
Windows和Ubuntu系统上安装的DevEco Device Tool为3.0 Release版本。

搭建Ubuntu环境
1、将Ubuntu Shell环境修改为bash。
1.执行如下命令,确认输出结果为bash。如果输出结果不是bash,请根据步骤2,将Ubuntu shell修改为bash。

ls -l /bin/sh


2.打开终端工具,执行如下命令,输入密码,然后选择No,将Ubuntu shell由dash修改为bash。

sudo dpkg-reconfigure dash


2、下载DevEco Device Tool 3.0 ReleaseLinux版本。

3、解压DevEco Device Tool软件包并对解压后的文件夹进行赋权。
1. 进入DevEco Device Tool软件包目录,执行如下命令解压软件包,其中devicetool-linux-tool-3.0.0.401.zip为软件包名称,请根据实际进行修改。

unzip devicetool-linux-tool-3.0.0.401.zip
	2. 进入解压后的文件夹,执行如下命令,赋予安装文件可执行权限,其中devicetool-linux-tool-3.0.0.401.sh请根据实际进行修改。
chmod u+x devicetool-linux-tool-3.0.0.401.sh

4、执行如下命令,安装DevEco Device Tool,其中devicetool-linux-tool-3.0.0.401.sh请根据实际进行修改。

sudo ./devicetool-linux-tool-3.0.0.401.sh

说明: 安装过程中,会自动检查Python是否安装,且要求Python为3.8~3.9版本。如果不满足,则安装过程中会自动安装,提示“Do you want to continue?”,请输入“Y”后继续安装。

安装完成后,当界面输出“Deveco Device Tool successfully installed.”时,表示DevEco Device Tool安装成功。

搭建Windows开发环境
通过Windows系统远程访问Ubuntu环境,需要先在Windows系统中安装DevEco Device Tool,以便使用Windows平台的DevEco Device Tool可视化界面进行相关操作。
下载DevEco Device Tool 3.0 ReleaseWindows版,下载地址。
解压DevEco Device Tool压缩包,双击安装包程序,点击Next进行安装。

官方链接:开发者文档

OpenHarmony

轻量与小型系统入门概述
简介
OpenHarmony轻量和小型系统适用于内存较小的IOT设备(参考内存≥128KiB)。通过本文,开发者可以快速熟悉OpenHarmony轻量和小型系统的环境搭建、编译、烧录、调测以及运行“Hello World”等。

开发环境
开发者通常习惯采用Windows+Ubuntu环境进行OpenHarmony开发:
Windows:用于源码开发、烧录等。
Ubuntu:用于源码编译。

开发板
本文基于以下两款典型开发板进行开发介绍 :Hi3861 WLAN模组、Hi3516DV300。开发板规格

系统要求
Windows系统要求:Windows10 64位系统。
Ubuntu系统要求:Ubuntu20.04及以上版本,内存推荐16 GB及以上。
Windows系统和Ubuntu系统的用户名不能包含中文字符。
Windows和Ubuntu系统上安装的DevEco Device Tool为3.0 Release版本。

搭建Ubuntu环境
1、将Ubuntu Shell环境修改为bash。
1.执行如下命令,确认输出结果为bash。如果输出结果不是bash,请根据步骤2,将Ubuntu shell修改为bash。

ls -l /bin/sh


2.打开终端工具,执行如下命令,输入密码,然后选择No,将Ubuntu shell由dash修改为bash。

sudo dpkg-reconfigure dash


2、下载DevEco Device Tool 3.0 ReleaseLinux版本。

3、解压DevEco Device Tool软件包并对解压后的文件夹进行赋权。
1. 进入DevEco Device Tool软件包目录,执行如下命令解压软件包,其中devicetool-linux-tool-3.0.0.401.zip为软件包名称,请根据实际进行修改。

unzip devicetool-linux-tool-3.0.0.401.zip
	2. 进入解压后的文件夹,执行如下命令,赋予安装文件可执行权限,其中devicetool-linux-tool-3.0.0.401.sh请根据实际进行修改。
chmod u+x devicetool-linux-tool-3.0.0.401.sh

4、执行如下命令,安装DevEco Device Tool,其中devicetool-linux-tool-3.0.0.401.sh请根据实际进行修改。

sudo ./devicetool-linux-tool-3.0.0.401.sh

说明: 安装过程中,会自动检查Python是否安装,且要求Python为3.8~3.9版本。如果不满足,则安装过程中会自动安装,提示“Do you want to continue?”,请输入“Y”后继续安装。

安装完成后,当界面输出“Deveco Device Tool successfully installed.”时,表示DevEco Device Tool安装成功。

搭建Windows开发环境
通过Windows系统远程访问Ubuntu环境,需要先在Windows系统中安装DevEco Device Tool,以便使用Windows平台的DevEco Device Tool可视化界面进行相关操作。
下载DevEco Device Tool 3.0 ReleaseWindows版,下载地址。
解压DevEco Device Tool压缩包,双击安装包程序,点击Next进行安装。

官方链接:开发者文档

Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1095, humandate(1737986132)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(26))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1096, humandate(1737986132)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(27))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1095, humandate(1738011024)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(26))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1096, humandate(1738011024)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(27))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1095, humandate(1738012801)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(26))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1096, humandate(1738012801)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(27))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1095, humandate(1741183268)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(26))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1096, humandate(1741183268)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(27))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1095, humandate(1742621035)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(26))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
Error[2]: Trying to access array offset on value of type int, File: /www/wwwroot/www.usbmi.com/xiunophp/xiunophp.min.php, Line: 54
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 1096, humandate(1742621035)
File: /www/wwwroot/www.usbmi.com/tmp/model_thread.func.php, Line: 662, well_thread_format(array(27))
File: /www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm, Line: 249, well_thread_find_asc(array(7) , 7)
File: /www/wwwroot/www.usbmi.com/tmp/route_read.php, Line: 204, include(/www/wwwroot/www.usbmi.com/tmp/view_template_d8_htm_read.htm)
File: /www/wwwroot/www.usbmi.com/tmp/index.inc.php, Line: 129, include(/www/wwwroot/www.usbmi.com/tmp/route_read.php)
File: /www/wwwroot/www.usbmi.com/index.php, Line: 29, include(/www/wwwroot/www.usbmi.com/tmp/index.inc.php)
发布评论

评论列表 (0)

  1. 暂无评论