Development Environment Setup and Verification
Overview
Complete the necessary tool preparation on different systems (Linux, Windows, Mac)
Hardware Preparation
- TuyaOpen Supported development boards or modules
- USB data cable
- Computer (Windows / Linux / macOS)
Environment Preparation
info
Recommended to use Ubuntu 24, 22, 20 LTS versions.
Install necessary tools
sudo apt-get install lcov cmake-curses-gui build-essential ninja-build wget git python3 python3-pip python3-venv libc6-i386 libsystemd-dev
Download & Activate TuyaOpen
Download the TuyaOpen
repository
# Using github
git clone https://github.com/tuya/TuyaOpen.git
# Or using gitee
git clone https://gitee.com/tuya-open/TuyaOpen.git
cd TuyaOpen
Activate tos.py
. ./export.sh
Verify by using commands tos.py version
and tos.py check
, you should see the following information
❯ tos.py version
[INFO]: Running tos.py ...
[INFO]: v1.3.0
❯ tos.py check
[INFO]: Running tos.py ...
[INFO]: [git] (2.43.0 >= 2.0.0) is ok.
[INFO]: [cmake] (4.0.2 >= 3.28.0) is ok.
[INFO]: [make] (4.3 >= 3.0.0) is ok.
[INFO]: [ninja] (1.11.1 >= 1.6.0) is ok.
[INFO]: Downloading submoudules ...
[INFO]: [do subprocess]: cd /home/huatuo/work/open/TuyaOpen && git submodule update --init
[INFO]: Download submoudules successfully.
If check command fails
# Tool validation fails, please install or upgrade corresponding tools
# Submodules download fails, manually execute git command
git submodule update --init
Use the following command to deactivate tos.py
deactivate
For more detailed information about tos.py
, you can use the command tos.py --help
to view
Or check tos.py Tool Usage
Common Issues
-
tos.py
activation failsIf activation fails, it may be because
python3-venv
is not installed. Please install it and try againsudo apt-get install python3-venv
Delete the
./.venv
directory and reactivate