【已解决】tuyaos_demo_matter_quickstart 编译出错

Wi-Fi 设备、Wi-Fi 低功耗设备、Wi-Fi BLE 双模设备、Ethernet设备、Ethernet+Wi-Fi设备等
Post Reply
sky
Posts: 7

tuyaos_demo_matter_quickstart 的 demo 没有作任何修改,

环境为 vMbox- Ubuntu 22.04.3 LTS;
编译得到的的log 如下

Code: Select all

/home/sky/Documents/tuya/Projects/BK7231N_TuyaOS-3.7.6/software/TuyaOS/apps/tuyaos_demo_matter_quickstart/src/tuya_app_main.c:594:5: warning: implicit declaration of function ‘tkl_thread_create’; did you mean ‘tal_thread_delete’? [-Wimplicit-function-declaration]
  594 |     tkl_thread_create(&ty_chip_thread, "matter_task", 20*1024, 2, chip_thread, NULL);
      |     ^~~~~~~~~~~~~~~~~
      |     tal_thread_delete
/home/sky/Documents/tuya/Projects/BK7231N_TuyaOS-3.7.6/software/TuyaOS/apps/tuyaos_demo_matter_quickstart/src/tuya_app_main.c: Assembler messages:
/home/sky/Documents/tuya/Projects/BK7231N_TuyaOS-3.7.6/software/TuyaOS/apps/tuyaos_demo_matter_quickstart/src/tuya_app_main.c:485: Error: no such instruction: `bl __libc_init_array'
compile command:
gcc -pipe -D_REENTRANT -Wall -Wno-unused-result  -Iinclude -Iinclude/components -Iinclude/components/svc_devos -Iinclude/components/svc_devos/include -Iinclude/components/svc_matter_acl_intf -

SDK 信息如下

Code: Select all

Type Dev Kit
Networked Product Development:Wifi-BLI-Matter Device Development Kit
Description
general development framework for matter on Wi-Fi&BLE platform, can be used for the development of all wifi&ble control equipment, including the development of electricians, lighting, door locks, and household appliances. While supporting standard matter protocol, it also supports Tuya cloud capability (using Tuya App or sharing to Tuya App).
TuyaOS Version
TuyaOS-3.7.6
Component Dev Kit(s)
tuyaos-iot_3.4.119_bk7231n_matter_1.2.6

请问怎么解决


Tags:
haitun
Posts: 13

Re: tuyaos_demo_matter_quickstart 编译出错

这个demo是在arm-linux上编译测试使用的,在gcc上没有测试验证过。

愚者千虑必有一得
Posts: 499

Re: tuyaos_demo_matter_quickstart 编译出错

你用的是什么编译命令?用ide编译是没问题的?你用的是M1?

企业微信截图_16946607858801.png
sky
Posts: 7

Re: tuyaos_demo_matter_quickstart 编译出错

我是用VirtualBox 虚拟机, 系统是 Ubuntu22 也是按照 doc 网页哪里操作,提示 tuya_app_main.c:485: Error: no such instruction: `bl __libc_init_array' 是不是有些库没装好

微信图片_20230914221711.png
微信图片_20230914221831.png
微信图片_20230914222155.png
愚者千虑必有一得
Posts: 499

Re: tuyaos_demo_matter_quickstart 编译出错

操作流程是没问题的,也比较奇怪哈,c库用的应该是原厂的,和系统里的没啥差别。你能把完整的编译过程的log,用文件的形式发过来看看吗?

sky
Posts: 7

Re: tuyaos_demo_matter_quickstart 编译出错

log 文件如下

tuya-error.log
(32.43 KiB) Downloaded 176 times
愚者千虑必有一得
Posts: 499

Re: tuyaos_demo_matter_quickstart 编译出错

你能看看的vendor/bk7231n目录里有啥嘛?感觉是这个目录没有完整导致的。你可以删掉这个目录重新编译试试。

sky
Posts: 7

Re: tuyaos_demo_matter_quickstart 编译出错

:D 谢谢,我重新弄了个 ubuntu22.04的虚拟机可以了

Post Reply