Page 1 of 1

【已解决】【中控】AK3760E_TuyaOS-3.10.10调用tuya_home_ctrl_dev_open程序崩溃

Posted: 2024年 Sep 20日 10:29
by yez

1) 开发包全称:tuyaos-gw-integrated_3.10.10_ak3760e_center_ctrl_3.10.x_linux_AK3760E_0.0.17.tar.gz
2) 问题现象:
编译demo程序后运行,在调用tuya_home_ctrl_dev_open时程序崩溃
(gdb) bt
#0 0x0014e894 in __dev_cb_list_get_fd_num (p_dev_cache=0x4f4130)
at /root/workspace_temp/cde/ci_gw_technology_group/tuyaos-gw-integrated/components/home_ctrl_dev/src/tuya_home_ctrl_dev/tuya_home_ctrl_dev.c:1311
#1 0x0015b164 in tuya_home_ctrl_dev_open (
dev_id=0x4f8920 "vdevo172628304190910", p_dev_cb=0xb6657ce8)
at /root/workspace_temp/cde/ci_gw_technology_group/tuyaos-gw-integrated/components/home_ctrl_dev/src/tuya_home_ctrl_dev/tuya_home_ctrl_dev.c:3402
#2 0x000162ac in test_ac_dp (
dev_id=dev_id@entry=0x4f8920 "vdevo172628304190910")
at /root/Documents/tuya/Projects/AK3760E_TuyaOS-3.10.10/software/TuyaOS/apps/tuyaos_demo_center_ctrl/src/demo_home_ctrl/test_home_ctrl_ac.c:35
#3 0x00015ae4 in test_one_device_dp (dev=dev@entry=0x4f8920)
at /root/Documents/tuya/Projects/AK3760E_TuyaOS-3.10.10/software/TuyaOS/apps/tuyaos_demo_center_ctrl/src/demo_home_ctrl/test_home_control_dev.c:70
#4 0x00015c50 in test_devices_dp (dev_list=<optimized out>, dev_count=2)
at /root/Documents/tuya/Projects/AK3760E_TuyaOS-3.10.10/software/TuyaOS/apps/tuyaos_demo_center_ctrl/src/demo_home_ctrl/test_home_control_dev.c:116


Re: 【求助】【中控】AK3760E_TuyaOS-3.10.10调用tuya_home_ctrl_dev_open程序崩溃

Posted: 2024年 Sep 20日 10:30
by yez

崩溃概率100%
linux和nx5平台sdk运行正常,只有安凯平台出现崩溃


Re: 【求助】【中控】AK3760E_TuyaOS-3.10.10调用tuya_home_ctrl_dev_open程序崩溃

Posted: 2024年 Sep 20日 14:52
by lightthgil

安凯的芯片,属于ARMV5类型,不支持非对齐的功能。如果代码中使用attribute((packed))定义的结构体,会出现结构体成员是非对齐的,此时如果没有使能非对齐访问会导致触发abort异常。

可以通过配置 /proc/cpu/alignment 来控制内核对非对齐访问的处理, 可以通过设置2来修复

image_5272219736385364.png