Last Updated on : 2023-11-15 09:38:34download
This topic walks you through the concepts and development process of the TuyaOS Central Control Development Framework.
|Central Control Device Development Kit
|Central Control Device Development Kit, built on top of the TuyaOS architecture, is designed to help you quickly develop central control products for different use cases. It consists of the build framework, development environment, demo, library, and header file. For more information, see Central Control Device Development Kit.
|TuyaOS Central Control Development Framework supports two development modes:
|The release notes for the type development kits in the Central Control Development Framework. For more information, see Release Notes.
This section describes how to download the development kit from Tuya Wind IDE.
See Tuya Wind IDE and proceed with the installation.
Log in to Tuya Wind IDE using your account of the Tuya IoT Development Platform.
Click Resource Center and search for the development kit you need. Select a Development Mode and Type Development Kit to show the supported chip platforms.
In TuyaOS SDK development, if you cannot find the platform you need, contact your account manager and provide the cross compiler toolchain you use.
Select a platform and click Search to show all the available TuyaOS versions. Find the latest version and click Request Permission.
Wait for your request to be processed. After it is approved, you can click Create Framework on the home page to download the development kit.
The directory of
|The example app, that is the product development kit.
|The build configuration files (leave it as is).
|The build script.
|The API documentation produced by Doxygen.
|The header files.
|The build output. The generated program is located in
output/<project name>_<version number>.
|The build framework (leave it as is).
|The development environment. It is downloaded to the local computer when you execute the build command.
Designed with a cross-platform approach, TuyaOS abstracts away the differences between hardware and systems by providing the TuyaOS Kernel API (TKL). When you port TuyaOS, you only need to adapt TKL.
TKL API definition:
TKL API examples:
You need to adapt and port TKL when using TuyaOS SDK development, but it is not necessary for TuyaOS OS development.
The standard Linux APIs, such as for the OS, file system, and network, come with examples of TKL implementations.
Most APIs can be used directly, but a few might not be fully compatible with all products, hardware, or chips. In such cases, you need to adapt them accordingly. For more information about porting, see Pair Over Wired Connection.
TuyaOS provides a unified build framework, allowing you to write application code and build projects in Tuya Wind IDE.
How to build a project in Tuya Wind IDE:
Right-click the name of the target project in the apps directory and choose Build Project from the menu.
Enter the version number in the format
X is a number) and press Enter.
It is strongly recommended to use Tuya Wind IDE to develop and build a project. However, if you have an existing build framework, you can integrate the development kit into your framework as a component.
This section describes the key steps to integrate the TuyaOS development kit into your existing build framework.
Copy the TuyaOS
include directories to your build framework, and write a build rule to specify the
include path. Write the link rule to specify the
lib path and link the respective library.
When linking a library, it is recommended to add the option
-Wl,--start-group <link library> -Wl,--end-group. This enables you not to take care of the order of dependency when multiple static libraries are used.
software/TuyaOS/vendor/<development environment>/tuyaos/tuyaos_adapter directory to your build framework, and write a build rule to specify the
tuyaos_adapter/include path. Build all the
.c files in the
Copy the directory of the sample app to your build framework and build all the
.c files in this directory.
This way, the development kit can be integrated into your build framework.
Is this page helpful?YesFeedback
Is this page helpful?YesFeedback