Search found 192 matches

by Kyson
2023年 Dec 1日 18:46
Forum: TuyaOS-网关中控开发
Topic: 【分享】程序段错误分析
Replies: 0
Views: 6240

【分享】程序段错误分析

在日常的软件开发过程中,我们无可避免地会遇到程序崩溃的问题。在开发和调试阶段,我们可以利用如 GDB 或 GDB Server 这样的工具来重现问题并进行栈回溯,从而轻松定位并解决问题。 然而,对于在线产品中的偶发性崩溃问题,处理起来就显得较为困难。尽管我们可以通过 Linux 的 backtrace 功能,捕捉 SIGSEGV 信号,并在信号回调中调用 backtrace 和 backtrace_symbols 接口来进行栈回溯,但遗憾的是,许多工具链已经裁剪了这一功能,因此在大多数情况下,backtrace 功能无法使用。 本文将提供两种方法,以解决线上产品中偶尔出现的 crash 问题。...
by Kyson
2023年 Dec 1日 11:27
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: Using the Address Sanitizer
Replies: 0
Views: 6460

Using the Address Sanitizer

C/C++ is commonly used as the preferred programming language for embedded development. We always encountering memory errors during the development. Memory errors are extremely fatal issues, and once it occurs, usually cause program crashes. Memory errors is extremely difficult to debug. Fortunately,...
by Kyson
2023年 Dec 1日 11:26
Forum: TuyaOS-网关中控开发
Topic: 【分享】内存错误分析 - AddressSanitizer
Replies: 0
Views: 6430

【分享】内存错误分析 - AddressSanitizer

C/C++ 通常作为嵌入式开发的首选编程语言,在开发过程中,碰到内存错误是很常见的。内存错误是非常致命的问题,一旦发生通常会引起程序奔溃,并且排查起来极其困难。 幸运的是,我们可以借助一些工具来检测此类错误,使用编译工具链内置的 AddressSanitize 功能是最佳的解决方案。 简介 AddressSanitizer (简称 ASan)是一种内存错误检测器,主要用于 C/C++ 程序。它可以在运行时检测出诸如缓冲区溢出、使用未初始化的内存、使用已释放的内存等常见内存错误。从 GCC 4.8 开始,AddressSanitizer 成为 GCC 的一部分。通过使用 AddressSanit...
by Kyson
2023年 Nov 24日 18:36
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: How to make TuyaOS Gateway Device Development Standalone
Replies: 0
Views: 7051

How to make TuyaOS Gateway Device Development Standalone

Background Information The TuyaOS Gateway Development Framework uses xmake to compile the framework. After downloading the development framework from Tuya Wind IDE, you can directly compile the project for apps. Newly added source files will be compiled and linked, without having to worry about cum...
by Kyson
2023年 Nov 24日 18:32
Forum: TuyaOS-网关中控开发
Topic: 【分享】如何把 TuyaOS 网关开发框架集成到其他工程
Replies: 0
Views: 6763

【分享】如何把 TuyaOS 网关开发框架集成到其他工程

背景信息 TuyaOS 网关开发框架使用 xmake 编译框架,从 Tuya Wind IDE 下载开发框架后便可直接编译 apps 的工程,新增源文件会被编译链接,无需关注繁琐的 Makefile 规则,使用上非常简单友好。 这种场景适用于在 TuyaOS 开发框架上开发应用,但是,如果您已经有自己的编译框架或者工程,把原项目迁移到 Tuya Wind IDE 可能不是一种好的选择,然而,把 TuyaOS 开发框架的头文件和库文件导入到您的项目可能更合理。 把 TuyaOS 开发框架的头文件和库文件独立出来,我们把它叫做 Standalone 。由于 TuyaOS 开发框架作为一个整体,会...
by Kyson
2023年 Nov 24日 16:25
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: TuyaOS Gateway Device Development API
Replies: 0
Views: 7158

TuyaOS Gateway Device Development API

This article introduces the commonly used API interfaces of the TuyaOS gateway development framework, which can be used as a reference for the API manual. Before starting, please make sure you are familiar with the basic concepts of the TuyaOS gateway development framework. This article will be clas...
by Kyson
2023年 Nov 24日 16:23
Forum: TuyaOS-网关中控开发
Topic: 【分享】TuyaOS 网关开发框架常用 API
Replies: 0
Views: 6596

【分享】TuyaOS 网关开发框架常用 API

本文介绍了 TuyaOS 网关开发框架的常用 API 接口, 您可以把本文当作 API 手册来参考。在开始之前,请确保您已经熟悉了 TuyaOS 网关开发框架的基本概念。 本文将按照功能分类,以下是 TuyaOS 网关开发框架主要功能和对应 API 接口说明。 基础接口 | 函数名 | 说明 | | ---------------------------- | ------------------------------------------------------------ | | tuya_load_config | 加载 JSON 配置文件 | | tuya_get_config |...
by Kyson
2023年 Nov 17日 10:36
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: How to Turn Your Ubuntu into a Bluetooth Gateway
Replies: 0
Views: 6060

How to Turn Your Ubuntu into a Bluetooth Gateway

This article introduces the development framework based on the gateway, using Ubuntu as a Bluetooth gateway to access the Tuya IoT platform, and enabling access to Tuya's Bluetooth Mesh & LE sub-devices. Hardware Preparation ZS3L module USB to serial port adapter Tuya's Bluetooth Mesh & LE s...
by Kyson
2023年 Nov 17日 10:35
Forum: TuyaOS-网关中控开发
Topic: 【分享】如何将Ubuntu转变为蓝牙网关
Replies: 0
Views: 5406

【分享】如何将Ubuntu转变为蓝牙网关

本文将介绍基于网关开发框架,把 Ubuntu 作为蓝牙网关接入涂鸦 IoT 平台,能够接入涂鸦生态的 Bluetooth Mesh & LE 子设备。 硬件准备 ZS3L 模组 USB 转串口 涂鸦生态 Bluetooth Mesh & LE 子设备 硬件连接 参考 ZS3L 模组规格书,按照下表的对应关系把 ZS3L 和 USB 转串口引脚连接起来。 | ZS3L | USB 转串口 | | ---- | ---------- | | TX | RX | | RX | TX | | RTS | CTS | | CTS | RTS | 硬件连接好之后,把 USB 转串口插入到 ...
by Kyson
2023年 Nov 17日 10:34
Forum: TuyaOS-Gateway&Central Control Device Development
Topic: How to Turn Your Ubuntu into a Zigbee Gateway
Replies: 0
Views: 6021

How to Turn Your Ubuntu into a Zigbee Gateway

This article introduces the development framework based on the gateway, using Ubuntu as a Zigbee gateway to access the Tuya IoT platform, and can access all Zigbee sub-devices in the Tuya ecosystem. Hardware Preparation ZS3L Module USB to Serial Port Any Zigbee sub-devices in the Tuya ecosystem Hard...