Harmonyos能用python开发么,鸿蒙OS设备上python开发学习实践
1、学习唐佐林老师的harmonyos上python设备开发课程:https://harmonyos.51cto.com/activity/30#wx,共享micropython改造代码:https://gitee.com/delphi-tang/python-for-hos/tree/master2、下载代码:git clone https://gitee.com/delphi-tang/pyt
1、学习唐佐林老师的harmonyos上python设备开发课程:https://harmonyos.51cto.com/activity/30#wx,
共享micropython改造代码:https://gitee.com/delphi-tang/python-for-hos/tree/master
2、下载代码:
git clone https://gitee.com/delphi-tang/python-for-hos.git
3、修改Makefile中交叉编译工具的路径:
CROSS_COMPILE ?= /home/min/harmonyos/compiler/gcc_riscv32/bin/riscv32-unknown-elf-
4、执行make
1、编译过程中报错:
/bin/sh: .//tools/mpy-tool.py: Permission denied
make: *** [Makefile:44: build/_frozen_mpy.c] Error 126
make: *** Deleting file 'build/_frozen_mpy.c'
解决方法:进入tools目录:cd tools/ ;执行权限修改:chmod u+x *
再执行make ,在build目录下生成libdtpython.a
ARCHIVE build/libdtpython.a
Success! Target ==> build/libdtpython.a
5、将编译得到的库文件 //build/libdtpython.a 拷贝到 //vendor/hisi/hi3861/hi3861/build/libs 目录下
6、拷贝目录下的demo目录下文件到applications/sample/wifi-iot/app/python_demo目录下,
修改applications/sample/wifi-iot/app/BUILD.gn文件:
lite_component("app") {
features = [
"python_demo:dt_python_demo"
]
}
7、编译python build.py wifiiot生成bin文件烧录,查看效果
更多推荐
所有评论(0)