marklove

Parser 不要单凭语言判断一个人,要看实际行动。 “贵人不可贱用”

导航

全志 xradio xr806

https://aijishu.com/a/1060000000282581
https://aijishu.com/a/1060000000256631
https://aijishu.com/a/1060000000247851
https://aijishu.com/a/1060000000256635
https://aijishu.com/a/1060000000256638
https://aijishu.com/a/1060000000256642 cmd

https://www.openharmony.cn/#/documents/device-dev-kernel/device-dev-kernel-1/kernel-mini-overview
http://web.chacuo.net/formatc
xradio 环境搭建
https://github.com/XradioTech/xradiotech-wiki/wiki/Developer
https://github.com/XradioTech/xradiotech-wiki/wiki/dev-setup-on-windows

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)编译,后续不需要重新配置

如果没有repo工具,可通过下面的git命令获取repo。
git clone https://gerrit-googlesource.lug.ustc.edu.cn/git-repo


xr806 编译 Unable to load "...SDKconfig.gni"

#!/usr/bin/python3

file = open('/home/make/xr806_openharmony/device/xradio/xr806/xr_skylark/.config', 'r')

try:
 DATA = ['#XR806 config']
 text_lines = file.readlines()
 print(type(text_lines), text_lines)
 for line in text_lines:
    if line[0] != '#' and line[0] != '\n':
        line = line.strip('\n')
        DATA.append(line)
 GNf = open('/home/make/xr806_openharmony/device/xradio/xr806/liteos_m/SDKconfig.gni', 'w')
 GNf.write('#Build by config.py DO NOT EDIT!\n\n')
 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\
]\n\n')
 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}\n\n'.format(ProjectPath))
 if ProjectPath == '"bootloader"' or ProjectPath == '"test/etf"':
    GNf.write('declare_args() {IsBootloader = "true"}\n')
 else:
    GNf.write('declare_args() {IsBootloader = "false"}\n')
finally:
    file.close()

posted on 2021-12-12 18:11  marklove  阅读(284)  评论(0编辑  收藏  举报