1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
|
相关推荐
1个回答
|
|
首先我们先看https://xr806.docs.aw-ol.com/
该文档部分不适应 当前最新gitee 如果没有repo工具,可通过下面的git命令获取repo。 git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo 下载代码 没有使用ssh://方式 过于麻烦 mkdir xr806_openharmony cd xr806_openharmony repo init -u https://gitee.com/openharmony-sig/manifest.git -b OpenHarmony_1.0.1_release --no-repo-verify -m devboard_xr806.xml repo sync -c repo forall -c 'git lfs pull' #下载部分大容量二进制文件 编译流程 cd device/xradio/xr806/xr_skylark #(1)进入原生SDK目录 cp project/demo/audio_demo/gcc/deconfig .config #(2)复制配置文件 make menuconfig #(3)图形化界面配置 make build_clean #(4)清除旧配置 make lib -j #(5)根据配置生成静态库和全局头文件 cd - #(6)返回Harmony根目录 hb set #(7)选择wifi_skylark hb build -f #(8)编译,后续不需要重新配置 编译中遇到的问题 1.缺少SDKconfig.gni 直接导致 hb build -f 报错编译失败 解决方法 修改xr806_openharmony/device/xradio/xr806/xr_skylark/config.py 该文件的换行符 unix格式 #!/usr/bin/python3 import os pwd = os.path.dirname (__file__) f = open('{0}/.config'.format(pwd),'r') DATA = ['#XR806 config'] for line in f.readlines(): if line[0] != '#' and line[0] != 'n': line = line.strip('n') DATA.append(line) GNf = open('{0}/../liteos_m/SDKconfig.gni'.format(pwd),'w') GNf.write('#Build by config.py DO NOT EDIT!nn') GNf.write('SDK_cflags = [n "-mcpu=cortex-m33",n "-mtune=cortex-m33",n "-march=armv8-m.main+dsp",n "-mfpu=fpv5-sp-d16",n "-mfloat-abi=softfp",n "-mcmse",n "-mthumb",n "-c",n "-g",n "-fno-common",n "-fmessage-length=0",n "-fno-exceptions",n "-ffunction-sections",n "-fdata-sections",n "-fomit-frame-pointer",n "-Wall",n #"-Werror",n "-Wno-cpp",n "-Wpointer-arith",n "-Wno-error=unused-function",n "-MMD",n "-MP",n "-Os",n "-DNDEBUG",n "-Wno-error=stringop-truncation",n "-Wno-error=restrict",n "-includexr_config.h",n "-includecommon/prj_conf_opt.h",n "-DCONFIG_CHIP_ARCH_VER=3",n "-DCONFIG_ARCH_APP_CORE",n "-DCONFIG_CPU_CM33F",n ]nn') PROJECT = [x for i,x in enumerate(DATA) if x.find('CONFIG_PROJECT=') != -1] if len(PROJECT) == 1: ProjectPath = PROJECT[0] ProjectPath = ProjectPath.strip('CONFIG_PROJECT=') GNf.write('ProjectPath = {0}nn'.format(ProjectPath)) if ProjectPath == '"bootloader"' or ProjectPath == '"test/etf"': GNf.write('declare_args() {IsBootloader = "true"}n') else: GNf.write('declare_args() {IsBootloader = "false"}n') #print (DATA) 2.hello 一直不出现 修改xr806_openharmony/device/xradio/xr806/libcopy.py 该文件的换行符 是windows格式(很奇怪对吧)。 #!/usr/bin/python3 import os import json pwd = os.path.dirname (__file__) XTS_TEST = "disable" def filenames_filter(filename_list,Features_str,extention_name): confirm_list = [] for filename in filename_list: if filename.find(Features_str) != -1: if extention_name == os.path.splitext(filename)[1]: confirm_list.append(filename) return confirm_list # whether config.json define compoent "test"? vendorf = open('{0}/../../../vendor/xradio/xr806/config.json'.format(pwd),'r') configData = json.load(vendorf) subsystemsData = configData['subsystems'] for JSON_TXET in subsystemsData: ComponentJson = json.dumps(JSON_TXET) componentPython = json.loads(ComponentJson) if componentPython["subsystem"] == "test": XTS_TEST = "enable" GNf = open('{0}/xr_skylark/ohos.mk'.format(pwd),'w') FnList = os.listdir('{0}/xr_skylark/lib/ohos'.format(pwd)) APPlib = filenames_filter(FnList,'libapp_','.a') if XTS_TEST == "enable": TESTlib = filenames_filter(FnList,'libmodule_','.a') # if test XTS_UPgrade,KEYlib should add 'libhota.a' KEYlib = ['libwifiservice.a','libhiview_lite.a','libhilog_lite.a', 'libhievent_lite.a','libbootstrap.a','libhctest.a','libbroadcast.a'] else: TESTlib = [] KEYlib = [] RTOSlib = list(set(FnList) - set(APPlib) - set(TESTlib) - set(KEYlib)) GNf.write('#n# Rules for ohos libraryn#nn') GNf.write('OHOSSOURCE = -Wl,--whole-archiven') for lib in KEYlib: GNf.write('OHOSSOURCE += $(ROOT_PATH)/lib/ohos/{0}n'.format(lib)) for lib in APPlib: GNf.write('OHOSSOURCE += $(ROOT_PATH)/lib/ohos/{0}n'.format(lib)) for lib in TESTlib: GNf.write('OHOSSOURCE += $(ROOT_PATH)/lib/ohos/{0}n'.format(lib)) GNf.write('OHOSSOURCE += -Wl,--no-whole-archiven') GNf.write('n') GNf.write('OHOSSOURCE += -Wl,--start-groupn') for lib in RTOSlib: GNf.write('OHOSSOURCE += $(ROOT_PATH)/lib/ohos/{0}n'.format(lib)) GNf.write('OHOSSOURCE += -Wl,--end-groupn') GNf.write('#n# end of filen#nn') win下make menuconfig问题 建议用linux(能烧录哦) 目前我用了 Cygwin msys2 以及msys2中带的msys 都是同类型错误,建议看看其他坛友是否有方法 MinGW 未试 问题2分析 文件xr806_openharmony/device/xradio/xr806/xr_skylark/ohos.mk 默认有 OHOSSOURCE = -Wl,--whole-archive OHOSSOURCE += $(ROOT_PATH)/lib/ohos/libapp_console.a OHOSSOURCE += -Wl,--no-whole-archive 所以编译后能跑起来 libcopy.py 未能正确运行导致 文件未被更新如: OHOSSOURCE = -Wl,--whole-archive OHOSSOURCE += $(ROOT_PATH)/lib/ohos/libapp_console.a OHOSSOURCE += $(ROOT_PATH)/lib/ohos/libapp_led.a OHOSSOURCE += $(ROOT_PATH)/lib/ohos/libapp_WlanTest.a OHOSSOURCE += -Wl,--no-whole-archive 所以 不管你怎么改都只是 支持libapp_console 设置 可手工添加(不建议。 hello 跑起来怎么改? https://xr806.docs.aw-ol.com/study/soft_helloword/ 给的文档已经过期不适合 现在最新的gitee代码 修改 xr806_openharmony/device/xradio/xr806/ohosdemo/BUILD.gn 内容: group("ohosdemo") { deps = [ "hello_demo:app_hello", "LED:app_led", #"iot_peripheral:app_peripheral", #"wlan_demo:app_WlanTest", ] } 如此这般hello_demo 就能愉快的跑起来了。 |
|
|
|
只有小组成员才能发言,加入小组>>
434 浏览 0 评论
580 浏览 0 评论
705 浏览 0 评论
全志T113双核异构处理器的使用基于Tina Linux5.0——RTOS系统定制开发
1372 浏览 0 评论
全志T113双核异构处理器的使用基于Tina Linux5.0——RTOS编译开发说明
733 浏览 0 评论
全志V85x硬件设计大赛作品精选第二期,快来Pick你心目中的最佳方案
91751浏览 3评论
2834浏览 1评论
5106浏览 1评论
Yuzuki Lizard 全志V851S开发板 –移植 QT5.12.9教程
16389浏览 1评论
关于全志T113开发板接7寸LCD屏幕显示异常问题的解决方案
1122浏览 1评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 17:02 , Processed in 0.600211 second(s), Total 76, Slave 60 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号