鸿蒙Harmony初体验Hi3516DV300
鸿蒙发布在gitee上
https://gitee.com/openHarmony
入门指导,以Hi3516DV300为例
https://gitee.com/openharmony/docs/tree/master/quick-start
搭建环境
在ubuntu18.4上,环境搭建可参考gitee上的入门的指导,编译顺利通过后,回头重点理一下:
安装Python
1.sudo apt install -y python
2.sudo apt install -y python3
2
下载编译工具
1.wget http://tools.harmonyos.com/mirrors/gn/1523/linux/gn.1523.tar
2.wget http://tools.harmonyos.com/mirrors/ninja/1.9.0/linux/ninja.1.9.0.tar
3.wget http://tools.harmonyos.com/mirrors/clang/9.0.0-34042/linux/llvm-linux-9.0.0-34042.tar
4.wget http://tools.harmonyos.com/mirrors/hc-gen/0.65/linux/hc-gen-0.65-linux.tar
解压
- tar -xvf gn.1523.tar -C ~/
- tar -xvf ninja.1.9.0.tar -C ~/
- tar -xvf llvm-linux-9.0.0-34042.tar -C ~/
- tar -xvf llvm-linux-9.0.0-34042.tar -C ~/
5.tar -xvf hc-gen-0.65-linux.tar -C ~/
设置环境变量:
vim ~/.bashrc
export PATH=~/gn:$PATH
export PATH=~/ninja:$PATH
export PATH=~/llvm/bin:$PATH
export PATH=~/hc-gen:$PATH
export PATH=~/hc-gen:$PATH
最后别忘了 source ~/.bashrc 使得环境变量生效
系统源码编译
下载系统源码
wget http://tools.harmonyos.com/mirrors/os/1.0/code-1.0.tar.gz
解压后,编译:
python build.py ipcamera_hi3516dv300 -b debug
编译需要等多几分钟:
conformance/interfaces/timer_settime/5-1 compile PASSED
make[2]: Entering directory '/usr/dopi/harmony/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative'
conformance/interfaces/timer_settime/speculative/12-3 compile PASSED
conformance/interfaces/timer_settime/speculative/12-1 compile PASSED
conformance/interfaces/timer_settime/speculative/12-2 compile PASSED
make[2]: Leaving directory '/usr/dopi/harmony/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/speculative'
make[1]: Leaving directory '/usr/dopi/harmony/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_settime'
make: Leaving directory '/usr/dopi/harmony/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces'
[1328/1338] STAMP obj/test/xts/acts/open_posix_testsuite/conformance/interfaces/prebuild_ActsOpenPosixTest.stamp
[1329/1338] ACTION //test/xts/acts/open_posix_testsuite/conformance/interfaces:ActsOpenPosixTest(//build/lite/toolchain:linux_x86_64_clang)
[1330/1338] STAMP obj/test/xts/acts/open_posix_testsuite/conformance/interfaces/ActsOpenPosixTest.stamp
[1331/1338] STAMP obj/test/xts/acts/acts_compoment.stamp
[1332/1338] COPY bin/query.bin suites/acts/resource/tools/query.bin
[1333/1338] STAMP obj/test/xts/acts/query_copy.stamp
[1334/1338] ACTION //test/xts/acts:acts(//build/lite/toolchain:linux_x86_64_clang)
[1335/1338] STAMP obj/test/xts/acts/acts.stamp
[1336/1338] STAMP obj/build/lite/ohos.stamp
[1337/1338] ACTION //build/lite:gen_rootfs(//build/lite/toolchain:linux_x86_64_clang)
[1338/1338] STAMP obj/build/lite/gen_rootfs.stamp
ohos ipcamera_hi3516dv300 build success!
看到 ohos ipcamera_hi3516dv300 build success! 应该是编译完成了。
下载源码时,就疑惑,鸿蒙和liteOS的关系,编译后,还有liteos.bin,疑惑。
烧录
访问 鸿蒙的IDE网站,里面有详细的介绍:
https://device.harmonyos.com/cn/ide
总结下烧录工具:
1.vs code
2.node.js
https://nodejs.org/dist/v12.18.3/node-v12.18.3-x64.msi
3.JDK1.8
链接:https://pan.baidu.com/s/1u6TMZaQ8D-9nIFUSEX1RiA
提取码:ie59
安装教程
https://blog.csdn.net/bestsongs/article/details/104905060
主要是设置环境变量。
-
npm
打开window的命令行工具:npm install -g @ohos/hpm-cli
5.下载DevEcoDeviceTool-1.0.0
访问:https://device.harmonyos.com/cn/ide这一步,需要华为账户,有点烦。不过里面有指导如何在vs code上安装DevEcoDeviceTool的文档。
安装完成后:
安装C/C++
导入代码
ubuntu中设置共享文件夹
windows中能直接通过网络访问ubuntu中的文件夹
添加驱动网络映射器
按照IDE的指导导入ubuntu共享的文件夹到vscode
————————————————
版权声明:本文为CSDN博主「wirner」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/wirner/article/details/108534406
- 分享
- 举报
-
浏览量:5273次2023-03-20 13:32:44
-
浏览量:2443次2023-07-12 15:22:31
-
浏览量:1371次2024-06-06 09:47:33
-
浏览量:3844次2022-10-13 17:29:06
-
浏览量:2699次2023-06-28 15:57:28
-
浏览量:1709次2023-11-06 11:04:59
-
浏览量:2986次2022-10-14 10:34:46
-
浏览量:1641次2023-06-12 14:18:20
-
浏览量:15048次2020-12-18 17:44:33
-
浏览量:5001次2021-08-06 15:29:06
-
浏览量:5033次2022-10-17 20:51:39
-
浏览量:1363次2023-06-12 14:18:15
-
浏览量:1505次2023-06-20 16:09:54
-
浏览量:1339次2024-01-13 18:14:30
-
浏览量:1147次2023-12-28 14:24:27
-
浏览量:7481次2020-09-17 16:12:59
-
浏览量:1455次2024-01-08 16:49:01
-
浏览量:947次2023-06-21 10:04:00
-
浏览量:4971次2020-09-30 18:01:11
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
电子狂热者
感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明