先是按照官方的文档搭建环境
或者参考连老师的文档《HarmonyOS 设备开发入门
》,VS Code,
Node js,JDK, HPM, DDT,C/C++,Python3.8,NPM,环境有点多,有些还需要手动添加系统变量,搭建完后;
注意系统环境变量的添加,接下来再跟着官方的文档在VS下GITHUB源码链接
下载工程按照文档在VS中操作,下载的代码解压有可能会报错;
解压完后导入到配置目录,不过这两天在VS里串口的驱动总是安装不上去,一直会报错,到目前为止还没有找到原因;
What is the Baud Rate? The default is 115200. Enter:
What is the Data Bits? The default is 8. Enter:
What is the Stop Bits? The default is 1. Enter:
Set endline characters as "
"? The default is 0, Enter 1 to set. Enter:
Unable to open serial port: 27 - Error: Opening 27: File not found
The port name:
COM28
COM27
Pick the one for openning: 27
What is the Baud Rate? The default is 115200. Enter: 921600
What is the Data Bits? The default is 8. Enter: 8
What is the Stop Bits? The default is 1. Enter: 1
Set endline characters as "
"? The default is 0, Enter 1 to set. Enter: 0
Unable to open serial port: 27 - Error: Opening 27: File not found
The port name:
COM28
COM27
Pick the one for openning:
另外在配置好路径后,点构建也会出现报错的问题,也还没有找到原因;
(node:9888) UnhandledPromiseRejec
tionWarning: Error: connect ENOENT undefined
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1134:16)
(node:9888) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9888) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
所以在烧录的时候可能是由于串口的驱动在VS里没有设置好,所以烧录不了;
进步的最好方法就是想办法解决问题,同样希望各路大神不吝赐教,感激不尽,此次初体验就至此,同时希望官方能整合一款能通用的开发软件。